How to disable landscape mode in android?



How to disable landscape mode in android?..

Answer / Md.absar Ansari

To prevent your Android application from running in landscape mode, you can add the following attribute to the manifest file under the activity tag: "screenOrientation" with the value "portrait". Here's an example:n<activity android:name=".MainActivity" android:screenOrientation="portrait"/>

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Android OS Interview Questions

Explain the differences between a domain and a workgroup?

1 Answers  


What is a marshmallow in android?

1 Answers  


What is content provider?

1 Answers  


What is the latest version of android 2019?

1 Answers  


What is difference between serializable and parcelable ? Which is best approach in android ?

1 Answers  


Can you list and explain the four java classes related to using sensors on the android platform?

1 Answers  


Does asynctask create new thread in background?

1 Answers  


 What do containers hold?

1 Answers  


Explain datepickerdialog in android?

1 Answers  


Which of the following is not a right codename of android version?

1 Answers  


what are the different tools in android?

1 Answers  


Can I install exe files on android?

1 Answers  


Categories