I am trying to create a fragment for an app that will be rotated before shown (so as to avoid changing to landscape and portrait because I wish to avoid the activity being created again).
When the first fragment is shown (a list) the user selects an option, and then the second fragment is shown as if it was in portrait. To do this I have added in the xml file of the second fragment:
android:rotation="90"
However this does not seem to work correctly, it looks like the screen was drawn in portrait mode, and then rotated by 90 degrees and then shown, this has the effect of the right and left side having a big blank, and the header of the fragment not showing correctly.
Could someone help me with this, either by helping me fix the display issue, or showing me an alternative?