How do I turn off landscape mode on Android?

How do I turn off landscape mode on Android?
Answer
If you want to disable Landscape mode for your android app ( or a single activity) all you need to do is add, android:screenOrientation=”portrait” to the activity tag in AndroidManifest.xml file. If you want to do this programatically ie. using Java code.
 

Tìm kiếm

Back
Top