Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
Component used: androidx.preference:preference
Version used: 1.2.0
Devices/Android versions reproduced on: generic tablets / Android 9
This is regarding PreferenceHeaderFragmentCompat. The API documentation states (sic):
This is false and only works as stated if the first element in the PreferenceScreen is an instance of Preference and not an instance of PreferenceCategory.
Reviewing the source , it becomes clear that the code assumes the preference count only takes into account top level Preferences, and does not include the ones under a PreferenceCategory.
The code should recurse if the object returned by getPreference() is an instance of PreferenceGroup.
Please fix.