Fixed
Status Update
Comments
jb...@google.com <jb...@google.com>
ap...@google.com <ap...@google.com> #2
Please include a sample project that reproduces your issue.
jb...@google.com <jb...@google.com> #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?
an...@google.com <an...@google.com> #4
Hello, have you checked sample project? I hope it will help find the issue.
Description
Version used: 1.2.0-beta01
Devices/Android versions reproduced on: Xiaomi Redmi Note 7 running Android 9
It seems like on at least one device, FragmentContainerView tries to run commitNow() when the state is saved, causing the app to crash.
Code:
Fatal Exception: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
at androidx.fragment.app.FragmentManager.checkStateLoss(FragmentManager.java:1983)
at androidx.fragment.app.FragmentManager.ensureExecReady(FragmentManager.java:2086)
at androidx.fragment.app.FragmentManager.execSingleAction(FragmentManager.java:2106)
at androidx.fragment.app.BackStackRecord.commitNow(BackStackRecord.java:297)
at androidx.fragment.app.FragmentContainerView.onAttachedToWindow(FragmentContainerView.java:177)
at android.view.View.dispatchAttachedToWindow(View.java:18390)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3397)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3404)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3404)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3404)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3404)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3404)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3404)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3404)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3404)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1808)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1507)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7431)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1019)
at android.view.Choreographer.doCallbacks(Choreographer.java:830)
at android.view.Choreographer.doFrame(Choreographer.java:765)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1005)
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:6698)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:495)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:859)