I am trying to hide / minimize the system bar in Android 4.0.3. At the moment I’am doing
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
in the onCreate event of my activity. As soon as the user touches the screen the bar will show up again. According to other STO threads, this behavior can not be circumvented.
My idea is to catch any touch event on my view, and re-hide the bar immediately after it is shown. Running the code shown above in the click handler has no effect.
How to achieve a (hardly) hidden bar?
I will not talk about the ‘why’, just about the ‘how’ 🙂
So, about
This will not affect tablet devices, which use a system bar rather than a separate navigation
and status bars.
On Tablet, you could try (API Level 14 onward)
To detect the event, I think you could use this to catch the event:
More generally, here is an additional advice from ‘Professional Android 4 Application development’
.