I have got a trouble with layout of Preference screen after updated SDK to version 28 (Android Pie). Each PreferenceScreen has a new padding on the left.
As I've checked, there is a method to set icon space as reserved in Preference class already.
android.support.v7.preference.Preference.setIconSpaceReserved(boolean iconSpaceReserved)
The method is good so far, but the problem is that it doesn't work with PreferenceCategory.
Does this mean that the left padding on PreferenceCategory is not a space for icon?
Solved using app:iconSpaceReserved="false" in the preference xml (under each item).
<PreferenceCategory
android:title="Pro Settings"
app:iconSpaceReserved="false"
>
<CheckBoxPreference
android:defaultValue="false"
android:key="plugin"
android:title="@string/EnablePlugin"
android:summary="@string/PluginDescription"
android:id="@+id/Pref"
app:iconSpaceReserved="false"
/>
</PreferenceCategory>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With