To Stop Orientation Change in Android OS Smartphones Screen

Automatic Screen Orientation Change :

Nowadays, all the Android Smartphones come with inbuilt motion sensor. If you change the orientation of your smartphone from portrait to landscape position (Vertical to horizontal positions)
the motion sensor will automatically detect the orientation change and rotate the screen to landscape view.

To stop Orientation Change in Android Smartphones :

  1. Go to Notification Bar
  2. Click Menu Button at the top corner. (In some phones, it is optional)
  3. Now a set of quick settings will be displayed.
  4. Look for Auto Rotation settings.
  5. If it is enabled, disable the settings.
  6. Hereafter, the screen orientation will not change until you come back and enable this setting.
Note: Some apps like VLC and some games have special settings which manipulate over this basic settings. So, you have to disable separately for some specific apps, to stop orientation change.

For Android App developers:

  1. If you are developing an app , in which you need to constantly fix a particular mode, then you have to include the following syntax in AndroidManifest.xml file.