1

i am implementing the navigation view support by android design library, i have added menu item from xml. but one of my item is a notification and i want to add some text view to show the number for notification. How can i do that?? please help?

Draweritem.xml

<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">

    <group
        android:id="@+id/g1"
        android:checkableBehavior="single">

        <item
            android:id="@+id/Home"
            android:checked="false"
            android:icon="@drawable/home3"
            android:title="@string/inbox_string" />

        <item
            android:id="@+id/Cards"
            android:checked="false"
            android:icon="@drawable/card"
            android:title="Payment Option" />

        <item
            android:id="@+id/Account"
            android:checked="false"
            android:icon="@drawable/user11"
            android:title="@string/starred_string" />

        <item
            android:id="@+id/Credits"
            android:checked="false"
            android:icon="@drawable/earn"
            android:title="@string/sent_mail_string" />


        <item
            android:id="@+id/Logout"
            android:checked="false"
            android:icon="@drawable/exit"
            android:title="@string/spam_string" />


        <item
            android:id="@+id/Support"
            android:checked="false"
            android:icon="@drawable/support"
            android:title="@string/all_mail_string" />


        <item
            android:id="@+id/Feedback"
            android:checked="false"
            android:icon="@drawable/feedback"
            android:title="@string/trash_string" />



        <item
            android:id="@+id/navigation_sub_item_2"
            android:icon="@drawable/star"
            android:title="@string/navigation_item_2" />

</group>

</menu>
Aman Verma
  • 3,155
  • 7
  • 30
  • 60
  • Possible duplicate of http://stackoverflow.com/questions/30560663/navigationview-menu-items-with-counter-on-the-right ? – Hamid Khan Aug 22 '16 at 09:53

0 Answers0