Reputation: 69
Sometimes in certain apps when you are doing a certain action and there is an error or something , and a gray-ish square (On most phones the square has rounder corners) appears with some text in it (extra info about what happened or something like that) , and i want to know how they are called ? and how to implement them in my app via android studio ?
Upvotes: 0
Views: 60
Reputation: 225
That is called a Toast message.
The quickest way to create such a message is
Toast.makeText(this, "Message to show", Toast.LENGTH_LONG).show();
Upvotes: 2
Reputation: 8861
It's called Toast. Check its description and usage samples here: https://developer.android.com/guide/topics/ui/notifiers/toasts.html
Upvotes: 2