oncreateoptionMenu in android toolbar -
hello friends want create option menu below image
so create below menu.xml file:
<?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/live_cart" android:orderincategory="100" android:showasaction="always" android:icon="@drawable/cart" android:title=""/> <item android:id="@+id/overflow" android:orderincategory="100" android:showasaction="always" android:icon="@drawable/ic_menu_overflow" android:title=""> <menu> <item android:id="@+id/action_dasbboard" android:title="logout" android:showasaction="never" /> <item android:id="@+id/export_data" android:title="my accout" android:showasaction="never" /> <item android:id="@+id/action_help" android:title="wishlist" android:showasaction="never" /> <item android:id="@+id/action_feedback" android:title="track order" android:showasaction="never" /> <item android:id="@+id/about" android:title="help" android:showasaction="never" /> <item android:id="@+id/terms" android:title="legal" app:showasaction="never"/> </menu> </item> </menu>
when run above code come below
it coming 1 option how can solve problem idea?
insert
<item android:id="@+id/live_cart" android:orderincategory="100" app:showasaction="always" android:icon="@drawable/cart" android:title=""/>
try this
Comments
Post a Comment