Zef
Zef

Reputation: 51

Android immersive mode for dropdown, hide navigation Bar

added listview to PopupWindow object, on click Navigation key bar is popping, is there is a way to block navigation bar on click of dropdown.

Upvotes: 2

Views: 1293

Answers (1)

brahmy adigopula
brahmy adigopula

Reputation: 617

try this snippet inside on onclick of drop down item

View decorView = getWindow().getDecorView();
// Hide both the navigation bar and the status bar.
// 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 bar whenever you
// hide the navigation bar.
int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
              | View.SYSTEM_UI_FLAG_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);

and refer here and here

Upvotes: 1

Related Questions