Color selected bottom nav item with accent color when theme isn't blue

This commit is contained in:
arkon 2020-09-26 19:27:39 -04:00
parent 5d1ca64768
commit 371b0b2132
2 changed files with 11 additions and 1 deletions

View 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>

View File

@ -44,9 +44,11 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="bottom" android:layout_gravity="bottom"
app:itemIconTint="@color/bottom_nav_selector"
app:itemTextColor="@color/bottom_nav_selector"
app:labelVisibilityMode="labeled" app:labelVisibilityMode="labeled"
app:layout_insetEdge="bottom"
app:layout_behavior="@string/hide_bottom_view_on_scroll_behavior" app:layout_behavior="@string/hide_bottom_view_on_scroll_behavior"
app:layout_insetEdge="bottom"
app:menu="@menu/bottom_nav" /> app:menu="@menu/bottom_nav" />
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>