If I click on the "overflow" action bar icon, I only see my menu items as text, but the icon is not displayed! Is this the default behaviour? How can I force showing the icon?
If you look at http://developer.android.com/design/patterns/actionbar.html > "Sharing data" image, it at least seems to be possible to have icons there. But how?
Is this the default behaviour?
Yes.
How can I force showing the icon?
AFAIK, you can't. The icons are used on action bar items (toolbar buttons), and on classic options menus (eg, Android 2.x).
If you look at http://developer.android.com/design/patterns/actionbar.html > "Sharing data" image, it at least seems to be possible to have icons there.
That is not the overflow. That is a ShareActionProvider
. You can tell this by reading the page you linked to :
Whenever your app permits sharing of data, such as images or movie clips, use a share action provider in your action bar. The share action provider is designed to speed up sharing by displaying the most recently used sharing service next to a spinner button that contains other sharing options.
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.