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

Toast doesn't get show/trigger and repeated calls for Toast result in error. #13

Closed
i-am-mani opened this issue Aug 19, 2020 · 3 comments · Fixed by #24
Closed

Toast doesn't get show/trigger and repeated calls for Toast result in error. #13

i-am-mani opened this issue Aug 19, 2020 · 3 comments · Fixed by #24
Labels
bug Something isn't working

Comments

@i-am-mani
Copy link

I tried to call the Toast from Fragment, on the Click of a Button. The Main Layout was MotionLayout if that helps.

On the button press, the toast is either delayed or never appears. Initially, I repeatedly pressed the button to trigger the Toast but the app crashed with the Exception stated below.

2020-08-19 18:47:29.961 6627-6627/ E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.omega.cart, PID: 6627
    java.lang.IllegalStateException: View android.widget.RelativeLayout{6e6c3c3 V.E...... ......I. 0,0-0,0 #7f0a00b2 app:id/color_toast_view} has already been added to the window manager.
        at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:328)
        at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:94)
        at android.widget.Toast$TN.handleShow(Toast.java:499)
        at android.widget.Toast$TN$1.handleMessage(Toast.java:403)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6692)
        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)
@mattiaferigutti
Copy link

Same here!

@JosephSanjaya
Copy link

this problem also occured to me, is there any solution??

@nntuan317
Copy link

Same for me!

@Spikeysanju Spikeysanju added the bug Something isn't working label Nov 6, 2020
@Spikeysanju Spikeysanju linked a pull request Nov 15, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants