To simplify, I’d like to create an activity which consists of two different views (e.g. button and image). And I want only one of them to rotate on orientation change while other to be orientation-independent.
I’ve found a lot about iOS case but nothing about Android.
Any help would be appreciate.
To simplify, I’d like to create an activity which consists of two different views
Share
It’s very simple, just add
screenOrientationto the activity (the one you don’t want to rotate on orientation change) in the manifest file like this:All other activities will automatically rotate on orientation change.