Adding spinner to new NavigationView in android design support library

With the new NavigationView in android we can create boxes like the one below (src: http://android-developers.blogspot.in/2015/05/android-design-support-library.html )

<android.support.design.widget.NavigationView
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        app:menu="@menu/drawer"/>

      

Now each list item in a box can be defined as a menu:

<group android:checkableBehavior="single">
<item
    android:id="@+id/navigation_item_1"
    android:checked="true"
    android:icon="@drawable/ic_android"
    android:title="@string/navigation_item_1"/>
<item
    android:id="@+id/navigation_item_2"
    android:icon="@drawable/ic_android"
    android:title="@string/navigation_item_2"/>
</group>

      

My navbox has a header and a list of items, 1 of those items is a spinner selector where the remainder is the one click items.

So what is the best way I can have a counter inside a list of items?

+3


source to share





All Articles