I am using "Navigation Drawer Activity" template from latest Android Studio (2021.2.1 Patch 2) as a start.
How can I hide navigation bar completely? Following code only hides the buttons but navigation bar's white background still exists.
View decorView = getWindow().getDecorView();
int uiOptions = SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);
Thanks.