0

how to add a text over the item of bottomnavigationview?

  <com.google.android.material.bottomnavigation.BottomNavigationView
            android:id="@+id/bottomNavigationView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentBottom="true"
            android:background="@color/lightGray"
            android:layoutDirection="rtl"
            app:itemIconTint="@drawable/nav_color_selecton"
            app:itemTextAppearanceActive="@style/bottom_navigation_textappreance"
            app:itemTextAppearanceInactive="@style/bottom_navigation_textappreance"
            app:itemTextColor="@drawable/nav_color_selecton"
            app:menu="@menu/bottom_nav_menu"
            android:elevation="0dp"
           />

in menu I add tooltipText for an item. but it doesn't show anything.

<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
     >
    <item
        android:id="@+id/nav2"
        android:icon="@drawable/ic_filter_list_green_24dp"
        android:title="nav2"

        />
     <item
        android:id="@+id/nav1"
        android:icon="@drawable/ic_baseline_more_horiz_24"
        android:title="more"
        android:tooltipText="123"
        />

</menu>

I want to have something like this: picture of it

sara
  • 1
  • 1
  • You can use this library https://github.com/ittianyu/BottomNavigationViewEx – Khemraj Sharma Jul 23 '20 at 10:53
  • you can use `Material Bottom Navigation` and add `Badge` to view. check https://material.io/develop/android/components/bottom-navigation and https://stackoverflow.com/questions/42682855/ – Ehsan msz Jul 23 '20 at 11:16

0 Answers0