Dialog alertDialog = new AlertDialog.Builder(this,AlertDialog.THEME_TRADITIONAL) .setTitle(R.string.msg_dialog_title) .setPositiveButton("确定", null) .setNegativeButton("取消", null) .setItems(list.toArray(new String[list.size()]), new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { et.setText(list.get(which)); et.setSelection(et.getText().length()); } }).create(); alertDialog.show();
Builder(this,AlertDialog.THEME_TRADITIONAL)中第二个参数可以设置不同的Theme
AlertDialog.THEME_HOLO_DARK
AlertDialog.THEME_HOLO_LIGHT
以上两种见下图,分别为深色/浅色
AlertDialog.THEME_DEVICE_DEFAULT_DARK
AlertDialog.THEME_DEVICE_DEFAULT_LIGHT
以上两种见下图,分别为深色/浅色
相关推荐
通过自定义style改变framework原生AlertDialog样式,包括背景图片、按扭图片、标题样式、标题栏下方分割线颜色、按扭图片、按钮间分隔线等等。好多天的沤血作品,请大家勿喷。
NULL 博文链接:https://txlong-onz.iteye.com/blog/930222
alertDialog,android alertDialog大全
Android之AlertDialog源码
AlertDialog: a. 自定义List View b. 支持三种按钮 c. 单选按钮
Android中实现Iphone样式的AlertDialog.rar
AlertDialog 一个可自定义UI风格的对话框,用法和原生的AlertDialog类似。 效果图 下面是一个仿ios风格的对话框效果图: 使用 用法如下所示: AlertDialog.Builder builder = new AlertDialog.Builder(this); ...
在Android中实现Iphone样式的AlertDialog; 使用Dialog实现。
Android AlertDialog对话框 自定义实现遮罩层
android自定义AlertDialog,例如支付页面,先弹出自定义AlertDialog询问是否愿意支付,确定则弹出另外一个自定义AlertDialog,选择支付方式,android自定义AlertDialog,android自定义AlertDialog,android自定义...
Android中实现Iphone样式的AlertDialog源码,是一个很不错的Android源码,有兴趣的伙伴们抽时间可以看一下把。
android AlertDialog使用例程 一个在安卓平台上开发使用AlertDialog的例子 很实用很全哦
AlertDialog的各种用法,包含简单、复杂、列表、自定义、日期时间、进度条等的对话框
1、从Activity的TextView中获取字符串设置到AlertDialog的TextView和EditText中 2、将AlertDialog的EditText中的值设置到Activity的TextView中 新手在自定义AlertDialog上的疑问笔者猜测主要有两个: 1、自定义的...
警告框AlertDialog,实现点击弹出警告框,适合初学者下载学习
android 使用alertdialog创建自定义对话框