I want to remove the padding around the icon on the left in the standard android 4.0+ action bar. I\'m setting the icon with:
getActionBar().setIcon(getResou
To set the height of ActionBar you can create new Theme like this one:
and set this Theme to your Activity:
android:theme="@style/Theme.BarSize"
Now, set the height of the icons to "match_parent"
.
That would remove the top and bottom padding.
Now, the arrow at the left is inbuilt into the framework, so you have two options for a workaround:
Use ActionBarSherlock. It uses it's own drwables and resources, so you can modify the arrow icon to an emty png, so that your up icon would move to extreme left.
The up/back icon arises from:
public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: NavUtils.navigateUpFromSameTask(this); return true; } }
So, instead of using this option for up button, you can make another actionbar option, which has an intent for the previous activity, and then place that icon on your action bar.
It will be a bigger workaround though.
Hope that helps.. :)