因此,当我强制我的应用程序进入浅色主题时,我的应用程序没有将其图标更改为深色,因此我遇到了一个问题。status bar
我发现了问题的根源,即当我拥有标志并应用于 .当我删除这两个标志时,中的图标是适当的黑暗。status bar
SYSTEM_UI
LAYOUT_STABLE
LAYOUT_FULLSCREEN
Activity
status bar
但是我对上面的这个“解决方案”的问题是,我使用2个标志,以便使我的活动内容滚动到下面,我已经使它半透明。我还没有想出另一种方法来使我接受透明,并在其下方滚动内容,除了使用我目前拥有的2标志,这些标志再次和。SYSTEM_UI
status bar
status bar
SYSTEM_UI
Activity
SYSTEM_UI_FLAG_LAYOUT_STABLE
SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
有没有人知道我如何解决这个问题?
也许有人可以向我展示一种可靠的方法来让我接受透明度,并让内容滚动到它下面,而不必使用标志?这可能会解决我的问题,我认为...status bar
SYSTEM_UI
我能想到的唯一与共享相关的代码是这样的:
在我的主活动.java中,我有这个集合:
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);`
在我的风格中.xml,我为以下主题设置了这个主题:Light Theme
<!-- Toolbar/NoActionBar variant of default Light Theme --> <style name="AppTheme_Light_NoActionBar" parent="Theme.AppCompat.Light.NoActionBar"> <item name="colorPrimary">@color/pure_white_transparent</item> <item name="colorPrimaryDark">@color/pure_white_transparent</item> <item name="colorAccent">@color/colorAccent</item> <item name="android:windowActionBarOverlay">true</item> <item name="android:windowTranslucentStatus">false</item> <item name="android:windowDrawsSystemBarBackgrounds">true</item> <item name="android:statusBarColor">@color/pure_white_transparent</item> <item name="android:windowLightStatusBar">true</item> <item name="android:navigationBarColor">@color/pure_white</item> <item name="android:windowLightNavigationBar">true</item> </style>
有什么想法吗?
蝴蝶刀刀
相关分类