Releases: consp1racy/android-support-preference
Releases · consp1racy/android-support-preference
3.0.0
Support Preference
Added
PreferenceScreenNavigationStrategy.ReplaceFragmentsupports Up navigation.- Support
useSimpleSummaryProviderXML attribute. - Better compatibility with AndroidX Preference 1.1.x.
Changed
- Migrated to AndroidX.
Deprecated
- Use
OnBindEditTextListenerinstead ofOnEditTextCreatedListener. StyledContextProviderandXpPreferenceFragment.onProvideCustomStyledContextno longer work.
Removed
- Previously deprecated
PreferenceScreenNavigationStrategy.ReplaceRootis 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:
PreferenceCategorynow has proper padding on API 16 (introduced in 2.3.0). - FIXED:
DropDownPreferenceis now properly styled when using.Insettheme (introduced in 2.3.1).
2.3.1
Support Preference
- FIXED: Added missing support for
DropDownPreference.- Android Support Library uses an invisible
Spinnerto display its popup. This library uses
XpListPopupWindowdirectly. 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:
SeekBarPreferencenow properly registers and unregisters its key listener. - FIXED:
SeekBarPreferenceinfo text view no longer leaks the activity context. - FIXED:
MultiSelectListPreferencepersistence:- Storing a new value now correctly overwrites any currently persisted value.
Previously it could throw aClassCastException. - Reading now correctly throws a
ClassCastExceptionif stored value is not aSet<String>. PreferenceDataStoreis now supported.
- Storing a new value now correctly overwrites any currently persisted value.
- FIXED: The library is now compatible with Android P preview.
RingtonePreferencedialog shows ringtones.XpAppCompatSpinnerdoesn't crash.
- FIXED:
SeekBarPreferencenow treats null default value as zero. - FIXED:
TwoStatePreferencenow treats null default value as false. - FIXED:
CheckBoxPreferencenow 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#onProvideCustomStyledContextand return an application context
with an activity theme overlay. Use utility methods in theStyledContextProviderclass.
- 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 yourXpListPopupWindows. - 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:paddingEndandandroid:paddingRightto 32dp (plain) or 36dp (underlined).
2.2.0
- FIXED:
MultiSelectListPreferenceno longer crashes on saved state restoration.
API Changes
- Nullable parameter in
Preference.onSaveInstanceState(@NonNull Parcelable savedState)- No included preferences return
nullhere.
- 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.updateLayoutInflaterFactoryis now deprecated and does nothing. It's no longer needed.- NEW! Use
XpSupportPreferencePlugins.registerErrorInterceptorto 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*Stringvalues 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:
ListPreferencein simple menu mode doesn't crash with support libraries 27.1.0. app:asp_minis now deprecated in favor ofapp:min.app:asp_mintakes precedence if both are specified.
- FIXED:
- Changes in support-spinner library
- NEW!
XpAppCompatSpinnerusesapp:asp_simpleMenuMaxItemCountattribute to limit popup menu height. - NEW! Supports
android:popupEnterTransitionandandroid:popupExitTransitionon 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:
XpAppCompatSpinnerwidth is now better calculated from all items. Don't use with large data sets!
- NEW!