Search code examples
androidnavigationbarkindle-fire

Hide navigation bar for kindle fire 3 and kindle fire HDX


My code :

 s_activity.runOnUiThread(new Runnable()
            {
                @Override
                public void run()
                {   
                        //hide nub
                        View view = s_activity.getWindow().getDecorView().findViewById(android.R.id.content).getRootView();
                        view.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE | View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
                }
            });

I use this code to hide the nub bar while playing the game. But it only works with devices: KF 1, 2. As for KF 3, the nub bar is not really hidden. It's just hidden in 1 second. Then nub bar will show if there is no interaction with the screen. So how to nub bar does not show while my application is running??


Solution

  • There seems to have been a bug with Fire OS 3.0 and 3.1 and the SYSTEM_UI_FLAG_FULLSCREEN. They claim it was fixed in Fire OS 3.2.1. Link: https://forums.developer.amazon.com/forums/thread.jspa?messageID=6004&#6004

    If you upgrade to latest perhaps the SYSTEM_UI_FLAG_FULLSCREEN flag will work. I am using SYSTEM_UI_FLAG_LOW_PROFILE which still doesn't work on 3rd generation Kindle, which I reported here: https://forums.developer.amazon.com/forums/thread.jspa?threadID=3514