-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Do not create another dialog with the same custom view - reuse the old one #3097
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add tests to make sure this change works as expected?
I cannot duplicate the original bug in Genymotion API 23. Do you consistently get double dialogs when you follow these steps? |
|
I messed that one up - you will not get double dialogs, that was part of a debug change I made. You will see the exception though. To elaborate on this: if you found the parent view and detached the custom view, you would be able to successfully create a second dialog but it would duplicate the first and you'd end up with two. Thus, a successful fix results in no exception and no duplicate dialogs. |
|
Hi @albendz , I approved this by reading the code but can you provide me the test scenario so that I can test it too? |
|
I'm having trouble building latest from master (some gradle build failure on debug resources) so I'm not able to retry the steps but from what I remember:
You will see in logs an error about a dialog parent. The dialog is actually being created again with the same inner content view, which is where this error is happening. The original dialog isn't being dismissed, it's the new one that doesn't actually get created. |
|
Confirmed that is the repo. You will get this error in the logs: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verified, this works for me. Thanks a lot @albendz , and sorry for latency.
Description (required)
Fixes #3032 Dialog Not Showing UP
What changes did you make and why?
Tests performed (required)
Tested Debug on Pixel XL with API level 26.
Verified: no exception and no duplicated dialogs
No UI changes.