Padding the actionbar "up" indicator image

actionbarsherlock, android

Solution

As of API 15 the positioning of these elements are hard-coded into the layout resources. The only alternative you have would be to use a custom navigation layout to create your own and hide the built-in home navigation.

Problem

I'm in search of a way to style the ActionBar's "up" icon that is displayed when you configured it to be displayed from your Activity : ``` getSupportActionBar().setDisplayHomeAsUpEnabled(true); ``` I've been looking around and found a way to add padding between the home icon and the title (Padding between ActionBar's home icon and title), but not a way to add padding between the home icon and the up indicator icon. I dug into `ActionBarView.HomeView` in the android source and it appears to inflate the up indicator via this call : ``` mUpView = findViewById(com.android.internal.R.id.up); ``` Problem is the `com.android.internal.R.id.up` is internal so I can't access it, so the above linked solution for padding the home icon won't work. Ideally I'd like to override the `ActionBarView.HomeView`, but it's private within the `ActionBarView`. Does anyone know if ActionBarSherlock provides a good way to override this behavior? I've looked into providing a custom home layout, but the threads I found indicated that it wouldn't be a good idea to diverge from the standard android classes. Any ideas?

Original source

Related problems