android how to hide the status bar without hiding the title bar

后端 未结 3 1452
孤街浪徒
孤街浪徒 2021-01-03 13:30

In my application i am working with canvas. I am drawing on canvas. I put canvas color as white. When my app open the canvas is visible along with above status bar. But i w

3条回答
  •  旧巷少年郎
    2021-01-03 13:58

    It's enough to remove the line

     requestWindowFeature(Window.FEATURE_NO_TITLE);
    

    But if you want to display full screen (without action bar) write too

     getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
        WindowManager.LayoutParams.FLAG_FULLSCREEN);
    
    
      setContentView(R.layout.activity_location_eb);
    

提交回复
热议问题