How Do You Set an Android App to Portrait Mode Only?
Contents

How do I make my android app only portrait?

There are two ways,

  1. Add android_screenOrientation=”portrait” for each Activity in Manifest File.
  2. Add this. setRequestedOrientation(ActivityInfo. SCREEN_ORIENTATION_LANDSCAPE); in each java file.

How do I make my apps only portrait mode?

If you want to develop an application in portrait mode, add screenOrientation inside application tag. In the above result it is showing only portrait mode. now turn your device it not going to change the view according to orientation.

Marcus Vance

Marcus Vance

Cybersecurity & Digital Privacy Researcher

Marcus Vance is a cybersecurity auditor and technology writer dedicated to educating the public about online safety, data privacy regulations, enterprise security, and emerging cyber threats.

Share this article
Twitter Facebook Pinterest