I have a tab that has three child actions: A, B, and C. Child A and B for children should follow the orientation of the activity of the tab. that is, if the activity of the tab is in the portrait, so A and B, if the activity of the tag is landscape, so A and B.
The activity of child C should always be in landscape orientation regardless of the orientation of the activity of the tab (preferably after android: screenOrientation = "sensorLandscape"). Is it possible?
I tried using android: screenOrientation = "sensorLandscape" for C in a manifest that does not work. The best I can do is use the following in C (in onResume ())
this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
but for A and B it is used (also in onResume ())
this.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
But this flips the entire tab, which is not the effect I'm looking for.
source share