Locking Android App in Portrait Mode for Device with Keyboard

29 Mar 2011 - 9:36am
3 years ago
2 replies
1631 reads

Hi all,

I am designing an Android app that will be locked in portrait mode.

My question is regarding Android devices with a keyboard.  If I lock the app in portrait mode, when the user slides out his or her keyboard in a landscape orientation, the app will not reorient to landscape to allow the user to type via the keyboard. 

Does it make sense to pop up the on-screen keyboard when the user tries to slide out his/her keyboard in landscape mode?  This would be to indicate that only the onscreen keyboard is available to use. 

What are your thoughts?

Does Android support portrait/landscape on a per-screen basis?



29 Mar 2011 - 10:51am


Yes, Android supports portrait, landscape, or both, on a per-screen basis.  If possible, consider supporting both portrait and landscape for the screens that require keyboard input (regardless if it's virtual or physical keyboard).  I'd also look into adding the following:


in each <Activity> tag in the manifest.xml as a quick and dirty way to handle orientation change (and physical keyboard) without having to design separate layouts for portrait and landscape.  It basically re-orients the existing layout and prevents Android from restarting/resetting the Activity(screen).   Consider using this if it makes sense for your design. 


30 Mar 2011 - 9:05am

Thank you, Brian.

Super helpful!

Syndicate content Get the feed