Answers for "toast on top android"

0

android studio make toast appear at top of screen

Toast toast = Toast.makeText(test.this,"bbb", Toast.LENGTH_LONG);
 toast.setGravity(Gravity.CENTER, 0, 0);
 toast.show();
Posted by: Guest on November-20-2020
0

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();
Posted by: Guest on November-20-2020

Browse Popular Code Answers by Language