views:

35

answers:

1

Is there anyway I can tell a Toast Notification to show up only for a specified amount of time. Generally shorter then a regular toast message.

A: 

No.

You can do something like:

Toast a = Toast.makeText(this, "a", Toast.LENGTH_LONG);
a.setDuration(300);

but it will not show itself.

The duration should be either LENGTH_SHORT or LENGTH_LONG.

Macarse