I'm checking the size of the device and if it's not tablet I'll set orientation to portrait so I can't set orientation at Manifest
. I'm checking the size and orientation at each Activity
like this:
if(Services.isMobile()){
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
}
But it has two problems 1.
I have to do like so an all activities (and there is a lot of them)
2.
It doesn't work for Fragments
.