Here you can find the source of makeSimpleDialog(String title, String text)
public Dialog makeSimpleDialog(String title, String text)
//package com.java2s; //License from project: Apache License import android.app.Activity; import android.app.AlertDialog; import android.app.Dialog; import android.util.Log; public class Main { static final String TAG = "GameHelper"; /**// ww w. j a v a2 s. c o m * The Activity we are bound to. We need to keep a reference to the Activity * because some games methods require an Activity (a Context won't do). We * are careful not to leak these references: we release them on onStop(). */ Activity mActivity = null; static Dialog makeSimpleDialog(Activity activity, String text) { return (new AlertDialog.Builder(activity)).setMessage(text) .setNeutralButton(android.R.string.ok, null).create(); } static Dialog makeSimpleDialog(Activity activity, String title, String text) { return (new AlertDialog.Builder(activity)).setMessage(text) .setTitle(title) .setNeutralButton(android.R.string.ok, null).create(); } public Dialog makeSimpleDialog(String text) { if (mActivity == null) { logError("*** makeSimpleDialog failed: no current Activity!"); return null; } return makeSimpleDialog(mActivity, text); } public Dialog makeSimpleDialog(String title, String text) { if (mActivity == null) { logError("*** makeSimpleDialog failed: no current Activity!"); return null; } return makeSimpleDialog(mActivity, title, text); } void logError(String message) { Log.e(TAG, "*** GameHelper ERROR: " + message); } }