I have a tab activity that has three child activities, A, B and C. Child activities A and B are to follow the orientation of the tab activity. i.e. if the tab activity is in portrait so should A and B, if the tag activity is landscape so should A and B.
Child activity C should always be in landscape orientation regardless of the tab activity orientation (preferably following android:screenOrientation="sensorLandscape"). Is this possible?
I have tried using android:screenOrientation="sensorLandscape" for C in the manifest which doesn't work. The best I can manage is to use the following in C (in onResume())
this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
and for A and B I use (also in onResume())
this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
But this flips the entire tab which is not the effect I'm looking for.