Search Unity

How to hide Android Softkeys Navigation Bars?

Discussion in 'Android' started by DavidC02, Feb 26, 2013.

  1. DavidC02

    DavidC02

    Joined:
    Jul 19, 2011
    Posts:
    152
    Has anyone been able to achieve this? On devices like the Galaxy Nexus there are no physical buttons, but onscreen buttons which can't seem to be easily hidden using Unity.

    Is there a simple way to hide them?

    Thanks.
     
  2. miksumortti

    miksumortti

    Joined:
    Apr 7, 2012
    Posts:
    204
    Calling something like this with Java plugin should hide them (doesn't work on honeycomb if I remember correctly, and in Unity 4 it reverted itself back to 'low profile'-mode in a quick test...)
    Code (csharp):
    1.        View bView = your-activity-here.getWindow().getDecorView();
    2.        bView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
    Or this if you want to only fade them to dots (works also on honeycomb, and Unity 4 does this automatically)
    Code (csharp):
    1.        View bView = your-activity-here.getWindow().getDecorView();
    2.        bView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);