Toast.makeText( getBaseContext(), "message",Toast.LENGTH_SHORT).show();
Toast.makeText(requireContext(), "message", Toast.LENGTH_LONG;).show();
Toast toast;
private void toast(String msg) {
if (toast != null) toast.cancel();
toast = Toast.makeText(getBaseContext(), msg, Toast.LENGTH_SHORT);
toast.show();
}
// Short form - Work in Kotlin
Toast.makeText(this, text: "Hello World", Toast.LENGTH_LONG).show()