Summary:
There's empty space before every preference in the Settings page.
This may be due to the PR for issue #3465.
Screen-shots:
_This is how it looked before._

_This is how it looks now._

Would you like to work on the issue?
No, feel free to take it up.
Not an issue, just how settings screen works, see docs
I was about open an issue for the same reason. It kind of feels weird seeing the Settings page this way. I've never seen any Settings page like this with lots of space to the left and in between settings. See below screenshots:


It really seems like it's wasting a lot of space when I scroll through it in my device (Samsung SM-J111F). Couldn't we reduce the amount of space this takes?
apparently we can use app:iconSpaceReserved="false"? I suppose go for it if it still looks alright, I was hesitant to do it because <*Preference elements have no attributes like padding/margin
Just wanted to share another issue that I noted with the extra space. If you observe the following screenshot closely, you would notice weird white dots (in dark theme) corresponding to each setting.

I'm wondering why they're shown. 馃
We could use layoutInspector to expose the underlying view hierarchy and what these views are? Kiwix , which is my latest dark mode/prefs screen experience, is unfortunately not using androidx preferences and has a DayNight theme driven night mode, not much similarity
We could use layoutInspector to expose the underlying view hierarchy and what these views are?
I'm not familiar with this. Let me know how I could help with this.

Click this with the app running on the screen you want to inspect and you get to see what the views actually are along with their attributes
Ignore the custom key binding I have for it.
Ok. This is what I get when inspecting the Settings screen:

Perhaps recheck that after this issue is addressed, with any luck it will just disappear. If it doesn't we will make a new issue
apparently we can use
app:iconSpaceReserved="false"? I suppose go for it if it still looks alright, I was hesitant to do it because<*Preferenceelements have no attributes likepadding/margin
@macgills I think iconSpaceReserved is only available on API 26+
@macgills I think
iconSpaceReservedis only available on API 26+
So, that's why it didn't work in my device (API 22) when I tried using it. 馃
it has the app: prefix, it is backported by the androidx libraries. Ye must have been using android: prefix which uses the platform implementation
I did use the app: prefix.
This diff captures what I tried:
diff --git app/src/main/res/xml/preferences.xml app/src/main/res/xml/preferences.xml
index e58dbefd6..b8af50b10 100644
--- app/src/main/res/xml/preferences.xml
+++ app/src/main/res/xml/preferences.xml
@@ -3,6 +3,7 @@
xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory
+ app:iconSpaceReserved="false"
android:title="@string/preference_category_appearance">
<ListPreference
@@ -17,6 +18,7 @@
</PreferenceCategory>
<PreferenceCategory
+ app:iconSpaceReserved="false"
android:title="@string/preference_category_general">
<SwitchPreference
@@ -75,6 +77,7 @@
</PreferenceCategory>
<PreferenceCategory
+ app:iconSpaceReserved="false"
android:title="@string/preference_category_privacy">
<MultiSelectListPreference
@@ -91,6 +94,7 @@
Do not reuse this key unless you revive the same feature with the changes mentioned at #1599.-->
<PreferenceCategory
+ app:iconSpaceReserved="false"
android:title="@string/preference_category_feedback">
<Preference
https://issuetracker.google.com/issues/111662669 this was an issue in the lead up to 1.1.0 but it has been resolved? I don't think this is limited by api level
/**
* Sets whether to reserve the space of this preference icon view when no icon is provided. If
* set to true, the preference will be offset as if it would have the icon and thus aligned with
* other preferences having icons.
*
* @param iconSpaceReserved Set {@code true} if the space for the icon view should be reserved
* {@link android.R.attr#iconSpaceReserved}
*/
public void setIconSpaceReserved(boolean iconSpaceReserved) {
if (mIconSpaceReserved != iconSpaceReserved) {
mIconSpaceReserved = iconSpaceReserved;
notifyChanged();
}
}
certainly unmentioned in the method.
I tried briefly on API 27 with android: app: and setting it in code to no effect. Makes me think something is wrong in the implementation, ours or the library. Sadly there is no later version to upgrade to
Hi @macgills, @sivaraam Can I work on this, if no one else is working on it?
Hi @SaumiaSinghal, yeah you can work on this. No one appears to be working on this.
Most helpful comment
Not an issue, just how settings screen works, see docs