Back to Top

How to disable screen orientation change in Android?

To restrict screenorientation in Android

Here is the quick article about how to disable screen orientation change in Android.Well, recently in one application, I want to restrict application with landscape mode only.

User is restricted with portrait orientation so need not change an orientation of screen even if enabled.

So,first of all open your AndroidManifest.xml,find the activity declaration and place below line of code into < activity > tag.

After adding above line of code, you can see your whole application will be set to landscape

That’s it.I hope this tip will be helpful to you.

Post your comments if you need help. As always, thanks for reading. Don’t Forget to Follow us on Twitter or Subscribe us to Get the Latest Updates.

Comments (1)

  1. […] to move one step ahead for Android Phonegap application article Series.Last what we have seen is To restrict screen orientation in Android.In this article, I am going to explain how to setup SQLite Cordova for Android […]

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Most Popular Posts

What are Traits in PHP

Posted on 9 years ago

Bhumi

Getting started with Laravel

Posted on 7 years ago

Bhumi