In android when users rotate the screen the entire screen orientation changes to either portrait or landscape, including all the elements on that particular screen. Is there a way to only rotate some elements and keep other elements "locked" in their current orientation? E.g The screen is displaying a button and an image, I want to only allow screen rotations for the button and maintain the same orientation for the image.
Asked
Active
Viewed 65 times
0
-
1The entire screen is subject to orientation changes. Android will destroy the activity that was showing a recreate a new one each time. This is the default behavior, and is fully expected. If you want to do something custom, you will probably have to lock the screen in one orientation and manually handle the sensors that indicate orientation and respond accordingly. – Doug Stevenson Mar 06 '16 at 05:01
-
You can refer this question http://stackoverflow.com/questions/12471450/is-it-possible-to-just-rotate-some-views-in-screen-when-rotate-my-android-phone I think it's the same that you have asked – Ameya Kulkarni Mar 06 '16 at 05:01