Thursday, April 25, 2013

Solution: Actionbar Space or Padding between homeasupindicator and app icon

Actionbar support starts from android version 3.0+

If you want to apply style for actionbar then add values-v11 is the values of the API version 11, and values-v14 is the values of the API version 14 in the res folder/ when your minSdkVersion is less than 11.
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="11" />

Using Themes, getting space between homeAsUpIndicator and App Icon is not working but it is possible through programatically.

android:homeAsUpIndicator : Specifies a drawable to use for the 'home as up' indicator.

setDisplayHomeAsUpEnabled(true) shows the "<" on the action bar.

android:homeAsUpIndicator allows to change the icon

<item name="homeAsUpIndicator">@drawable/custom_home</item>

Access the homeAsUpIndicator from the app by calling the
Change padding so that we will get space between homeAsUpIndicator and App Icon.