Reputation: 951
I would like an ActionBar where I place an image/logo in the center of the bar, rather than the default left end. I'm using the standard android classes building with level 18, no compatibility classes and no ABS. I've looked at this solution which seems to be the most popular answer:
ActionBar logo centered and Action items on sides
... but it simply doesn't work for me. I'm using various devices including HTC One with 4.2.2, Nexus 7 with 4.2.1. However much I play with the solution, the text or image still appears left aligned, plus the layout file only takes effect for the width of the image, and does not span the entire ActionBar.
My request is just for the solution to centering the logo, I'm not interested in any left or right home/menu buttons.
Upvotes: 0
Views: 521
Reputation: 2931
A centered logo on the ActionBar actually violates the Android Application Design Guidelines unfortunately, you can find a comprehensive guide here:
http://developer.android.com/design/get-started/ui-overview.html
The accepted norm is to have the logo to the left hand side.
Upvotes: 1