I need to lock the layout for a fragment in order to prevent it from rotating when the device is rotated to landscape.
To do that, I locked it in the manifest:
android:screenOrientation="portrait
The layout doesn't change, but I still need to do some work when the orientation is changed (rotate the buttons). Locking it this way prevents onConfigurationChanged from being called.
The behavior I'm aiming is exactly like the default camera app. When you rotate the device, the layout stays the same, but only the buttons rotate.
Has anyone a trick to do this?