How to completely exit from Immersive full screen mode?

前端 未结 2 1720
面向向阳花
面向向阳花 2021-02-12 20:27

I would like to implement a button to enable/disable the immersive full screen mode. I\'m using those methods but the showSystemUI only shows quickly and hide again...

H

2条回答
  •  轮回少年
    2021-02-12 21:11

    What worked for me is the following:

    View decorView = activity.getWindow().getDecorView();
    decorView.setSystemUiVisibility(0);
    

    I might be wrong but it seems like calling setSystemUiVisibility with 0 clears the flags which were previously applied.

提交回复
热议问题