Rohan Patil
Rohan Patil

Reputation: 175

Dependency for bottom nav bar android studio

What line do we put in the app gradle file in the dependencies section? (implementation "?") Also do send a link where i can get the implementations of every such dependencies in android studio.

Upvotes: 0

Views: 3890

Answers (1)

Manish Stark
Manish Stark

Reputation: 161

You can add this dependency

    implementation 'com.google.android.material:material:1.0.0'

in layout xml write

 <com.google.android.material.bottomnavigation.BottomNavigationView
    android:id="@+id/bottom_navigation"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom"
    android:background="@color/colorPrimary"
    app:itemIconTint="@color/white"
    app:itemTextColor="@color/white"
    app:menu="@menu/bottom_navigation_menu" />

or you can refer this document..

https://material.io/develop/android/components/bottom-navigation-view/

Upvotes: 1

Related Questions