Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RingonePreference XpRingtonePreferenceDialogFragment doesn't show up with latest appcompat #121

Open
dirkam opened this issue Jul 23, 2021 · 12 comments
Assignees
Labels
subject-ringtone Issues targeting ringtone resolution and playback.
Milestone

Comments

@dirkam
Copy link

dirkam commented Jul 23, 2021

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

@dirkam
Copy link
Author

dirkam commented Jul 23, 2021

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);

@dirkam
Copy link
Author

dirkam commented Apr 24, 2022

@consp1racy can you please take a look at this?

@consp1racy
Copy link
Owner

Looks like it's caused by the workaround introduced here #87 (comment).

It appears, removing the workaround in conjunction with updating the Fragment library solves the underlying issue.

@dirkam
Copy link
Author

dirkam commented Apr 25, 2022

Thanks for the update. Is there a way for us to fix this on our end?

consp1racy added a commit that referenced this issue Apr 25, 2022
@consp1racy
Copy link
Owner

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.

@consp1racy consp1racy self-assigned this Apr 25, 2022
@consp1racy consp1racy added the subject-ringtone Issues targeting ringtone resolution and playback. label Apr 25, 2022
@consp1racy consp1racy added this to the 3.1.0 milestone Apr 25, 2022
@dirkam
Copy link
Author

dirkam commented Apr 25, 2022

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.

@consp1racy
Copy link
Owner

Hi, sorry, you can follow the instructions here https://jitpack.io/docs/

@dirkam
Copy link
Author

dirkam commented Apr 25, 2022

@consp1racy I tried that. I think I'm doing everything right.
It seems there is a build failure for this commit.

c13d5890a6
3.x-dev-SNAPSHOT

@dirkam
Copy link
Author

dirkam commented Apr 26, 2022

@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!

@consp1racy
Copy link
Owner

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")
}

@dirkam
Copy link
Author

dirkam commented Apr 27, 2022

Thanks. This fixes the initial issue for me. It raises a question though, will this bring #87 issue back?

@consp1racy
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
subject-ringtone Issues targeting ringtone resolution and playback.
Projects
None yet
Development

No branches or pull requests

2 participants