You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
2.3.2 2018-08-05
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 2018-07-29
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 2018-07-27
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.
<itemname="preferenceTheme">@style/PreferenceThemeOverlay.Asp.Material.Inset</item>
<!-- Add if you use ColorPreference. -->
<itemname="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.
This will affect Kotlin users.
In an effort to be compatible with upcoming AndroidX libraries all classes of this library
that were previously in android.support.* packages are deprecated and replaced with classes
in packages net.xpece.android.support.*.
Behavior and API should remain unaffected.
Please migrate to the new classes, changing the import statements should suffice.
Old classes will be removed in upcoming major release to ensure compatibility with AndroidX.
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:
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 (2018-04-12)
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 (2018-04-02)
FIXED: Popup window exit transition now plays on API 24-25.
Catch more error cases when loading ringtone picker dialog.
2.1.1 (2018-03-06)
Catch more error cases when loading ringtone picker dialog.
2.1.0 (2018-03-05)
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 (2018-03-03)
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 (2018-03-01)
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!
2.0.0 (2018-03-01)
1.3.2 (2018-01-08)
FIXED: Fixed behavior when android:selectable="false". See #84.
1.3.1 (2017-10-04)
FIXED:RingtonePreference.canShowSelectedRingtoneTitle should no longer crash
when no ringtone is selected
1.3.0 (2017-09-24)
SeekBarPreference info text view can now be baseline aligned via app:asp_infoAnchor attribute
to either @android:id/title or @android:id/summary (default).
Added support for padding around dividers in PreferenceDividerDecoration.
Added support for preference categories without a title.
Changes to ringtone picker:
XpRingtonePreferenceDialogFragment doesn't crash when trying to play default ringtone
from external storage without the READ_EXTERNAL_STORAGE permission; instead is silent.
Added RingtonePreference.OnFailedToReadRingtoneListener to notify you
about such potential case. Valid courses of actions are:
Ignore the error and show the picker anyway using
RingtonePreference.showDialogFragment(XpPreferenceFragment) (default),
Open the system picker and process its result using
RingtonePreference.buildRingtonePickerIntent() and
RingtonePreference.onActivityResult(Intent) respectively.
The system picker can access external storage but does not share your app's theme.
1.2.8 (2017-09-19)
Added XpAppCompatSpinner.setEntries method.
Preference text views now respect forced RTL for non-RTL content.