Change Navigation Bar Icon Color on Android

Android navigation bar icons color

In themes.xml added to my theme

<item name="android:navigationBarColor">@color/transparent</item>
<item name="android:windowLightNavigationBar">true</item>

How to change the color of the icons in the navigation bar in Jetpack Compose?

Because your navigation bar is light, you can use this function to make the icon on navigation bar easy to see

class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

WindowInsetsControllerCompat(window, window.decorView).isAppearanceLightNavigationBars = true
setContent {
...
}
}
}

How to change Toolbar home icon color

I solved it by editing styles.xml:

<style name="ToolbarColoredBackArrow" parent="AppTheme">
<item name="android:textColorSecondary">INSERT_COLOR_HERE</item>
</style>

...then referencing the style in the Toolbar definition in the activity:

<LinearLayout
android:id="@+id/main_parent_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

<android.support.v7.widget.Toolbar
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/toolbar"
app:theme="@style/ToolbarColoredBackArrow"
app:popupTheme="@style/AppTheme"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize"
android:background="?attr/colorPrimary"/>

How to change the icon color selected on bottom navigation bar in android studio

To change the selected tab icon color in BottomNavigationView you should use the Selector.

Create bottom_navigation_selector.xml

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true" android:color="@color/yourSelectedColor" />
<item android:color="@color/defaultColor" />
</selector>

Apply app:itemIconTint="@drawable/bottom_navigation_selector" to your BottomNavigationView in xml file.

How to set status bar icon color in Flutter?

Colour of status-bar icon is depend on color of appbar. You can try edit systemOverlayStyle of AppBar on Home Screen ?

https://api.flutter.dev/flutter/material/AppBar/systemOverlayStyle.html



Related Topics



Leave a reply



Submit