Trabla: Android Toast - popup messages
Solving:
Toast - a small popup with feedback. Automatically disappear after a timeout.
Toast toast = Toast.makeText(this,
"toast message text", Toast.LENGTH_LONG);
toast.show();
Predefined hardcoded delays ( !!!Can't be changed!!!):
private static final int LONG_DELAY = 3500; // 3.5 seconds
private static final int SHORT_DELAY = 2000; // 2 seconds
Hack to show more than predefined timeouts
for (int i=0; i < 2; i++)
{
Toast.makeText(this, "toast message text", Toast.LENGTH_LONG).show();
}
No comments:
Post a Comment