neither nesting nor movement of menuItems and groups up and down wrt each other is taking place. Android Studio version - 2.3.1 enter image description here
1 Answer
here is the code you can use,
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.example.akshaymanagooli.adggbtbrt.MainActivity">
<item
android:id="@+id/action_settings"
android:orderInCategory="100"
android:title="settings"
app:showAsAction="never" />
<item
android:id="@+id/item"
android:orderInCategory="100"
android:title="items"
app:showAsAction="never" >
<menu>
<item
android:id="@+id/item1"
android:orderInCategory="100"
android:title="item 1"
app:showAsAction="never" />
<item
android:id="@+id/item2"
android:orderInCategory="100"
android:title="item 2"
app:showAsAction="never" />
</menu>
</item>
</menu>
So idea is inside an item create a new menu block and add your sub items in there so it'll show you a arrow mark like dropdown thing.
-
just open the text tab and you can do these changes. Commented Apr 18, 2017 at 13:23
-
Why it is not possible through component tree, without using xml? I am new to android development .– VipinCommented Apr 18, 2017 at 13:27
-
I am also still learning but , dont get addicted to drag and drop, best way is to do in text coz you will have more control Commented Apr 18, 2017 at 13:33
-
-