You can add padding / edge by getting an ImageView of the icon from the ActionBar.
Here's how to do it:
ImageView icon = (ImageView) findViewById(android.R.id.home); FrameLayout.LayoutParams iconLp = (FrameLayout.LayoutParams) icon.getLayoutParams(); iconLp.topMargin = iconLp.bottomMargin = 0; icon.setLayoutParams(iconLp);
Edit: Use this code, for example, in the Activity onCreate
method.
source share