2

Possible Duplicate:
Can an Android Toast be longer than “Toast.LENGTH_LONG”?

Is there a way to make Toast messages last longer than Toast.LENGTH_LONG. I don't feel this length of time is quite long enough for the user to read the notification I'm displaying.

Community
  • 1
  • 1
Andrew
  • 20,756
  • 32
  • 99
  • 177
  • 2
    I am afraid not by definition of Toast.makeText(). But if your message is such intense, I think you should consider other means like Notification or so. – xandy Jan 14 '11 at 16:02
  • 2
    Take a look at the answers here: http://stackoverflow.com/questions/2220560/can-an-android-toast-be-longer-than-toast-length-long – McStretch Jan 14 '11 at 16:02
  • I'm intending to show the user a little help message the first time they visit the screen. I don't think status bar notifications will suffice here. Is there something else like Toast I can use? Or am I looking at building my own popup? – Andrew Jan 14 '11 at 16:15
  • I don't think this is possible. Check the answer from here: http://stackoverflow.com/questions/2220560/can-an-android-toast-be-longer-than-toast-length-long – DanO Jan 14 '11 at 16:04
  • I see. My intention here is to show a little help message when the user visits a screen for the first time. I don't think a status bar notification will meeting these needs. It needs to look nice and pop up on the screen much like a Toast message. Do you have any other suggestions for built-in notifications that I might utilize? Or am I looking at building my own? – Andrew Jan 14 '11 at 16:09
  • @Andrew, try show an AlertDialog. – Vladimir Ivanov Jan 14 '11 at 16:19
  • I agree. An AlertDialog would probably be the best bet. You could probably also add a timer that automatically closes the dialog after a certain period of time. – DanO Jan 14 '11 at 16:52
  • Or you can use a little hack as described [here](http://thinkandroid.wordpress.com/2010/02/19/indefinite-toast-hack/) – Skip Nov 06 '11 at 17:08
  • Create a Dialog, and then start a timer. You can dismiss it after any length of time. – Matt Jan 14 '11 at 16:32

1 Answers1

6

For this kind of messages there is the Dialog class. Actually to be more precise the AlertDialog class. A help text should be visible to the user as long as the user needs that help message.

You should also take a look at the Creating Dialogs article on the developers site.

Octavian Helm
  • 39,405
  • 19
  • 98
  • 102