白色的导航栏,带有灰色图标 [英] White navigationbar with grey icons
本文介绍了白色的导航栏,带有灰色图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在我的android应用中获得此样式?白色的导航栏和灰色的图标.打开应用程序抽屉时就是一个例子.
How can I get this style in my android app? White navigationbar and grey icons. An example is when opening the application drawer.
我尝试了许多选择,但没有成功. minSdkVersion的应用程序是21,棒棒糖.
I have tried many options but without success. the application minSdkVersion is 21, lollipop.
我已经看到了这种解决方案,但是我没有设法应用它:
I have seen this solution, but I have not managed to apply it:
非常感谢.
推荐答案
对于API> = 23
尝试:
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
OR :
<item name="android:windowLightStatusBar">true</item>
<item name="colorPrimary">@color/colorWhite</item>
<item name="colorPrimaryDark">#colorPrimaryDak</item>
<item name="colorAccent">@color/colorAccent</item>
对于API< 23
在v21/样式下对此进行声明.
Declare this under v21/style.
<item name="colorPrimaryDark" tools:targetApi="23">@color/colorPrimary</item> // white
<item name="android:windowLightStatusBar" tools:targetApi="23">true</item>
更新:
<item name="colorPrimaryDark">@color/colorPrimary</item> // white
<item name="android:windowLightStatusBar" tools:targetApi="23">true</item>
这篇关于白色的导航栏,带有灰色图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文