MainActivity and most of the activities of the application use:
android:configChanges="orientation"
android:screenOrientation="portrait"
to prevent screen rotation. But in one of the activities I want it to be able to rotate and althouth it hasn’t the configChanges nor the screenOrientation atributte it can’t rotate.
It’s seems that the configChanges and screenOrientation is inherited from the main activity because if I comment the lines for the main activity then the other activity can be rotated.
Why that behaivour? How can I prevent rotation in some activities and allow it in others?
If you did not set a specific
android:screenOrientationvalue, the default value will be"unspecified"(described as “The default value. The system chooses the orientation. The policy it uses, and therefore the choices made in specific contexts, may differ from device to device.” in the documentation).I would suggest setting your special activity to
"sensor"and see if that makes a difference.