I want to use the constant of “Toast” in the delay.
When I write a number it fine, but when I use for example "Toast.LENGTH_LONG", it immediately execute the code in side it, and does not wait as I wanted.
Because the value of Toast.LENGTH_LONG is 1.
So you are passing a value of 1 millisecond as the 2nd parameter to the postDelayed() method.
1 millisecond isn't a very long period of time
Because the value of Toast.LENGTH_LONG is 1.
So you are passing a value of 1 millisecond as the 2nd parameter to the postDelayed() method.
1 millisecond isn't a very long period of time
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.