static – Stopping orientation change with side-keyboard (Android) – Education Career Blog

I am wondering how I can make the orientation of the screen permanent, even when the phone has a slide-out keyboard. This is the code I have:

<activity android:name=".AppName" android:label="@string/app_name"
android:screenOrientation="portrait">

Thanks.

,

Try adding:

android:configChanges="orientation|keyboardHidden"

Leave a Comment