Search code examples
androidandroid-studiostatusbarnavigationbar

Hide status bar or empty it permanently


In my app, there is no need of the status and navigation bar.

I did find solutions to hide the status / navigation bar but you can still pull them back. I was thinking about doing two things. One would be to create a Thread that checks if the status bar is opening, so it can hide immediately. This just seems to be a very dodgy thing to me.

I spoke to a guy who was involved in a similar project years ago and he said they achieved that they didn't hide the status bar but it was completely empty and when you tried to pull it down it was about 1mm long and was completely useless.

I might would like to try to go this way.

Can you guys give me a few examples of how to: - get a rid of the battery icon - get a rid of the time - get a rid of the notifications ...etc

So basically make it to be completely empty?


Solution

  • As I am working on creating a special purpose machine and I need the android device to do only 1 thing I ended up creating my own AOSP build with the following mod:

    The status bar layout is here:

    frameworks/base/packages/SystemUI/res/layout/status_bar.xml

    Did change the height to 0dp.

    Works perfectly fine, there is no status bar anymore. Thanks everyone who downvoted the question.

    It is also possible to "empty" the status bar by making the icons visibility to GONE (AOSP custom build solution again)...