Friday, 9 May 2014

Toast - Special Feature in Android

xample,Android Toast,Toast Image,Toast notification,android examples

Hi Guys already we have seen a little introduction about Android.Lets move to some of the features provided by Android. Firstly we are going to see about a concept of feedback or notification alike mechanism Toast.

A Toast provides simple feedback about an operation in a small popup. It only fills the amount of space required for the message and the current activity remains visible and interactive. For example, After sending a message it shows message send . Toasts automatically disappear after a timeout.

General procedure  to create a toast,
First, instantiate a Toast object with one of the makeText() methods. This method takes three parameters: the application Context, your message, and the duration for the toast. It returns a properly  Toast object. You can display it by toast followed by show(),as shown in the following example:


 


you may also write it as,



 In our next post we can see about how to create a custom toast alert etc.

Toast,toast alert,toast example,Android Toast,Toast Image,Toast notification,android examples

 
 

0 comments:

Post a Comment