Releases: consp1racy/android-support-preference
Releases · consp1racy/android-support-preference
3.0.0
Support Preference
Added
PreferenceScreenNavigationStrategy.ReplaceFragment
supports Up navigation.- Support
useSimpleSummaryProvider
XML attribute. - Better compatibility with AndroidX Preference 1.1.x.
Changed
- Migrated to AndroidX.
Deprecated
- Use
OnBindEditTextListener
instead ofOnEditTextCreatedListener
. StyledContextProvider
andXpPreferenceFragment.onProvideCustomStyledContext
no longer work.
Removed
- Previously deprecated
PreferenceScreenNavigationStrategy.ReplaceRoot
is now gone. - Previously deprecated classes in
android.support.*
packages are now gone.
Fixed
- Prevent crashing on Android Q when picking ringtone (#120)
- Prefer custom long click instead of long-click-to-copy.
- Fix widget styles (e.g. check box tints) on Android 4.x.
Support Spinner
Changed
- Migrated to AndroidX.
Removed
- Previously deprecated classes in
android.support.*
packages are now gone.
2.3.2
Support Preference
- FIXED:
PreferenceCategory
now has proper padding on API 16 (introduced in 2.3.0). - FIXED:
DropDownPreference
is now properly styled when using.Inset
theme (introduced in 2.3.1).
2.3.1
Support Preference
- FIXED: Added missing support for
DropDownPreference
.- Android Support Library uses an invisible
Spinner
to display its popup. This library uses
XpListPopupWindow
directly. If you want to use a custom layout with custom styled Spinner,
extend and use Android Support LibraryDropDownPreference
.
- Android Support Library uses an invisible
2.3.0
Support Preference
- FIXED: Properly disable long click listener so a selector doesn't appear on passive items.
- FIXED:
SeekBarPreference
now properly registers and unregisters its key listener. - FIXED:
SeekBarPreference
info text view no longer leaks the activity context. - FIXED:
MultiSelectListPreference
persistence:- Storing a new value now correctly overwrites any currently persisted value.
Previously it could throw aClassCastException
. - Reading now correctly throws a
ClassCastException
if stored value is not aSet<String>
. PreferenceDataStore
is now supported.
- Storing a new value now correctly overwrites any currently persisted value.
- FIXED: The library is now compatible with Android P preview.
RingtonePreference
dialog shows ringtones.XpAppCompatSpinner
doesn't crash.
- FIXED:
SeekBarPreference
now treats null default value as zero. - FIXED:
TwoStatePreference
now treats null default value as false. - FIXED:
CheckBoxPreference
now correctly reverts check box state if preference change listener returned false. - FIXED: Added missing implementation in deprecated method
XpPreferenceHelpers#setDialogIcon
. - NEW! New API for using a long-lived themed context with the preference fragment.
- This will prevent memory leaks when using retained preference fragments. Retained fragments
don't reinflate the preference hierarchy on each configuration change which prevents jank. - Override
XpPreferenceFragment#onProvideCustomStyledContext
and return an application context
with an activity theme overlay. Use utility methods in theStyledContextProvider
class.
- This will prevent memory leaks when using retained preference fragments. Retained fragments
- NEW! Preference theme with text aligned with activity title.
<item name="preferenceTheme">@style/PreferenceThemeOverlay.Asp.Material.Inset</item>
<!-- Add if you use ColorPreference. -->
<item name="colorPreferenceStyle">
@style/Preference.Asp.Material.Inset.DialogPreference.ColorPreference
</item>
Support Spinner
- FIXED: Revised logic for sizing and positioning of popup windows. See behavior changes.
Popups should now correctly show when not using ListPreference or underlined Spinner. - FIXED: Drop down indicator now has consistent position in plain and underlined Spinner.
See behavior changes.
API Changes
- While binary compatibility is maintained, nullability annotations were added everywhere.
Behavior Changes
- Popup grow animation has been replaced with Material fade in animation on Android 4.
This looks better since the popup and selected item are now displayed precisely over
the emitting view. If you want the previous behavior put this code in yourstyles.xml
:
<style name="Base.Widget.Asp.ListPopupWindow" parent="Widget.AppCompat.ListPopupWindow">
<item name="android:popupAnimationStyle">@style/Animation.Asp.Popup.Holo</item>
</style>
- Since the logic for sizing and positioning popup windows now actually works,
you may need to revise any hacks you used to precisely position yourXpListPopupWindow
s. - Notes on drop down indicator of
XpAppCompatSpinner
:- The indicator is 10dp wide.
- The indicator is now 8dp from text and 6dp from view bounds (was 15dp and 7dp respectively).
- The underlined background includes extra 4dp inset on left and right sides.
- If you want the previous behavior (bigger space between text and indicator) set both
android:paddingEnd
andandroid:paddingRight
to 32dp (plain) or 36dp (underlined).
2.2.0
- FIXED:
MultiSelectListPreference
no longer crashes on saved state restoration.
API Changes
- Nullable parameter in
Preference.onSaveInstanceState(@NonNull Parcelable savedState)
- No included preferences return
null
here.
- No included preferences return
- Non-null parameter in
Preference.onRestoreInstanceState(@NonNull Parcelable savedState)
2.1.2
- FIXED: Popup window exit transition now plays on API 24-25.
- Catch more error cases when loading ringtone picker dialog.
2.1.1
- Catch more error cases when loading ringtone picker dialog.
2.1.0
- Support library 27.0.0+ and min SDK 14 are now required.
- You will get unexpected runtime exceptions if your project does not comply.
- FIXED: Version 2.0.x didn't publish javadoc and sources artifacts. We're back on track.
Fixes.updateLayoutInflaterFactory
is now deprecated and does nothing. It's no longer needed.- NEW! Use
XpSupportPreferencePlugins.registerErrorInterceptor
to report internal non-fatal
errors e.g. to Crashlytics. Read more in README.md.
Issue #93 - Ringtone picker preference
- NEW: Show 'Unknown' ringtone when previously selected external ringtone is no longer available.
Issue #97 - NEW:
RingtonePreference.get*String
values copied from Android Oreo in all available locales.
Issue #96 - FIXED: Ringtone picker should no longer crash on orientation change or state restoration
when the dialog fragment is restored before preference fragment.
Issue #87 - FIXED: Ringtone picker should no longer crash while listing ringtones on some devices.
Issue #92
- NEW: Show 'Unknown' ringtone when previously selected external ringtone is no longer available.
2.0.2
2.0.1
- Requires compile SDK 27 and at least support library 27.0.0.
- Changes in support-preference library
- FIXED:
ListPreference
in simple menu mode doesn't crash with support libraries 27.1.0. app:asp_min
is now deprecated in favor ofapp:min
.app:asp_min
takes precedence if both are specified.
- FIXED:
- Changes in support-spinner library
- NEW!
XpAppCompatSpinner
usesapp:asp_simpleMenuMaxItemCount
attribute to limit popup menu height. - NEW! Supports
android:popupEnterTransition
andandroid:popupExitTransition
on API 23+. - FIXED: Popup transitions on API 23+ are now smooth.
- FIXED: Make best effort to position selected item over emitting widget when popup menu scrolls.
- FIXED:
XpAppCompatSpinner
width is now better calculated from all items. Don't use with large data sets!
- NEW!