toast messages with image android studio code example
Example 1: toast code in android studio
Toast toast = Toast.makeText(this, "message", Toast.LENGTH_LONG;);
toast.show();
Example 2: android studio make toast appear at top of screen
Toast toast= Toast.makeText(getApplicationContext(),
"Your string here", Toast.LENGTH_SHORT);
toast.setGravity(Gravity.TOP|Gravity.CENTER_HORIZONTAL, 0, 0);
toast.show();