SubMenu Layout Android

2020-05-03 11:45发布

I have read that submenus in Android do not support icons. I was wondering if this has changed, or if there is a similar way to produce a "submenu" that does support icons?

Currently This is My Submenu: enter image description here

Here Is the XML File For It:

<menu>
    <item android:id="@+id/facebook_icon"
        android:title="Share With Facebook"
        android:icon="@drawable/ic_menu_facebook" />

    <item android:id="@+id/twitter_icon"
        android:title="Share With Twitter"
        android:icon="@drawable/ic_menu_twitter" />         
</menu>

I want it to look like this (If you have any ideas I would appreciate hearing them!): enter image description here

1条回答
The star\"
2楼-- · 2020-05-03 12:09

You can create your own dialog instead of the submenu, and make it look any way you want.

查看更多
登录 后发表回答