Code example for AlertDialog.Builder

Methods: setCancelable, setIcon, setNegativeButton, setPositiveButton, setTitle, setView

     * Creates a new ProgressDialog 
     * @param activity 
     * @param progressDialogTitleId 
     *            The resource id for the title. If this is less than or equal to 0, a default title 
     *            is used. 
     * @param progressDialogMsgId 
     *            The resource id for the message. If this is less than or equal to 0, a default 
     *            message is used. 
     * @return The new dialog 
    public static ProgressDialog newProgressDialog(final Activity activity,
            int progressDialogTitleId, int progressDialogMsgId) {
        ProgressDialog progressDialog = new ProgressDialog(activity);
        if (progressDialogTitleId <= 0) {
            progressDialogTitleId = R.string.ign_progress_dialog_title;
        if (progressDialogMsgId <= 0) {
            progressDialogMsgId = R.string.ign_progress_dialog_msg;
Stop searching for code, let great code find you!  Add Codota to your java IDE