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
If a
PreferenceFragmentCompat
is e.g. used within a single-activity approach, it will apply the stylePreferenceThemeOverlay
inPreferenceFragmentCompat
'sonCreate
.Unfortunately,
PreferenceThemeOverlay
sets a very generic attribute, which is not "removed" as soon as thePreferenceFragmentCompat
is detached:<item name="android:scrollbars">vertical</item>
This means that if the
PreferenceThemeOverlay
was once applied to the activity, it will force vertical scrollbars to show up on every view, which will feel addressed.The current workarounds are:
PreferenceFragmentCompat
(but which is contradicting if you use the navigation component with a single activity approach.)PreferenceFragmentCompat
has been detached and setting<item name="android:scrollbars">none</item>
.However, I think this behavior is unintended, since as soon ashttps://developer.android.com/jetpack/androidx/releases/preference#1.1.0-alpha02 )
PreferenceFragmentCompat
is once attached and created within the app's lifetime, it will set a very generic attribute that will affect other views as well. Therefore, I think this is a bug which has been introduced since1.1.0-alpha02
(Basically, I would assume that
PreferenceFragmentCompat
should not change the activity's theme in a way that it overrides attributes that will affect other views as well.