How to hide navigation bar in Android app?

后端 未结 6 762
伪装坚强ぢ
伪装坚强ぢ 2020-12-16 05:28

I was wondering how I could hide the navigation bar in an Android application?

I know how to hide it initially, but as soon as I touch the screen it pops back up. I

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-16 06:28

    In your activity's onCreate method:

    this.getWindow()
        .setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                  WindowManager.LayoutParams.FLAG_FULLSCREEN);
    

提交回复
热议问题