If you want your android app not to change orientation when the user changes the orientation.
You can do it both programatically or updating the manifest file.
1) Updating the Manifest.
Just add this line to the activity that you want for a particular activity
android:screenOrientation="portrait"It would look like <activity android:name="com.example.Activity" android:label="Example" android:screenOrientation="portrait"> </activity>