I try to set my Toast show duration like 1minute. I try this:
final Toast toast = Toast.makeText(getApplicationContext(), "MESSAGE", Toast.LENGTH_LONG );
toast.show();
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
toast.cancel();
}
}, 60000);
Thanks for your help.
Since LENGTH_SHORT is 2 seconds (and LENGTH_LONG is 3.5 seconds), try this:
for (int i=0; i < 30; i++)
{
Toast.makeText(this, "MESSAGE", Toast.LENGTH_SHORT).show();
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With