Search code examples
androidandroid-actionbaractionbarsherlock

Spacing between Action bar icon and Title.


I'm using ABS for backwards compatibility. In one of my activities, I'm using Action Bar tabs which appear before custom view (in landscape) in action bar so I can't use that. So i'm using Action bar title. So in short, my question is how do I increase the spacing between the title and the icon?


Solution

  • I added some spacing like this:

    actionBar.setTitle("  " + myTitle);
    

    I don't think it should be done this way but I've searched a lot I couldn't find any solution for this without using custom view which I can't because I'm using AB tabs.

    So if anyone else has a better (cleaner) solution, do answer. For others, this works better than anything else I tried.

    Cheers!