Show Toast as an alert dialog for short of length - Android User Interface

Android examples for User Interface:Alert Dialog

Description

Show Toast as an alert dialog for short of length

Demo Code


//package com.java2s;
import android.content.Context;
import android.widget.Toast;

public class Main {
    public static void alert(Context context, String string) {
        Toast.makeText(context, string, Toast.LENGTH_SHORT).show();
    }/*from w w w  .jav a2s .co m*/
}

Related Tutorials