Code example for AlertDialog.Builder

Methods: create, setMessage, setTitle

0
     *          Alert dialog title 
     * @param text 
     *          Alert dialog message 
     */ 
    public static void showAlert(Context context, String title, String text) {
        Builder alertBuilder = new Builder(context);
        alertBuilder.setTitle(title);
        alertBuilder.setMessage(text);
        alertBuilder.create().show();
    } 
 
    /** 
     * A proxy for Log.d api that kills log messages in release build. It 
     * not recommended to send sensitive information to log output in 
     * shipping apps. 
     * 
     * @param tag 
     * @param msg 
     */ 
    public static void logd(String tag, String msg) {