databinding-with-livedata-tutorial icon indicating copy to clipboard operation
databinding-with-livedata-tutorial copied to clipboard

Two Toasts

Open labermt opened this issue 6 years ago • 1 comments

The toast is called twice:

        Toast.makeText(this, it, Toast.LENGTH_SHORT).show()

Any idea why and how to stop it?

To reproduce, press "SELECT RANDOM FRUIT FOR EDITTEXT" with a breakpoint on MainActivity.kt line #29

I have the same problem in my code I built based on this example and in my code the user isn't just given a toast, so it is causing trouble.

Thank you for any input.

labermt avatar Aug 27 '19 17:08 labermt

I found a solution to this issue check out the solution here https://stackoverflow.com/a/59772481/6534027 I just didn't want to re-type the same answer twice.

MohamedAlaaEldin636 avatar Jan 16 '20 15:01 MohamedAlaaEldin636