Reputation: 2362
I use ActionBarCompat to add an ActionBar to my Activities.
In the ActionBar one can add 3 items which are displayed with an icon. I want to have a separator (vertical line) between the items. I was looking for a layout file where I can add a margin to the Imagebutton, but unfortunatelly they are adding this programmatically.
Can someone guide me what to do. THX
Upvotes: 1
Views: 1245
Reputation: 5575
First, I agree with Wolfram that it's better not to add separators. Second, if you add them to the ActionBarCompat, I assume you want to add them to the ActionBar too? The only way I see to add separators is to add them to your graphics. That's not the same as having separators, but it's close.
Upvotes: 1
Reputation: 2402
Do not do this. Separators between menu items of the ActionBar are completely uncommon on Android. This would spoil the overall user experience of your app.
This is not the answer, you were looking for, but please, do follow the common style - unless you have very good reasons to deviate. Your app will benefit from this!
Upvotes: 3