Search code examples
androidandroid-layoutandroid-actionbarandroid-toolbar

Android ActionBar Backbutton Default Padding


I am creating a custom ActionBar using a RelativeLayout with an ImageButton to the left to replace it. I have downloaded the Back icon from google's website to use on the ImageButton

The problem is that I need to create a Back button to replace the original ActionBar's Back Button, and I need it to be exactly identical to the original ActionBar's back button.

I am wondering what is the system's default padding for the Back button image?


Solution

  • Well, I think the default value of contentInset is 16 dp (left & right)

    For more info: (search content inset in this) https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/res/res/values/dimens_material.xml

    Android API 21 Toolbar Padding

    I hope this answers you question.