onTouchEvent() will not be triggered if setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) is invoked

后端 未结 8 665
有刺的猬
有刺的猬 2021-02-01 16:11

I call

getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) 

when my app starts to make my app able to displa

相关标签:
8条回答
  • 2021-02-01 16:38

    I got this problem too, and I found this http://developer.android.com/reference/android/view/View.html#SYSTEM_UI_FLAG_HIDE_NAVIGATION

    So, no way to help. Even the android system packaged Gallery app used SYSTEM_UI_FLAG_LOW_PROFILE instead of SYSTEM_UI_FLAG_HIDE_NAVIGATION in photo page view. This is at least what we can do.

    0 讨论(0)
  • 2021-02-01 16:40

    Try to use:

    getWindow().getDecorView().setSystemUiVisibility(View.GONE);

    instead:

    getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION)

    After that you can use normal activity in fullscreen and if you want nav keys you need to swipe from bottom to up. Working for me at Galaxy Tab 2 with android 4.1.2

    0 讨论(0)
提交回复
热议问题