Android : Stay in Immersive Full-Screen Mode

on Tuesday, March 24, 2015


As soon as a text field in the WebView receives focus, the on-screen keyboard appears in combination with the ActionBar. This seems to be a bug, IMHO. How can I avoid this?


The relevant parts:


a class that inherits from ActionBarActivity



...
public void hideSystemBar()
{
getWindow().getDecorView().setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_FULLSCREEN
| View.SYSTEM_UI_FLAG_IMMERSIVE);
}


AndroidManifest.xml



<activity
...
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"

0 comments:

Post a Comment