AlertDialog简单工具类
来源:互联网 发布:tcl868ak编程 编辑:程序博客网 时间:2024/06/05 22:37
import android.app.AlertDialog;import android.content.Context;import android.content.DialogInterface;public class Utils { //AlertDialog工具类 public static AlertDialog.Builder NetAler(Context cnt,String title,String content){ //创建AlertDialog弹出框 AlertDialog.Builder builder = new AlertDialog.Builder(cnt); //设置标题 builder.setTitle(title); //设置内容 builder.setMessage(content); //AlertDialog点击事件(确定) builder.setPositiveButton("确定", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { //todo 逻辑操作 } }); //AlertDialog点击事件(取消) builder.setNegativeButton("取消", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { //todo 逻辑操作 } }); //显示AlertDialog builder.show(); return builder; }}
阅读全文
0 0
- AlertDialog简单工具类
- android AlertDialog 工具类
- Android AlertDialog类的几个简单实例
- AlertDialog的简单实例
- 简单对话框AlertDialog
- AlertDialog的简单学习
- AlertDialog的简单封装
- AlertDialog 简单使用方法
- AlertDialog 简单自定义
- AlertDialog的简单实用
- AlertDialog的简单使用
- AlertDialog 对话框简单Dome
- 拿去就能用的 AlertDialog 封装工具类
- 简单记录,倒计时的AlertDialog
- 记录简单的AlertDialog代码
- Android AlertDialog的简单实用
- AlertDialog 的简单用法效果图
- 对AlertDialog的简单认识
- xshell常用命令
- 海航好不好?看海航集团的旅游行业的升级换代就知道
- 基于开源库实现云PACS的方案
- 【C#】不安全代码
- 堆排序
- AlertDialog简单工具类
- Android Studio 3.0新功能介绍
- Codeforces Round #443 (Div. 2) D. Teams Formation
- 通过输入省份 名字 来获取经纬度 百度地图
- SIM800使用AT进行GPRS建立TCP远程连接
- shiro学习
- 7-2 换硬币(20 分)
- Flowable中的多实例事件
- HTML <span> 标签