【发布时间】:2017-08-22 12:03:59
【问题描述】:
我正在尝试以全屏(沉浸式模式)打开下拉微调器,但问题是当下拉菜单打开时,它会在底部显示半透明导航栏。选择选项时导航栏会隐藏,但只要下拉菜单可见,导航栏就会保持可见。
我能够在对话框片段中删除此行为,因为我有 show(FragmentManager manager, String tag) 方法来覆盖和添加它
getDialog().getWindow().getDecorView().setSystemUiVisibility(getActivity()
.getWindow().getDecorView().getSystemUiVisibility());
// Make the dialogs window focusable
again.getDialog().getWindow().clearFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE);
但在微调器中没有类似的方法可用。我尝试使用父级中的侦听器实现将这些方法放在performClick() 中,但仍然没有运气。
此问题的任何解决方案。
【问题讨论】:
-
@UmarHussain 找到解决方案了吗?
-
不,我找不到解决方案,所以我只是接受了这种行为。但在可能的情况下,我使用对话框片段中的列表作为替代方案。
标签: android android-spinner android-immersive android-navigation-bar