The interval between the action bar icon and the title.

I use ABS for backward compatibility. In one of my actions, I use the Action Bar tabs that appear before the user view (in the landscape) in the action bar, so I cannot use this. Therefore, I use the title bar Action bar. In short, my question is how to increase the distance between the title and the icon?

+3
source share
2 answers

I added a few intervals:

actionBar.setTitle("  " + myTitle);

I don’t think it should be done this way, but I searched a lot, I could not find a solution for this without using a custom view, which I can not, because I use the AB tabs.

, - ( ) , . , , .

!

+7

XML .

app:contentInsetLeft="16dp"
app:contentInsetStart="16dp"
app:contentInsetEnd="16dp"
app:titleMarginStart="32dp"

. Android 4.4.2 Android 5.1.

+1

All Articles