当前位置: 首页>>代码示例>>Java>>正文


Java Builder.setMessage方法代码示例

本文整理汇总了Java中android.app.AlertDialog.Builder.setMessage方法的典型用法代码示例。如果您正苦于以下问题:Java Builder.setMessage方法的具体用法?Java Builder.setMessage怎么用?Java Builder.setMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.app.AlertDialog.Builder的用法示例。


在下文中一共展示了Builder.setMessage方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createDialog

import android.app.AlertDialog.Builder; //导入方法依赖的package包/类
public static Dialog createDialog(Context context, Bundle arguments, OnClickListener onClickListener) {
    Builder builder = new Builder(context);
    builder.setTitle(arguments.getString(ErrorDialogManager.KEY_TITLE));
    builder.setMessage(arguments.getString(ErrorDialogManager.KEY_MESSAGE));
    if (ERROR_DIALOG_ICON != 0) {
        builder.setIcon(ERROR_DIALOG_ICON);
    }
    builder.setPositiveButton(17039370, onClickListener);
    return builder.create();
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:11,代码来源:ErrorDialogFragments.java

示例2: a

import android.app.AlertDialog.Builder; //导入方法依赖的package包/类
public static Dialog a(Context context, String str, String str2, String str3, OnClickListener onClickListener, String str4, OnClickListener onClickListener2) {
    Builder builder = new Builder(context);
    if (a) {
        if (!(TextUtils.isEmpty(str4) || onClickListener2 == null)) {
            builder.setPositiveButton(str4, onClickListener2);
        }
        if (!(TextUtils.isEmpty(str3) || onClickListener == null)) {
            builder.setNegativeButton(str3, onClickListener);
        }
    } else {
        if (!(TextUtils.isEmpty(str3) || onClickListener == null)) {
            builder.setPositiveButton(str3, onClickListener);
        }
        if (!(TextUtils.isEmpty(str4) || onClickListener2 == null)) {
            builder.setNegativeButton(str4, onClickListener2);
        }
    }
    builder.setTitle(str);
    builder.setMessage(str2);
    Dialog create = builder.create();
    create.setCanceledOnTouchOutside(false);
    create.setOnKeyListener(new e());
    try {
        create.show();
    } catch (Throwable th) {
    }
    return create;
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:29,代码来源:d.java

示例3: showAlert

import android.app.AlertDialog.Builder; //导入方法依赖的package包/类
public static AlertDialog showAlert(final Context context, final String msg, final String title) {
	if (context instanceof Activity && ((Activity) context).isFinishing()) {
		return null;
	}

	final Builder builder = new AlertDialog.Builder(context);
	builder.setIcon(R.drawable.ic_dialog_alert);
	builder.setTitle(title);
	builder.setMessage(msg);
	builder.setPositiveButton(R.string.app_ok, new DialogInterface.OnClickListener() {

		@Override
		public void onClick(final DialogInterface dialog, final int which) {
			dialog.cancel();
		}
	});
	final AlertDialog alert = builder.create();
	alert.show();
	return alert;
}
 
开发者ID:linsir6,项目名称:TripBuyer,代码行数:21,代码来源:MMAlert.java

示例4: noNetworkDialog

import android.app.AlertDialog.Builder; //导入方法依赖的package包/类
private void noNetworkDialog(){
    Builder dialogNoNetwork;

    dialogNoNetwork = new AlertDialog.Builder(this);
    dialogNoNetwork.setCancelable(true);
    dialogNoNetwork.setOnCancelListener(new DialogInterface.OnCancelListener() {
        public void onCancel(DialogInterface dialog) {
            finish();
        }
    });
    dialogNoNetwork.setTitle(R.string.nonetwork_title);
    dialogNoNetwork.setMessage(getString(R.string.nonetwork_message));
    dialogNoNetwork.show();
}
 
开发者ID:archos-sa,项目名称:aos-FileCoreLibrary,代码行数:15,代码来源:WiFiDirectReceiverActivity.java

示例5: showDeleteHistoryConfirmation

import android.app.AlertDialog.Builder; //导入方法依赖的package包/类
private void showDeleteHistoryConfirmation() {
    Builder builder = new Builder(getParentActivity());
    builder.setMessage(LocaleController.getString("AreYouSureDeleteChanges", R.string.AreYouSureDeleteChanges));
    builder.setTitle(LocaleController.getString("AppName", R.string.AppName));
    builder.setPositiveButton(LocaleController.getString("OK", R.string.OK), new C20941());
    builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null);
    showDialog(builder.create());
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:9,代码来源:UpdateActivity.java

示例6: run

import android.app.AlertDialog.Builder; //导入方法依赖的package包/类
@Override
public void run() {
    Builder builder = new Builder(InCallActivity.this);
    Resources r = getResources();
    builder.setTitle("ZRTP supported by remote party");
    builder.setMessage("Do you confirm the SAS : " + sasString);
    builder.setPositiveButton(r.getString(R.string.yes), this);
    builder.setNegativeButton(r.getString(R.string.no), this);

    AlertDialog backupDialog = builder.create();
    backupDialog.show();
}
 
开发者ID:treasure-lau,项目名称:CSipSimple,代码行数:13,代码来源:InCallActivity.java

示例7: showDialog

import android.app.AlertDialog.Builder; //导入方法依赖的package包/类
public static void showDialog(Activity context, String strTitle, String strText, int icon) {
    if (context != null && !context.isFinishing() && !context.isRestricted()) {
        Builder tDialog = new Builder(context);
        tDialog.setIcon(icon);
        tDialog.setTitle(strTitle);
        tDialog.setMessage(strText);
        tDialog.setPositiveButton(R.string.Ensure, null);
        try {
            tDialog.show();
        } catch (Exception e) {
        }
    }
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:14,代码来源:BaseHelper.java

示例8: getCommonStructure

import android.app.AlertDialog.Builder; //导入方法依赖的package包/类
public static Dialog getCommonStructure(final Context context, String messageStr,
    DialogInterface.OnClickListener positiveListener) {
    Builder builder = new Builder(context);
    builder.setMessage(messageStr);
    builder.setPositiveButton(R.string.yes_button_txt, positiveListener)
        .setNegativeButton(R.string.no_button_txt, new DialogInterface.OnClickListener() {
            public void onClick(DialogInterface dialog, int which) {
                dialog.dismiss();
            }
        });
    return builder.create();
}
 
开发者ID:WorldBank-Transport,项目名称:RoadLab-Pro,代码行数:13,代码来源:CommonDialogs.java

示例9: showError

import android.app.AlertDialog.Builder; //导入方法依赖的package包/类
/**
 * Show a visual error message to the user.
 * 
 * @param message
 *          the message to show
 */
private void showError(String message) {
  final Builder builder = new AlertDialog.Builder(AlbumListActivity.this);
  builder.setTitle(message);
  builder.setIcon(android.R.drawable.ic_dialog_alert);
  builder.setPositiveButton("OK", new DialogInterface.OnClickListener() {
    @Override
    public void onClick(DialogInterface dialog, int which) {
      dialog.dismiss();
    }
  });
  builder.setMessage(message);
  builder.show();

}
 
开发者ID:sdrausty,项目名称:buildAPKsSamples,代码行数:21,代码来源:AlbumListActivity.java

示例10: showAlert

import android.app.AlertDialog.Builder; //导入方法依赖的package包/类
public static void showAlert(Context context, String title, String text) {
    Builder alertBuilder = new Builder(context);
    alertBuilder.setTitle(title);
    alertBuilder.setMessage(text);
    alertBuilder.create().show();
}
 
开发者ID:Dnet3,项目名称:CustomAndroidOneSheeld,代码行数:7,代码来源:FoursquareUtils.java

示例11: showAlert

import android.app.AlertDialog.Builder; //导入方法依赖的package包/类
public static void showAlert(Context context, String str, String str2) {
    Builder builder = new Builder(context);
    builder.setTitle(str);
    builder.setMessage(str2);
    builder.create().show();
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:7,代码来源:Util.java

示例12: showAlert

import android.app.AlertDialog.Builder; //导入方法依赖的package包/类
/**
 * Display a simple alert dialog with the given text and title.
 *
 * @param context
 *          Android context in which the dialog should be displayed
 * @param title
 *          Alert dialog title
 * @param text
 *          Alert dialog message
 */
@Deprecated
public static void showAlert(Context context, String title, String text) {
    Builder alertBuilder = new Builder(context);
    alertBuilder.setTitle(title);
    alertBuilder.setMessage(text);
    alertBuilder.create().show();
}
 
开发者ID:MobileDev418,项目名称:AndroidBackendlessChat,代码行数:18,代码来源:Util.java


注:本文中的android.app.AlertDialog.Builder.setMessage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。