Android: Custom view for a menu item

前端 未结 1 1315
孤独总比滥情好
孤独总比滥情好 2021-01-04 19:45

I want to be able to specify a custom view for a MenuItem.

I want to display an indicator on a shopping cart menu item in the action bar displaying how many items a

相关标签:
1条回答
  • 2021-01-04 20:32

    To use a custom view on a MenuItem call setActionView(View view).

    You can supply either an already inflated view or a layout resource ID.

    0 讨论(0)
提交回复
热议问题