How to hide status bar?

后端 未结 5 1814
广开言路
广开言路 2021-01-17 11:59

How can I hide the status bar for a specific activity?

I found this similar question, but none of the answers worked for me. The app just crashed every time I tried

5条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-17 12:14

    Try this in you activity before setting your content

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

提交回复
热议问题