Java tutorial
//package com.java2s; import android.app.Activity; import android.view.View; import android.view.WindowManager; public class Main { public static void hideNavBar(Activity activity) { View decorView = activity.getWindow().getDecorView(); int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY; decorView.setSystemUiVisibility(uiOptions); activity.getWindow().setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION, WindowManager.LayoutParams.FLAG_FULLSCREEN); } }