Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialSlava Fleer
6,086 PointsHow to add icon instead text in overflow menu when you pressing on 3 dots in Action Bar ?
The only option when I see the icon and not text of menu item is when app:showAsAction="always" or ifroom , but it puts the icon in Action Bar. I want this icon in menu after pressing 3 dots. Tried every showAsAction variations.
Thanks for your time =)
1 Answer
James Simshaw
28,738 PointsHello,
I do not believe it is common practice for Android to include icons in the overflow menu, this stackoverflow post gives more details on not using icons. Having said that, there are a few ways to do so(although some feel very hackish). The less hackish route I've seen, but have I have not tried out either method, would be to do so programatically, as given in this stackoverflow post. Again, I would recommend going with standard coding practices and not worry about icons in the overflow area.
Slava Fleer
6,086 PointsSlava Fleer
6,086 Pointsthanks. In future I will check the links.