6

I updated the com.android.support:preference library from version 27 to 28 and ever since I did that, there is a huge amount of padding to the left of each preference. It's almost like it's assuming that there will be icons there, but I have no icons specified. See screenshot below. Is there a way to get rid of this padding?

PreferenceScreen layout

SilentByte
  • 1,098
  • 1
  • 10
  • 21

1 Answers1

4

Try set:

app:iconSpaceReserved="false"
mducc
  • 743
  • 1
  • 9
  • 32
  • Thanks! I had tried this before but I used the android namespace. Using the app namespace fixed it. However, this doesn't work on PreferenceCategory elements. Looks like I may have to use a custom style to fix the PreferenceCategory elements: https://stackoverflow.com/questions/51518758/preferencefragmentcompat-has-padding-on-preferencecategory-that-i-cant-get-rid/52573593#52573593 – SilentByte Sep 30 '18 at 23:44
  • Or you could upgrade it to `1.1.0-alpha2` and put `app:iconSpaceReserved="false"` in `PreferenceCategory` https://stackoverflow.com/a/53285715/2559927 – raiym Jan 07 '19 at 06:49