Fixed
Status Update
Comments
il...@google.com <il...@google.com> #2
Please include a sample project that reproduces your issue.
ma...@cyberagent.co.jp <ma...@cyberagent.co.jp> #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?
lc...@gmail.com <lc...@gmail.com> #4
Hello, have you checked sample project? I hope it will help find the issue.
il...@google.com <il...@google.com> #5
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.com> #6
Hello, any update please?
an...@google.com <an...@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?
Description
Version used: 2.1.0-beta02
Devices/Android versions reproduced on:
When using sharedElementTransition from Fragment A to Fragment B, we call Fragment#postponeEnterTransition first at Fragment B onCreateView.
Then if we press back button or navigate to other fragment before Fragment#startPostponedEnterTransition of Fragment B was called, the following exception will happen when trying to navigate to other fragments.
StackTrace:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.fragmenttransitionbug, PID: 8900
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean androidx.fragment.app.FragmentManagerImpl.isPrimaryNavigation(androidx.fragment.app.Fragment)' on a null object reference
at androidx.fragment.app.Fragment.performPrimaryNavigationFragmentChanged(Fragment.java:2662)
at androidx.fragment.app.FragmentManagerImpl.dispatchParentPrimaryNavigationFragmentChanged(FragmentManagerImpl.java:2805)
at androidx.fragment.app.FragmentManagerImpl.setPrimaryNavigationFragment(FragmentManagerImpl.java:2800)
at androidx.fragment.app.BackStackRecord.executeOps(BackStackRecord.java:422)
at androidx.fragment.app.FragmentManagerImpl.completeExecute(FragmentManagerImpl.java:1989)
at androidx.fragment.app.FragmentManagerImpl$StartEnterTransitionListener.completeTransaction(FragmentManagerImpl.java:3379)
at androidx.fragment.app.FragmentManagerImpl.executePostponedTransaction(FragmentManagerImpl.java:1769)
at androidx.fragment.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManagerImpl.java:1800)
at androidx.fragment.app.FragmentManagerImpl.execPendingActions(FragmentManagerImpl.java:1727)
at androidx.fragment.app.FragmentManagerImpl$2.run(FragmentManagerImpl.java:150)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Is this the correct behavior?
Since it's a common pattern when using Glide to load a remote image with sharedElementTransition.
We want to call Fragment#startPostponedEnterTransition after the remote image was ready to show.
But the loading can take some time which cause the above situation to happen.
A sample project was attached.
If this is a bug in the library, we would appreciate if you could attach:
- Sample project to trigger the issue.
- A screenrecord or screenshots showing the issue (if UI related).