将 listview 添加到 PopupWindow 对象,单击时导航键栏弹出,是否有一种方法可以在单击下拉菜单时阻止导航栏。
问问题
1076 次
1 回答
1
在下拉项目的onclick上尝试这个片段
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);
于 2016-10-07T10:58:02.313 回答