0

I'm making a custom ActionBar for the first time. I was using the Theme.AppCompat.Light, but noticed that there is still space to the left of my custom view. I made a test app to analyze the effect of altering different ActionBar elements, here are the comparisons. How can I remove that annoying space?

This is what I want!

theme: Theme.Holo.Light

This is what I'm getting with material theme, LOOK AT THAT ANNOYING SPACE!

theme: Theme.Material.Light

Here are with the other toggle buttons checked

Tom McFarlin
  • 829
  • 1
  • 9
  • 24

2 Answers2

0

This happens because you are selecting DeviceDefaultTheme. You could use android:style/Theme.Holo.Light.DarkActionBar for action bar.

-1

You need to add:

app:contentInsetEnd="0dp"
app:contentInsetStart="0dp"

which app is

xmlns:app="http://schemas.android.com/apk/res-auto"
mmlooloo
  • 18,937
  • 5
  • 45
  • 64