I need to check if the device launcher home screen support orientation, is that possible? if so please help me out.
for instance, Samsung Galaxy Note 2 does not support launcher orientation while Galaxy Mega does.
I need to check if the device launcher home screen support orientation, is that possible? if so please help me out.
for instance, Samsung Galaxy Note 2 does not support launcher orientation while Galaxy Mega does.
You can handle yourself the screen rotations by modifying the Manifest file, just add android:configChanges="orientation"
for the activities you want. It means that the system will not handle by itself the orientation changes anymore.
Then in order to implement the actions to do during the orientation changes, add the following code in your Activity
:
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
if (newConfig.orientation == Configuration.ORIENTATION_PORTRAIT) {
//TODO
} else if (newConfig.orientation == Configuration.ORIENTATION_LANDSCAPE) {
//TODO
}
}
For the devices, I think you can try filtering with the models for example: android.os.Build.MODEL
.