Toast messages(android)

Moving on with android Now we will focus on programming ,,,,,,,,

Firstly I would like to introduce a new term called toast messages .


what is toast..?
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, navigating away from an email before you send it triggers a "Draft saved" toast to let you know that you can continue editing later. Toasts automatically disappear after a timeout.
Image result for toast in android


Some methods for toast

Toast.makeText(context, text, duration).show()

OR you can get the context of your Application but for that you have to take the object of toast such Toast t=Toast.makeText(getApplicationContext(),"This is a Toast message",Toast.Length_short)
 and you can run as t.show.

So from above discussion we could track out that Toast.makeText ... this means that makeText is a method which is a static method and Toast is a class .

 

Comments

Popular posts from this blog

State space search / blocks world problem by heuristic approach /TIC TAC TOE

Navigation in Vaadin.

Drag and drop items from one Grid to another