Implementation of menu displaying icon and text at the same time in Android

@H_ 403_ 1@Android Implementation of displaying icons and text simultaneously in menu

@H_ 403_ 1 @ Preface:

When setting showasaction = "never" for the menu entry in the activity, only the text title is displayed by default, and the icon icon is not displayed. You can override onmenupened() in the activity to make its icon visible through reflection.

Implementation effect diagram:

Next, post my menu.xml

If you have any questions, please leave a message or go to the community of this site for exchange and discussion. Thank you for reading. I hope it can help you. Thank you for your support to this site!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>