Status Update
Comments
af...@doist.com <af...@doist.com> #2
My dependencies:
implementation 'androidx.appcompat:appcompat:1.4.0'
implementation 'androidx.preference:preference:1.1.1'
implementation 'com.google.android.gms:play-services-wearable:17.1.0'
implementation 'com.google.android.material:material:1.4.0'
If I remove androidx.appcompat:appcompat:1.4.0
, the warning vanishes, so I imagine there's some transitive dependency on an older version of androidx.appcompat:appcompat
that doesn't have the warning.
af...@gmail.com <af...@gmail.com> #4
The upstream library is using @SuppressWarnings("deprecation")
, which I suppose you could probably use to suppress the warning you're getting.
As for doing fully the non-deprecated way, it is possible that would require overwriting/duplicating more functionality than you currently are and/or updates to the Preference library.
However, I suspect that FragmentManager is capable of handling Fragment subclasses. You should probably look for instructions on developer.android.com, stackoverflow, or similar.
pa...@gmail.com <pa...@gmail.com> #5
Looks like a duplicate of
Description
Component used: PreferenceDialogFragmentCompat
Version used: 1.1.1
Problem
On the deprecated , now the results of the fragments should be via a result callback.
1.3.0
version of the androidx fragment library thesetTargetFragment
isThe problem that I’m seeing with this deprecation is that on the onCreate we need the targetFragment to be set.
PreferenceDialogFragmentCompat
This will make a compiler warning for each time we need to show a
PreferenceDialog
.