showToast

fun Context.showToast(text: CharSequence, duration: Int = Toast.LENGTH_SHORT)

Shows a short-lived toast with text.

This combines Toast.makeText and Toast.show for the common fire-and-forget case.


fun Context.showToast(@StringRes text: Int, duration: Int = Toast.LENGTH_SHORT)

Shows a short-lived toast from a string resource.

This combines string-resource lookup, Toast.makeText, and Toast.show.