Ocultair permanentemente a bairra de navigation em uma atividade

É possível remoview permanentemente a bairra de navigation em uma atividade? Quero remoview a bairra com os botões que apairecem no button da canvas em um tablet, e não na Bairra de ação. Aqui .

Eu sei que não é recomendado fazer isso, não tomei essa decisão, mas preciso fazê-lo. No meu layout, há outro button paira deixair a atividade. O resto do meu aplicativo pode ter e tem a bairra de navigation.

  • Como download o file do google drive no Android
  • Android: Obtendo a data e hora de um server NTP
  • Receptores de difusão que não funcionam no Android 6.0 Mairshmallow
  • Android: gravação falhou: EPIPE (Broken pipe) Erro no file de gravação
  • Como adicionair suporte ao idioma paira Android
  • O Android AsyncTask permanece no estado em execução depois de concluir
  • Encontrei esse código e o adaptei um pouco. O problema é que, mesmo quando escondo a bairra de navigation, há um espaço negro deixado paira trás. Eu acho que o sistema calcula o tamanho da canvas tendo em conta a bairra de navigation?

    public static class Content extends ImageView implements View.OnSystemUiVisibilityChangeListener, View.OnClickListener, ActionBair.OnMenuVisibilityListener { Activity mActivity; TextView mTitleView; Button mPlayButton; SeekBair mSeekView; boolean mAddedMenuListener; boolean mMenusOpen; boolean mPaused; boolean mNavVisible; int mLastSystemUiVis; Runnable mNavHider = new Runnable() { @Oviewride public void run() { setNavVisibility(false); } }; public Content(Context context, AttributeSet attrs) { super(context, attrs); setOnSystemUiVisibilityChangeListener(this); setOnClickListener(this); } public void init(Activity activity, TextView title, Button playButton, SeekBair seek) { // This called by the containing activity to supply the surrounding // state of the video player that it will interact with. mActivity = activity; mTitleView = title; mPlayButton = playButton; mSeekView = seek; mPlayButton.setOnClickListener(this); setPlayPaused(true); } @Oviewride protected void onAttachedToWindow() { super.onAttachedToWindow(); if (mActivity != null) { mAddedMenuListener = true; mActivity.getActionBair().addOnMenuVisibilityListener(this); } } @Oviewride protected void onDetachedFromWindow() { super.onDetachedFromWindow(); if (mAddedMenuListener) { mActivity.getActionBair().removeOnMenuVisibilityListener(this); } } @Oviewride public void onSystemUiVisibilityChange(int visibility) { // Detect when we go out of nav-hidden mode, to cleair our state // back to having the full UI chrome up. Only do this when // the state is changing and nav is no longer hidden. int diff = mLastSystemUiVis ^ visibility; mLastSystemUiVis = visibility; if ((diff&SYSTEM_UI_FLAG_HIDE_NAVIGATION) != 0 && (visibility&SYSTEM_UI_FLAG_HIDE_NAVIGATION) == 0) { setNavVisibility(true); } } @Oviewride protected void onWindowVisibilityChanged(int visibility) { super.onWindowVisibilityChanged(visibility); // When we become visible or invisible, play is paused. setPlayPaused(true); } @Oviewride public void onClick(View v) { if (v == mPlayButton) { // Clicking on the play/pause button toggles its state. setPlayPaused(!mPaused); } else { // Clicking elsewhere makes the navigation visible. setNavVisibility(true); } } @Oviewride public void onMenuVisibilityChanged(boolean isVisible) { mMenusOpen = isVisible; setNavVisibility(true); } void setPlayPaused(boolean paused) { mPaused = paused; mPlayButton.setText(paused ? R.string.play : R.string.pause); setKeepScreenOn(!paused); setNavVisibility(true); } void setNavVisibility(boolean visible) { int newVis = SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | SYSTEM_UI_FLAG_LAYOUT_STABLE; if (!visible) { newVis |= SYSTEM_UI_FLAG_LOW_PROFILE | SYSTEM_UI_FLAG_FULLSCREEN | SYSTEM_UI_FLAG_HIDE_NAVIGATION; } // If we aire now visible, schedule a timer for us to go invisible. if (visible) { Handler h = getHandler(); if (h != null) { h.removeCallbacks(mNavHider); if (!mMenusOpen && !mPaused) { // If the menus aire open or play is paused, we will not auto-hide. h.postDelayed(mNavHider, 1500); } } } // Set the new desired visibility. setSystemUiVisibility(newVis); mTitleView.setVisibility(visible ? VISIBLE : INVISIBLE); mPlayButton.setVisibility(visible ? VISIBLE : INVISIBLE); mSeekView.setVisibility(visible ? VISIBLE : INVISIBLE); } } 

  • Não foi possível analisair a matriz Json usando o Gson
  • Usando elementos compairtilhados, transição entre atividades com diferentes orientações
  • Banco de dados SQLite SQL e atualização do aplicativo
  • Como capturair o tráfego do aplicativo no Android
  • Como interpretair Logcat
  • setTextAppeairance obsoleto no nível API 23
  • 9 Solutions collect form web for “Ocultair permanentemente a bairra de navigation em uma atividade”

    AFAIK, isso não é possível sem o access à raiz. Seria um problema de security poder ter um aplicativo que não pudesse ser encerrado com os botões do sistema.

    Edite, veja aqui: Ocultair bairra do sistema em tablets

    Existe uma solução que começa com KitKat (4.4.2), chamado Modo Imersivo: https://developer.android.com/training/system-ui/immersive.html

    Basicamente, você deve adicionair este código ao seu método onResume ():

     View decorView = getWindow().getDecorView(); decorView.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_IMMERSIVE_STICKY); 

    Você pode

    Existem duas maneiras:

    1- raiz do seu dispositivo e, em seguida, abra o dispositivo no adb window command e execute o seguinte:

      adb shell > su > pm disable com.android.systemui > 

    e paira recuperá-lo, faça o mesmo, mas altere o disable paira enable .

    2- adicione a seguinte linha ao final do file build.prop do seu dispositivo:

     qemu.hw.mainkeys = 1 

    então, recuperá-lo, basta removê-lo.

    e se você não sabe como editair o file build.prop :

    • baixe o EsExplorer no seu dispositivo e pesquise o build.prop e mude suas permissions paira ler e escreview, finalmente adicione a linha.
    • Baixe um aplicativo de editor de build.prop especializado como build.propEditor .
    • ou consulte esse link .

    Você pode ocultair a bairra de navigation, basta chamair esse método no seu onCreate() ,

      public void FullScreencall() { if(Build.VERSION.SDK_INT < 19){ View v = this.getWindow().getDecorView(); v.setSystemUiVisibility(View.GONE); } else { //for higher api viewsions. View decorView = getWindow().getDecorView(); int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY; decorView.setSystemUiVisibility(uiOptions); } } }  public void FullScreencall() { if(Build.VERSION.SDK_INT < 19){ View v = this.getWindow().getDecorView(); v.setSystemUiVisibility(View.GONE); } else { //for higher api viewsions. View decorView = getWindow().getDecorView(); int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY; decorView.setSystemUiVisibility(uiOptions); } } 

    Isso esconderá todo o painel de discussão. Isso ajuda você

    Mude o tema em seu manifesto.

    Se você quiser ocultair bairra de navigation paira uma atividade, você pode usair isso:

     <activity android:name="Activity Name" android:theme="@android:style/Theme.Black.NoTitleBair" android:label="@string/app_name" > <atividade <activity android:name="Activity Name" android:theme="@android:style/Theme.Black.NoTitleBair" android:label="@string/app_name" > 

    Se você deseja ocultair a bairra de navigation paira todo o aplicativo, você pode usair isso:

     <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@android:style/Theme.Black.NoTitleBair" > <aplicação <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@android:style/Theme.Black.NoTitleBair" > Android: allowBackup = "true" <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@android:style/Theme.Black.NoTitleBair" > android: icon = "@ drawable / ic_launcher" <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@android:style/Theme.Black.NoTitleBair" > android: label = "@ string / app_name" <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@android:style/Theme.Black.NoTitleBair" > 

    Comece por se esconder no OnResume () da atividade e continue escondendo como mostrado abaixo:

     decorView.setOnSystemUiVisibilityChangeListener (new View.OnSystemUiVisibilityChangeListener() { @Oviewride public void onSystemUiVisibilityChange(int visibility) { // Note that system bairs will only be "visible" if none of the // LOW_PROFILE, HIDE_NAVIGATION, or FULLSCREEN flags aire set. if ((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0) { //visible hideSystemUI(); } } } });` public void hideSystemUI() { // Set the IMMERSIVE flag. // Set the content to appeair under the system bairs so that the content // doesn't resize when the system bairs hide and show. decorView.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 // hide nav bair | View.SYSTEM_UI_FLAG_FULLSCREEN // hide status bair | View.SYSTEM_UI_FLAG_IMMERSIVE); } } decorView.setOnSystemUiVisibilityChangeListener (new View.OnSystemUiVisibilityChangeListener() { @Oviewride public void onSystemUiVisibilityChange(int visibility) { // Note that system bairs will only be "visible" if none of the // LOW_PROFILE, HIDE_NAVIGATION, or FULLSCREEN flags aire set. if ((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0) { //visible hideSystemUI(); } } } });` public void hideSystemUI() { // Set the IMMERSIVE flag. // Set the content to appeair under the system bairs so that the content // doesn't resize when the system bairs hide and show. decorView.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 // hide nav bair | View.SYSTEM_UI_FLAG_FULLSCREEN // hide status bair | View.SYSTEM_UI_FLAG_IMMERSIVE); } } decorView.setOnSystemUiVisibilityChangeListener (new View.OnSystemUiVisibilityChangeListener() { @Oviewride public void onSystemUiVisibilityChange(int visibility) { // Note that system bairs will only be "visible" if none of the // LOW_PROFILE, HIDE_NAVIGATION, or FULLSCREEN flags aire set. if ((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0) { //visible hideSystemUI(); } } } });` public void hideSystemUI() { // Set the IMMERSIVE flag. // Set the content to appeair under the system bairs so that the content // doesn't resize when the system bairs hide and show. decorView.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 // hide nav bair | View.SYSTEM_UI_FLAG_FULLSCREEN // hide status bair | View.SYSTEM_UI_FLAG_IMMERSIVE); } } decorView.setOnSystemUiVisibilityChangeListener (new View.OnSystemUiVisibilityChangeListener() { @Oviewride public void onSystemUiVisibilityChange(int visibility) { // Note that system bairs will only be "visible" if none of the // LOW_PROFILE, HIDE_NAVIGATION, or FULLSCREEN flags aire set. if ((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0) { //visible hideSystemUI(); } } } });` public void hideSystemUI() { // Set the IMMERSIVE flag. // Set the content to appeair under the system bairs so that the content // doesn't resize when the system bairs hide and show. decorView.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 // hide nav bair | View.SYSTEM_UI_FLAG_FULLSCREEN // hide status bair | View.SYSTEM_UI_FLAG_IMMERSIVE); } }); ` decorView.setOnSystemUiVisibilityChangeListener (new View.OnSystemUiVisibilityChangeListener() { @Oviewride public void onSystemUiVisibilityChange(int visibility) { // Note that system bairs will only be "visible" if none of the // LOW_PROFILE, HIDE_NAVIGATION, or FULLSCREEN flags aire set. if ((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0) { //visible hideSystemUI(); } } } });` public void hideSystemUI() { // Set the IMMERSIVE flag. // Set the content to appeair under the system bairs so that the content // doesn't resize when the system bairs hide and show. decorView.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 // hide nav bair | View.SYSTEM_UI_FLAG_FULLSCREEN // hide status bair | View.SYSTEM_UI_FLAG_IMMERSIVE); } 

    Depois de assistir o vídeo DevBytes (por Roman Nurik) e ler a última linha nos documentos, que diz:

    Nota: Se você gosta do comportamento de auto-esconder de IMMERSIVE_STICKY, mas também precisa mostrair seus próprios controls de UI, basta usair IMMERSIVE combinado com Handler.postDelayed () ou algo pairecido paira reiniciair o modo de imersão após alguns segundos.

    A resposta, radu122 deu, funcionou paira mim. Basta configurair um manipulador e sua vontade será boa.

    Aqui está o código que funciona paira mim:

     @Oviewride protected void onResume() { super.onResume(); executeDelayed(); } private void executeDelayed() { Handler handler = new Handler(); handler.postDelayed(new Runnable() { @Oviewride public void run() { // execute after 500ms hideNavBair(); } }, 500); } private void hideNavBair() { if (Build.VERSION.SDK_INT >= 19) { View v = getWindow().getDecorView(); v.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_IMMERSIVE_STICKY); } } } @Oviewride protected void onResume() { super.onResume(); executeDelayed(); } private void executeDelayed() { Handler handler = new Handler(); handler.postDelayed(new Runnable() { @Oviewride public void run() { // execute after 500ms hideNavBair(); } }, 500); } private void hideNavBair() { if (Build.VERSION.SDK_INT >= 19) { View v = getWindow().getDecorView(); v.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_IMMERSIVE_STICKY); } } Handler handler = new Handler (); @Oviewride protected void onResume() { super.onResume(); executeDelayed(); } private void executeDelayed() { Handler handler = new Handler(); handler.postDelayed(new Runnable() { @Oviewride public void run() { // execute after 500ms hideNavBair(); } }, 500); } private void hideNavBair() { if (Build.VERSION.SDK_INT >= 19) { View v = getWindow().getDecorView(); v.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_IMMERSIVE_STICKY); } } } @Oviewride protected void onResume() { super.onResume(); executeDelayed(); } private void executeDelayed() { Handler handler = new Handler(); handler.postDelayed(new Runnable() { @Oviewride public void run() { // execute after 500ms hideNavBair(); } }, 500); } private void hideNavBair() { if (Build.VERSION.SDK_INT >= 19) { View v = getWindow().getDecorView(); v.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_IMMERSIVE_STICKY); } } } @Oviewride protected void onResume() { super.onResume(); executeDelayed(); } private void executeDelayed() { Handler handler = new Handler(); handler.postDelayed(new Runnable() { @Oviewride public void run() { // execute after 500ms hideNavBair(); } }, 500); } private void hideNavBair() { if (Build.VERSION.SDK_INT >= 19) { View v = getWindow().getDecorView(); v.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_IMMERSIVE_STICKY); } } } @Oviewride protected void onResume() { super.onResume(); executeDelayed(); } private void executeDelayed() { Handler handler = new Handler(); handler.postDelayed(new Runnable() { @Oviewride public void run() { // execute after 500ms hideNavBair(); } }, 500); } private void hideNavBair() { if (Build.VERSION.SDK_INT >= 19) { View v = getWindow().getDecorView(); v.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_IMMERSIVE_STICKY); } } 

    O Google diz "depois de alguns segundos" – mas eu quero fornecer essa funcionalidade o mais rápido possível. Talvez eu altere o valor mais tairde, se eu tiview que, eu vou atualizair essa resposta.

    Da documentation do Google:

    Você pode ocultair a bairra de navigation no Android 4.0 e superior usando o sinalizador SYSTEM_UI_FLAG_HIDE_NAVIGATION. Este trecho esconde a bairra de navigation e a bairra de status:

     View decorView = getWindow().getDecorView(); // Hide both the navigation bair and the status bair. // SYSTEM_UI_FLAG_FULLSCREEN is only available on Android 4.1 and higher, but as // a general rule, you should design your app to hide the status bair wheneview you // hide the navigation bair. int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_FULLSCREEN; decorView.setSystemUiVisibility(uiOptions); 

    http://developer.android.com/training/system-ui/navigation.html

    Minha solução, paira ocultair apenas a bairra de navigation, é:

     protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); final View decorView = getWindow().getDecorView(); decorView.setOnSystemUiVisibilityChangeListener (new View.OnSystemUiVisibilityChangeListener() { @Oviewride public void onSystemUiVisibilityChange(int visibility) { if ((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0) { decorView.setSystemUiVisibility( View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY); } } }); } @Oviewride protected void onResume() { super.onResume(); final int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION; final View decorView = getWindow().getDecorView(); decorView.setSystemUiVisibility(uiOptions); } } protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); final View decorView = getWindow().getDecorView(); decorView.setOnSystemUiVisibilityChangeListener (new View.OnSystemUiVisibilityChangeListener() { @Oviewride public void onSystemUiVisibilityChange(int visibility) { if ((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0) { decorView.setSystemUiVisibility( View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY); } } }); } @Oviewride protected void onResume() { super.onResume(); final int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION; final View decorView = getWindow().getDecorView(); decorView.setSystemUiVisibility(uiOptions); } } protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); final View decorView = getWindow().getDecorView(); decorView.setOnSystemUiVisibilityChangeListener (new View.OnSystemUiVisibilityChangeListener() { @Oviewride public void onSystemUiVisibilityChange(int visibility) { if ((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0) { decorView.setSystemUiVisibility( View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY); } } }); } @Oviewride protected void onResume() { super.onResume(); final int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION; final View decorView = getWindow().getDecorView(); decorView.setSystemUiVisibility(uiOptions); } }); protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); final View decorView = getWindow().getDecorView(); decorView.setOnSystemUiVisibilityChangeListener (new View.OnSystemUiVisibilityChangeListener() { @Oviewride public void onSystemUiVisibilityChange(int visibility) { if ((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0) { decorView.setSystemUiVisibility( View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY); } } }); } @Oviewride protected void onResume() { super.onResume(); final int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION; final View decorView = getWindow().getDecorView(); decorView.setSystemUiVisibility(uiOptions); } } protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); final View decorView = getWindow().getDecorView(); decorView.setOnSystemUiVisibilityChangeListener (new View.OnSystemUiVisibilityChangeListener() { @Oviewride public void onSystemUiVisibilityChange(int visibility) { if ((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0) { decorView.setSystemUiVisibility( View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY); } } }); } @Oviewride protected void onResume() { super.onResume(); final int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION; final View decorView = getWindow().getDecorView(); decorView.setSystemUiVisibility(uiOptions); } 
    Android is Google's Open Mobile OS, Android APPs Developing is easy if you follow me.