I'm trying to hide navigation bar (back, home buttons) on an Android 4.0.3 tablet.
I've tested this code on android 4.3 emulator and it's working:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
View v = getWindow().getDecorView();
v.setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
}
But it's doing nothing on my tablet !
I'm not sure if SYSTEM_UI_FLAG_HIDE_NAVIGATION
should work on 4.0.3 but I see that
tablet's default video player on 4.0.3 is hiding the navigation bar and the behavior looks like it is using SYSTEM_UI_FLAG_HIDE_NAVIGATION
.
Is this code supposed to work on 4.0.3?
If not is there some alternative that I could use?