简体   繁体   中英

Adding labels to Menu icon in Action Bar

At the moment I have a pretty standard action bar with a menu icon. I'd like to do something like this, an overlay

带数字的菜单图标

I also tried a little experiment by using a toolbar and going with this, but no luck:

toolbar.setNavigationIcon(R.drawable.ic_document_hit);

Any thoughts?

in this link here there is an example where it is done, the problem is that is in spanish, but you can download the code to check how do it, You have to create a java class that extends from drawable. I hope be useful for you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM