0

My app hides the system UI and hence cant see the soft buttons on Nexus 5. I have the following code to hide the soft buttons

  public void hideSystemUI() {
    View mDecorView = getWindow().getDecorView();
    mDecorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE
            | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
            | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
            | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
            | View.SYSTEM_UI_FLAG_FULLSCREEN
            | View.SYSTEM_UI_FLAG_LOW_PROFILE
            | View.SYSTEM_UI_FLAG_IMMERSIVE);
}

So far so good. My app also starts an intent to open up the maps, as follows

String uri = "http://maps.google.com?saddr=Current+Location&daddr=85041";  
Intent intent = new Intent(android.content.Intent.ACTION_VIEW,
        Uri.parse(uri));
intent.setClassName("com.google.android.apps.maps",
        "com.google.android.maps.MapsActivity");
startActivityForResult(intent,REQUEST_INTENT_MAPS);
hideSystemUI();

As you can see the last line of second snippet above calls the first snippet to hide the system UI (soft buttons). But when maps opens up, I still see the soft buttons (attached the screen shot of the same).

How can I hide the system UI (soft buttons on nexus 5) when an intent opens up another application

How to hide the 3 soft buttons at the bottom of the picture

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
mobileDev
  • 1,358
  • 2
  • 14
  • 34

0 Answers0