dependencies {
implementation 'com.android.support:appcompat-v7:X.X.X'
implementation 'com.android.support:design:X.X.X'
// donde X.X.X es la versión que prefieras usar
}
<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/bottombar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_gravity="bottom|end"
android:background="@color/colorPrimary"
app:itemBackground="@drawable/bottombar_itembackground"
app:itemIconTint="@color/textColorWhite"
app:itemTextColor="@color/textColorWhite"
app:menu="@menu/bottombar_menu"
/>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:id="@+id/search"
android:title="@string/tab_search"
android:icon="@drawable/ic_search"
/>
<item
android:id="@+id/home"
android:title="@string/tab_home"
android:icon="@drawable/ic_home"
/>
<item
android:id="@+id/profile"
android:icon="@drawable/ic_user"
android:title="@string/tab_profile" />
</menu>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_checked="true" android:drawable="@color/colorPrimaryDark"/>
<item android:state_pressed="true" android:drawable="@color/colorPrimaryDark"/>
<item android:drawable="@color/colorPrimary" />
</selector>
Por defecto el botón tendrá el colorPrimary.
Cuando el botón sea presionado y cuando esté seleccionado, tendrá el colorPrimaryDark.
Listo, ya el ButtonNavigationView tiene el estilo que deseamos.
Hi there are more exited games are add this website if you are like the more games to help this website play spades because this link are key of the more games when you are fell the board to play the more games.