Suppose that within an activity my initial screen orientation is landscape. In the same activity, I would like to add a button which changes the screen orientation from landscape to portrait.
Is this possible in any way, or should I switch to a new activity ?
Thanks.
you can add new views to your layout, but first you need to detect the orientation change which is explained in the following link how it’s done.
How to detect orientation change in layout in Android?
hope this helps