Initially I set my Activity to be in Immersive Mode with the following code:
View decorView = getWindow().getDecorView();
decorView.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_STICKY);
Everything works fine until the user clicks on an EditText and the soft keyboard appears. It causes the Status Bar to stick on the top and never hides back again even after the soft keyboard disappears. Strangely enough, I only encounter this problem on LG/Samsung phones, Sony phones do not have any problem with this. Anyone has any idea about this?