How to summarize Android BottomNavigation

Asked 2 years ago, Updated 2 years ago, 119 views

<android.support.design.widget.BottomNavigationView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/navigation"
    android:layout_width="match_parent"
    android:layout_height="56dp"
    android:layout_alignParentBottom="true"
    android:background="@color/colorPrimary"
    app:itemIconTint="#FFF"
    app:itemTextColor="#FFF"
    app:menu="@menu/footer_menu"/>

It's a typical BottomNavigation, but it's not cool to copy it to all activities, so

<android.support.design.widget.BottomNavigationView
    android:id="@+id/navigation"
    style="@style/Footer"/>

I'd like to summarize it in style like this, but how can I write app:itemIconTint in style?

android android-layout

2022-09-30 14:18

1 Answers

If you ignore the app and write it like this, it will work.

<style name="Footer">
    <item name="itemIconTint">#FFF</item>
</style>


2022-09-30 14:18

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.