Android examples for User Interface:Alert Dialog
Show complain Alert Dialog
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(); } }