vikramkakkar / SublimeNavigationView

...is a complete rewrite of NavigationView (from Design Support library) that enables - usage of Checkboxes, Switches & Badges as menu items - XML definition - Parcelable menus - collapsible/expandable menu-groups - multiple menus - custom styling.
Apache License 2.0
309 stars 42 forks source link

How can I add textItem without a group? #28

Open rajputvishal opened 7 years ago

rajputvishal commented 7 years ago

I am creating a menu which is a combination of groups and independent items. In the APIs there is no option to add textItem without a group ID.

Could anyone guide me on this?

Thanks you

IntelliJAbhishek commented 7 years ago

you can do this just put text direct child to menu no need to add group like this

<menu xmlns:android="http://schemas.android.com/apk/res/android"`
xmlns:app="http://schemas.android.com/apk/res-auto"> 
<Text
        android:id="@+id/nav_twitter"
        android:title="Follow us on Twitter"
        android:icon="@drawable/twitter_social_outlined_black_24dp"/>
</menu>
rajputvishal commented 7 years ago

Is there is any way to do this through code? My menu is dynamic.