Show complain Alert Dialog - Android User Interface

Android examples for User Interface:Alert Dialog

Description

Show complain Alert Dialog

Demo Code

import android.app.Activity;
import android.util.Log;
import android.app.AlertDialog;

public class Main{
    static void complain(Activity act, String Tag, String message) {
        Log.e(Tag, "**** Error: " + message);
        alert(act, Tag, "Error: " + message);
    }/*from   w  w  w . j ava  2 s.  c o m*/
    static void alert(Activity act, String Tag, String message) {
        AlertDialog.Builder bld = new AlertDialog.Builder(act);
        bld.setMessage(message);
        bld.setNeutralButton("OK", null);
        Log.d(Tag, "Showing alert dialog: " + message);
        bld.create().show();
    }
}

Related Tutorials