Padding between ActionBar's home icon and title

Alesqui picture Alesqui · Mar 16, 2012 · Viewed 100.6k times · Source

Does anybody know how to set padding between the ActionBar's home icon and the title?

Answer

Cliffus picture Cliffus · Jan 16, 2013

EDIT: make sure you set this drawable as LOGO, not as your app icon like some of the commenters did.

Just make an XML drawable and put it in the resource folder "drawable" (without any density or other configuration).

<?xml version="1.0" encoding="utf-8"?>
<layer-list
    xmlns:android="http://schemas.android.com/apk/res/android" >

    <item
        android:drawable="@drawable/my_logo"
        android:right="10dp"/>


</layer-list>

The last step is to set this new drawable as logo in your manifest (or on the Actionbar object in your activity)

Good luck!