Hide status bar but show action bar

The status bar where the battery, time, and action bar are displayed is the title bar. I want to hide the status bar in my application, but display the action bar. Is it possible?

+6
source share
1 answer

Write the following in Activity after onCreate:

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

Here is a screenshot:

enter image description here

+11
source

Source: https://habr.com/ru/post/974137/


All Articles