I want to create Bottom navigation view in my app which has text something like this in screenshot below
Here in this screenshot GN is showing how can I add this in my bottom nav bar.I have added it in menu but its not showing properly like screenshot.
Below is my code:
<com.google.android.material.bottomnavigation.BottomNavigationView
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="#fff"
android:layout_alignParentBottom="true"
android:id="@+id/navView"
app:itemIconTint="@drawable/nav_check"
app:itemTextColor="@drawable/nav_check"
app:menu="@menu/bottom_menu" />
bottom_menu.xml
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<item
android:id="@+id/randomFragment"
android:title="GN"
tools:ignore="HardcodedText" />
<item
android:id="@+id/homeFragment2"
android:icon="@drawable/ic_search"
android:title=""
tools:ignore="HardcodedText" />
<item
android:id="@+id/cartFragment"
android:icon="@drawable/ic_cart"
android:title=""
tools:ignore="HardcodedText" />
<item
android:id="@+id/accountFragment2"
android:icon="@drawable/ic_person"
tools:ignore="HardcodedText"
android:title="" />
</menu>
Someone please let me know how can I achieve desired layout. Any help would be appreciated.
THANKS
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…