I'd like to extend the discussion regarding hiding of the system/navigation bar at the bottom of the screen on Android Ice Cream Sandwich (4.0 and up) tablet devices.
There's already a thread ( Is there a way to hide the system bar in Android 3.0? It's an internal device and I'm managing navigation ) about hiding the bar on Honeycomb devices. My clients, however, will be using the newest Ice Cream Sandwich devices and are very keen on hiding the bar at the bottom the screen. Their application is not for regular consumer use and it's very important for them to take over the whole screen to provide their experience. How possible is it to hide this bar -- or at least, override the behaviour of all the buttons -- without rooting the devices or rewriting its firmware?
on rooted devices, i use the following adb command
to hide navigation bar permanently. To show it again, run
so far it's working fine for me
Using the below code is one way of doing it to hide navigation
But the problem with the above is that it becomes visible as soon as user touches the screen.
In Android Kitkat there is a feature called as
IMMERSIVE
which hides the notification bar and the navigation. It does not show even if the user interacts with the screen. However the user can make it visible by swiping it from top of the screen to bottom. Below is the code to achieve itHowever in my case I never wanted the navigation and notification bar to be visible even if the user swipes from top of the screen to bottom. I gave it a try and I was able to achieve it partially. What I did was I implemented a
CountDownTimer
which would callhideSystemUI()
every second or so. I know it is not the best way of doing it. But I did not get any other solution to do it.If someone gets any then please let me know on how to permanently hide navigation and notification bar :) Hope this answer helps some one in future :)
Watch this video to better understand about this feature.
You can hide the navigation bar on Android 4.0 and higher using the SYSTEM_UI_FLAG_HIDE_NAVIGATION flag. This snippet hides both the navigation bar and the status bar:
See the following: Hiding the Navigation Bar
Check out
SYSTEM_UI_FLAG_HIDE_NAVIGATION
, this flag hides the navigation bar until the user interacts with the device. It was introduced in Android 4.0. You can enable this flag for example like this:Note that the navigation won't disappear again automatically, you have to set it every time after the user interacted with the device.
Alternatively you can make the navigation less obtrusive by using
SYSTEM_UI_FLAG_LOW_PROFILE
, this changes the buttons into small dots (e.g. like the camera app).You can not hide it unless you have rooted the device. But of course there is a workaround which might not fit with your requirement but several well known apps in the market at the moment using this strategy to achieve this disable menu bar feature for their apps.
place this code in your application tag in manifest file to hide default tab bar
and the then make a linear or relative layout and place it in your activity layout.