Color selected bottom nav item with accent color when theme isn't blue
This commit is contained in:
parent
5d1ca64768
commit
371b0b2132
8
app/src/main/res/color/bottom_nav_selector.xml
Normal file
8
app/src/main/res/color/bottom_nav_selector.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Based on mtrl_bottom_nav_colored_item_tint
|
||||
-->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:alpha="1.0" android:color="?attr/colorAccentOnPrimary" android:state_checked="true"/>
|
||||
<item android:alpha="0.6" android:color="?attr/colorOnPrimary"/>
|
||||
</selector>
|
@ -44,9 +44,11 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
app:itemIconTint="@color/bottom_nav_selector"
|
||||
app:itemTextColor="@color/bottom_nav_selector"
|
||||
app:labelVisibilityMode="labeled"
|
||||
app:layout_insetEdge="bottom"
|
||||
app:layout_behavior="@string/hide_bottom_view_on_scroll_behavior"
|
||||
app:layout_insetEdge="bottom"
|
||||
app:menu="@menu/bottom_nav" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
Loading…
Reference in New Issue
Block a user