White navigationbar with grey icons

北城余情 提交于 2019-12-21 05:49:23

问题


How can I get this style in my android app? White navigationbar and grey icons. An example is when opening the application drawer.

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:

Status bar turns white and does not show content behind it

Thanks in advanced.


回答1:


For API >= 23

Try :

getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); 

OR in style :

<item name="android:windowLightStatusBar">true</item>
<item name="colorPrimary">@color/colorWhite</item>
<item name="colorPrimaryDark">#colorPrimaryDak</item>
<item name="colorAccent">@color/colorAccent</item>

For API < 23

Declare this under v21/style.

<item name="colorPrimaryDark" tools:targetApi="23">@color/colorPrimary</item> // white
<item name="android:windowLightStatusBar" tools:targetApi="23">true</item>

UPDATE :

<item name="colorPrimaryDark">@color/colorPrimary</item> // white
<item name="android:windowLightStatusBar" tools:targetApi="23">true</item>


来源:https://stackoverflow.com/questions/49254877/white-navigationbar-with-grey-icons

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!