Skip to content

Releases: consp1racy/android-support-preference

3.0.0

13 Mar 20:59
370e4fb
Compare
Choose a tag to compare

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 of OnEditTextCreatedListener.
  • StyledContextProvider and XpPreferenceFragment.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

05 Aug 17:17
Compare
Choose a tag to compare

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

29 Jul 10:44
Compare
Choose a tag to compare

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 Library DropDownPreference.

2.3.0

27 Jul 12:32
Compare
Choose a tag to compare

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 a ClassCastException.
    • Reading now correctly throws a ClassCastException if stored value is not a Set<String>.
    • PreferenceDataStore is now supported.
  • 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 the StyledContextProvider class.
  • 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 your styles.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 your XpListPopupWindows.
  • 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 and android:paddingRight to 32dp (plain) or 36dp (underlined).

2.2.0

12 Apr 13:22
Compare
Choose a tag to compare
  • 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.
  • Non-null parameter in Preference.onRestoreInstanceState(@NonNull Parcelable savedState)

2.1.2

02 Apr 21:28
Compare
Choose a tag to compare
  • FIXED: Popup window exit transition now plays on API 24-25.
  • Catch more error cases when loading ringtone picker dialog.

2.1.1

06 Mar 11:03
Compare
Choose a tag to compare
  • Catch more error cases when loading ringtone picker dialog.

2.1.0

05 Mar 22:04
Compare
Choose a tag to compare
  • 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

2.0.2

05 Mar 22:03
Compare
Choose a tag to compare
  • All libraries
    • Libraries do not automatically transitively pull support libraries 27.1.0. Issue #91
  • RingtonePreference
    • SortCursor does not crash when sorting by null columns. Issue #88

2.0.1

01 Mar 21:36
Compare
Choose a tag to compare
  • 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 of app:min. app:asp_min takes precedence if both are specified.
  • Changes in support-spinner library
    • NEW! XpAppCompatSpinner uses app:asp_simpleMenuMaxItemCount attribute to limit popup menu height.
    • NEW! Supports android:popupEnterTransition and android: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!