简体   繁体   中英

How to change the bottom on screen soft navigation background and icon color in android?

I want to change the background color of this soft on screen navigation from black to blue. Twitter android app has done it. I did this,

@color/colorPrimaryDark

Before adding the navigationBarColor tag in styles.xml

之前

After adding the navigationBarColor tag in styles.xml

在此处输入图片说明

I cannot find a way to change the icon colors to dark.

Here is my styles.xml

 <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <!-- Customize your theme here. -->
        <item name="android:windowContentTransitions">true</item>
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
        <item name="android:statusBarColor">@color/colorPrimaryDark</item>
        <item name="android:windowLightStatusBar">true</item>
        <item name="android:colorEdgeEffect">@color/subtleGrey</item>
        <item name="actionButtonStyle">@style/myActionButtonStyle</item>
        <item name="android:splitMotionEvents">false</item>
        <item name="android:windowEnableSplitTouch">false</item>
        <item name="android:navigationBarColor">@color/colorPrimaryDark</item>
</style>
    <item name="android:navigationBarColor" tools:targetApi="lollipop">@color/colorPrimary
    </item>

try it

After a while, I got this.

    <item name="android:windowLightNavigationBar">true</item>

Adding this solved my problem!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM