android提示框
// 对话框
AlertDialog.Builder builder = new Builder(MainActivity.this);
builder.setMessage("是否确认删除!")
.setPositiveButton("确认",
new DialogInterface.OnClickListener() { @Override
public void onClick(DialogInterface dialog,
int which) {
// TODO Auto-generated method stub dialog.dismiss();
Toast.makeText(MainActivity.this,
"删除成功", 0).show();
}
})
.setNegativeButton("取消删除",
new DialogInterface.OnClickListener() { @Override
public void onClick(DialogInterface dialog,
int which) {
// TODO Auto-generated method stub
dialog.cancel();
Toast.makeText(MainActivity.this, "取消成功",
0).show();
}
}).create().show();
android提示框的更多相关文章
- Android提示框与通知的使用
1.通知 Android 3.0以前使用的方法 NotificationManager nm = (NotificationManager) getSystemService(NOTIFICATION ...
- android标题栏上面弹出提示框(二) PopupWindow实现,带动画效果
需求:上次用TextView写了一个从标题栏下面弹出的提示框.android标题栏下面弹出提示框(一) TextView实现,带动画效果, 总在找事情做的产品经理又提出了奇葩的需求.之前在通知栏显示 ...
- android标题栏下面弹出提示框(一) TextView实现,带动画效果
产品经理用的是ios手机,于是android就走上了模仿的道路.做这个东西也走了一些弯路,写一篇博客放在这里,以后自己也可用参考,也方便别人学习. 弯路: 1.刚开始本来用PopupWindow去实现 ...
- Android第三方开源对话消息提示框:SweetAlertDialog(sweet-alert-dialog)
Android第三方开源对话消息提示框:SweetAlertDialog(sweet-alert-dialog) Android第三方开源对话消息提示框:SweetAlertDialog(sweet- ...
- Android应用开发学习之Toast消息提示框
作者:刘昊昱 博客:http://blog.csdn.net/liuhaoyutz 本文我们来看Toast消息提示框的用法.使用Toast消息提示框一般有三个步骤: 1. 创建一个Toast对象.可 ...
- Cocos2d-x C++调用Android弹出提示框
转载请注明地址,谢谢.. Cocos2d-x中提供了一个JniHelper类来让我们对Jni进行操作. (PS:弄了一天想自己写代码操作Jni的,但是总是出错,技术差不得不使用Cocos2d-x现成的 ...
- 如何实现android蓝牙开发 自动配对连接,并不弹出提示框
之前做一个android版的蓝牙 与血压计通讯的项目,遇到最大的难题就是自动配对. 上网查资料说是用反射createBond()和setPin(),但测试时进行配对还是会出现提示,但配对是成功了 我就 ...
- Android 讲述Help提示框
Android 讲述Help提示框 XML/HTML代码 <stringname="help_dialog_text"> <i>Author:fonter. ...
- Android消息提示框Toast
Android消息提示框Toast Toast是Android中一种简易的消息提示框.和Dialog不一样的是,Toast是没有焦点的,toast提示框不能被用户点击,而且Toast显示的时间有限,t ...
随机推荐
- contentOffset,frame,bounds,contentSize,ContentInset
contentOffset, 在UIScrollview里面滚动条用的最多,比如网易新闻的滚动条,肯定会用到这个. 我认为:它是下一个要显示的图片的左上角.设置了这个左上角后,下一次滚动时,邮戳直接到 ...
- inline-block元素的空白间距
inline-block元素的空白间距 html代码 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN&quo ...
- JS-JQ实现TAB选项卡
原理: 有两种实现方法, 方法一利用css的display:none 和display:block:交替实现: 方法二利用css的z-index:
- The Secrets of Oracle Row Chaining and Migration
from http://www.akadia.com/services/ora_chained_rows.html Overview If you notice poor performance in ...
- free 命令
free命令可以显示Linux系统中空闲的.已用的物理内存及swap内存,及被内核使用的buffer.在Linux系统监控的工具中,free命令是最经常使用的命令之一. 1.命令格式: free [参 ...
- linux重置mysql密码
1.使用重置脚本 wget http://soft.vpser.net/lnmp/ext/reset_mysql_root_password.sh;sh reset_mysql_root_passwo ...
- 打补丁patch 命令使用
打补丁patch 命令使用 http://www.cnblogs.com/huanghuang/archive/2011/07/14/2106402.html patch 命令用于打补丁,补丁文件是使 ...
- makefile中引用其他makefile方法
在Makefile中引用其他Makefile文件的方法是,使用inclue filename.mk
- python 内存监控模块之memory_profiler
0. memory_profiler是干嘛的 This is a python module for monitoring memory consumption of a process as wel ...
- javaee中的中文乱码处理
浏览器正常显示 response.setContentType("text/html;charset='utf-8'") response.setCharacterEncoding ...