Question

I have been searching high and low how to hide the status bar on the Android tablet. I know it is not possible to do so unless you root the tablet.

The main pain I have is when I write on my App, the wi-fi section pops-up.

I know of the flags View.SYSTEM_UI_FLAG_HIDE_NAVIGATION or SYSTEM_UI_FLAG_LOW_PROFILE that hide navigation / dim navigation.

What I need is : There is a feature in the the Gallery Application (in-built in android) that lets you traverse through the images and only pops the navigation on single touch and hides on single touch. No other gesture triggers this bar.

I need some way to implement something similar.

I'd be much obliged if someone can point me in the right direction.

Details :

Tablet :Samsung Galaxy Note 10.1 Android Version : 4.1.2

Was it helpful?

Solution

Actually in the Tablets with 4+ Android versions there is not possible to hide it, but you can try to do it like this:

The SYSTEM_UI_FLAG_LOW_PROFILE flag replaces the STATUS_BAR_HIDDEN flag. When set, this flag enables “low profile" mode for the system bar or navigation bar. Navigation buttons dim and other elements in the system bar also hide. Enabling this is useful for creating more immersive games without distraction for the system navigation buttons.

The SYSTEM_UI_FLAG_VISIBLE flag replaces the STATUS_BAR_VISIBLE flag to request the system bar or navigation bar be visible.

The SYSTEM_UI_FLAG_HIDE_NAVIGATION is a new flag that requests the navigation bar hide completely. Be aware that this works only for the navigation bar used by some handsets (it does not hide the system bar on tablets). The navigation bar returns to view as soon as the system receives user input. As such, this mode is useful primarily for video playback or other cases in which the whole screen is needed but user input is not required. You can set each of these flags for the system bar and navigation bar by calling setSystemUiVisibility() on any view in your activity. The window manager combines (OR-together) all flags from all views in your window and apply them to the system UI as long as your window has input focus. When your window loses input focus (the user navigates away from your app, or a dialog appears), your flags cease to have effect. Similarly, if you remove those views from the view hierarchy their flags no longer apply.

Another solution that I found was to ser the view of your layout like this:

yourView.setSystemUiVisibility(8);

They say it works on tablets but I haven't really try it on.

Another one is adding this method and just pass a True or False according to what you want to show:

 void setNavVisibility(boolean visible) {
        int newVis = mBaseSystemUiVisibility;
        if (!visible) {
            newVis |= SYSTEM_UI_FLAG_LOW_PROFILE | SYSTEM_UI_FLAG_FULLSCREEN;
        }
        final boolean changed = newVis == getSystemUiVisibility();

        // Unschedule any pending event to hide navigation if we are
        // changing the visibility, or making the UI visible.
        if (changed || visible) {
            Handler h = getHandler();
            if (h != null) {
                h.removeCallbacks(mNavHider);
            }
        }

        // Set the new desired visibility.
        setSystemUiVisibility(newVis);
        mTitleView.setVisibility(visible ? VISIBLE : INVISIBLE);
        mSeekView.setVisibility(visible ? VISIBLE : INVISIBLE);
    }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top