Programming Tips - How can I display a quick popup message?

Date: 2016jun16 OS: Android Level: beginner Q. How can I display a quick popup message? A. Use toast or snackbar. Snackbar is the more modern way so lets see it first:
import android.support.design.widget.Snackbar; Snackbar.make(view, "Hello World", Snackbar.LENGTH_LONG) .setAction("Action", null).show();
Toast:
import android.widget.Toast; Toast.makeText(context, "Hello World", Toast.LENGTH_LONG).show();