AlertDialog.Builder mMissingVoicemailDialog = new AlertDialog.Builder(this)
.setTitle(R.string.no_vm_number)
.setMessage(R.string.no_vm_number_msg)
.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
if (VDBG) log("Missing voicemail AlertDialog: POSITIVE click...");
msg.sendToTarget(); // see dontAddVoiceMailNumber()
}})
.setNegativeButton(R.string.add_vm_number_str,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
if (VDBG) log("Missing voicemail AlertDialog: NEGATIVE click...");
msg2.sendToTarget(); // see addVoiceMailNumber()
}})
.setOnCancelListener(new OnCancelListener() {
public void onCancel(DialogInterface dialog) {
if (VDBG) log("Missing voicemail AlertDialog: CANCEL handler...");
msg.sendToTarget(); // see dontAddVoiceMailNumber()
}})
.create();
分享到:
相关推荐
1、从Activity的TextView中获取字符串设置到AlertDialog的TextView和EditText中 2、将AlertDialog的EditText中的值设置到Activity的TextView中 新手在自定义AlertDialog上的疑问笔者猜测主要有两个: 1、自定义的...
alertDialog,android alertDialog大全
Android AlertDialog对话框 自定义实现遮罩层
android AlertDialog对话框的类型集合 ,比较全面的讲述了 AlertDialog 的 种类 , Demo 的综合性比较强 , Demo 可直接运行
android AlertDialog使用例程 一个在安卓平台上开发使用AlertDialog的例子 很实用很全哦
AlertDialog的各种用法,包含简单、复杂、列表、自定义、日期时间、进度条等的对话框
Android之简单的登录界面的实现、使用 AlertDialog和全局广播实现被强制下线功能、自定义一个带有清除按钮的EditText
android 使用alertdialog创建自定义对话框
警告框AlertDialog,实现点击弹出警告框,适合初学者下载学习
自定义AlertDialog(仿微信)
一个简单的自定义AlertDialog
Android 自定义实现一个AlertDialog对话框,提示框或警告框弹出式对话框,套用了系统Holo风格,生成符合系统主题的AlertDialog.Builder,可以分别定义弹出提示的标题文字及提示内容: builder.setTitle("Test ...
Android之AlertDialog源码
* 各种功能实现弹窗(自定义弹窗位置,添加动画效果) * 1.设置AlertDialog弹窗并且2秒后自动关闭(自定义关闭AlertDialog) * 2.设置popuwindow弹窗并且2秒后自动关闭 * 3.弹出后自带震动提示
Google官方推荐使用DialogFragment代替AlertDialog,很好的解决屏幕旋转产生的问题。。。