Check out SYSTEM_UI_FLAG_HIDE_NAVIGATION
, this flag hides the navigation bar until the user interacts with the device. It was introduced in Android 4.0. You can enable this flag for example like this:
getWindow().getDecorView()
.setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
Note that the navigation won't disappear again automatically, you have to set it every time after the user interacted with the device.
Alternatively you can make the navigation less obtrusive by using SYSTEM_UI_FLAG_LOW_PROFILE
, this changes the buttons into small dots (e.g. like the camera app).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…