Check out example codes for "android studio Toast usage". It will help you in understanding the concepts better.

Code Example 1

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

    Toast toast = Toast.makeText(context, text, duration);
    toast.show();

Learn ReactJs, React Native from akashmittal.com