android-support-preference
android-support-preference copied to clipboard
RingonePreference XpRingtonePreferenceDialogFragment doesn't show up with latest appcompat
Hi,
If androidx.appcompat:appcompat is updated to 1.3.0 or 1.3.1 then XpRingtonePreferenceDialogFragment dialog doesn't show up. It shows the backdrop shadow as if the dialog was visible, but the dialog is actually not visible.
Can you please test this on your end? Is there a workaround or fix that could be applied?
Thanks
This is how I used to show the ringtone picker dialog from code:
XpRingtonePreferenceDialogFragment ringtonePicker =
XpRingtonePreferenceDialogFragment.newInstance(ringtonePreference.getKey());
ringtonePicker.setTargetFragment(SettingsFragment.this, 0);
ringtonePicker.show(getFragmentManager(), DIALOG_FRAGMENT_TAG);
@consp1racy can you please take a look at this?
Looks like it's caused by the workaround introduced here https://github.com/consp1racy/android-support-preference/issues/87#issuecomment-370004822.
It appears, removing the workaround in conjunction with updating the Fragment library solves the underlying issue.
Thanks for the update. Is there a way for us to fix this on our end?
Non-trivial. Try pulling in commit c13d5890a6
via jitpack.io and verify this works for you. It uses latest stable releases of AndroidX, except Preference.
Will update to Preference 1.2.0 later.
Perhaps a noob question, but how can I do that?
implementation 'net.xpece.android:support-preference:c13d5890a6'
doesn't seem to work
Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve net.xpece.android:support-preference:c13d5890a6.
Hi, sorry, you can follow the instructions here https://jitpack.io/docs/
@consp1racy I tried that. I think I'm doing everything right. It seems there is a build failure for this commit.
@consp1racy I also tried to download the branch and load it as a module but gradle build fails locally as well, so I couldn't verify this fix for the initial issue. I'd appreciate if you could have a look at this. Thanks!
It seems I broke publishing to Jitpack when I set up publishing to Maven Central.
The correct coordinates with the fix should be
dependencies {
implementation("com.github.consp1racy.android-support-preference:support-preference:b8a9625ede")
implementation("com.github.consp1racy.android-support-preference:support-preference-color:b8a9625ede")
implementation("com.github.consp1racy.android-support-preference:support-spinner:b8a9625ede")
}
repositories {
maven("https://jitpack.io")
}
Thanks. This fixes the initial issue for me. It raises a question though, will this bring #87 issue back?
I understand your concern.
The AndroidX team completely replaced the FragmentManager implementation, which shoukd, among other things, fix any ordering issues. I have high hopes it affects this case as well.
The sample app doesn't crash.
I think it may be possible to write a test that triggers the flow a large number of times in an attempt to encounter crash.