Fixed
Status Update
Comments
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.com> #2
Please include a sample project that reproduces your issue.
ni...@ansman.se <ni...@ansman.se> #3
Here is the sample project.
Steps to reproduce:
1. Press on "Search" icon;
2. Write something;
3. Search this text, keyboard will be dismissed;
4. Tap on "Dialog" button;
5. Dissmiss dialog;
With the new 1.5.0 fragment library version text will be cleared in the search box after dismissing dialog.
In the version 1.4.1 and lower text in the search is not clearing and this is correct behaviour.
Please suggest some workarounds or how to fix this issue?
Steps to reproduce:
1. Press on "Search" icon;
2. Write something;
3. Search this text, keyboard will be dismissed;
4. Tap on "Dialog" button;
5. Dissmiss dialog;
With the new 1.5.0 fragment library version text will be cleared in the search box after dismissing dialog.
In the version 1.4.1 and lower text in the search is not clearing and this is correct behaviour.
Please suggest some workarounds or how to fix this issue?
jb...@google.com <jb...@google.com> #4
Hello, have you checked sample project? I hope it will help find the issue.
ni...@hinge.co <ni...@hinge.co> #5
ap...@google.com <ap...@google.com> #6
Hello, any update please?
jb...@google.com <jb...@google.com> #7
Hello
I raised similar issue with this ticket
This makes the SearchView unusable/broken when fragments are changed (i.e base on searchView input query)
What can we do to fix this problem? What is the progress of work on solving this problem?
pr...@google.com <pr...@google.com> #8
@7 Check @5 for a workaround.
Description
Component used: Fragment
Version used:
1.5.6
If you call
Fragment.postponeEnterTransition
with a delay,Fragment
will post a runnable on a Handler with the specified delay as the delay. This runnable is not removed when callingstartPostponedEnterTransition
however which means that if the fragment is destroyed it will be retained until the runnable finally runs.You can easily verify this with LeakCanary by having two fragments where in the first fragment you call
postponeEnterTransition(1, TimeUnit.HOURS)
and then you navigate to the other fragment. When leak canary runs you can see that the initial fragment is retained.The solution should be to remove the runnable when calling
startPostponedEnterTransition
. This might not be feasible in the case where you callpostponeEnterTransition
before the fragment is attached but it feels OK to ignore that case for now.