Answers for "android studio toast top"

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 Toast usage

Context context = getApplicationContext();
    CharSequence text = "Hello toast!";
    int duration = Toast.LENGTH_SHORT;

    Toast toast = Toast.makeText(context, text, duration);
    toast.show();
Posted by: Guest on August-12-2020

Browse Popular Code Answers by Language