In Android 4.0 on devices without hardware navigation keys, Android will render navigation bar.
You can hide it, if you want by using setSystemUiVisibility()
.
If that is done, lets say if you want to get as much screen as possible for playback, when you first touch screen (and yes, on View
you implement View.onTouchEvent()
), first touch will be hijacked by Android and your API will not be called. Only once navigation bar is visible it will be called.
Now, that can be avoided by also listening to:
http://developer.android.com/reference/android/view/View.OnSystemUiVisibilityChangeListener.html
and when navigation bar is visible just do what you will do on first touch.
Is there any other way to do the same, that will say Android 4.0 to propagate touch event to my app once Navigation bar is done with it?
No, the system always consumes the first touch that brings the navigation bar back. You should only hide the navigation bar if your app is in a non-interactive state such as video playback.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With