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 ?
You can see an example here
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();