Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Toast Java
public class BaseActvity extends Activity{
public void toast(String message, int duration) {
Toast.makeText(this, message, duration);
public class MainActvity extends BaseActvity{
protected void onCreate(Bundle savedInstanceState) {
toast("Hello, Java", Toast.LENGTH_SHORT);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment