Share
Introduction
A toast notification is a message that pops up on the surface of the window. It only fills the amount of space required for the message and the user's current activity remains visible and interactive. The notification automatically fades in and out, and does not accept interaction events.The Basics
You can create customized Toasts and setting its display position, as you like.Here's a little code snippet to demonstrate how it works:
1 |
String text = “example toast text!”; |
Creating a Custom Toast View
If a simple text message isn't enough, you can create a customized layout for your toast notification. We are going to use custom view to create a fancy Toast. You could also use your own layout.The Toast's setView method's going to do the job for us.
1 |
Context context = getApplicationContext(); |
Hope you found it useful, feel free to ask!
Thanks to HelloAndroid for this article!
Comments (1)
-
2012-03-28 15:52:30 |Author| sunkaraleelarani@gmail.com
Only registered users can write comments!






ghghg