实现点击AlertDialog上按钮时不关闭对话框...
分类:
移动开发 时间:
2014-11-25 12:50:38
阅读次数:
161
Android的对话框有两种:PopupWindow和AlertDialog。它们的不同点在于:AlertDialog的位置固定,而PopupWindow的位置可以随意AlertDialog是非阻塞线程的,而PopupWindow是阻塞线程的PopupWindow的位置按照有无偏移分,可以分为偏移和...
分类:
移动开发 时间:
2014-11-25 12:19:10
阅读次数:
189
1、AlertDialog对话框
AlertDialog.Builder builder=new Builder(HomeActivity.this);
builder.setTitle("提示");
builder.setMessage("是否删除信息?");
builder.setPositiveButton("是",new OnClickListener() {
...
分类:
移动开发 时间:
2014-11-20 12:05:52
阅读次数:
231
建造者模式,同样是一种创建型模式,用来创建对象。 建造者模式在Android API中随处可见,譬如 AlertDialog 的对象创建过程,通常可见AlertDialog.Builder ,这种方式就是使用的建造者模式。 为了说明建造者模式,辅以Android代码:1 longinDia...
分类:
其他好文 时间:
2014-11-19 18:23:55
阅读次数:
194
package com.ceac.deng;import android.R.string;import android.support.v7.app.ActionBarActivity;import android.app.AlertDialog;import android.app.AlertDialog.Builder;import android.content.DialogInterfa...
分类:
移动开发 时间:
2014-11-19 16:10:59
阅读次数:
260
(转自:http://blog.csdn.net/winson_jason/article/details/8485524)当我们在用到Android alertDialog创建对话框 的时候,我们会遇到一个问题就是:我们添加的按钮不论是用setNegativeButton还是用setPositiv...
分类:
移动开发 时间:
2014-11-19 15:28:08
阅读次数:
183
效果:
实现步骤:
1.定义AlertDialog的布局
android:layout_width="100dp"
android:layout_height="100dp"
android:background="@android:color/holo_green_dark" >
android:id="@+i...
分类:
其他好文 时间:
2014-11-19 14:15:36
阅读次数:
194
Android中AlertDialog用法大全...
分类:
移动开发 时间:
2014-11-19 02:00:08
阅读次数:
189
返回上一个界面finish()方法本文地址: http://blog.csdn.net/caroline_wendyAndroid可以使用finish()方法,实现函数返回的功能,当不是Activity内部调用时,需要使用getActivity()方法的返回值Activity调用。如实现了一个提示框(AlertDialog),包含两个按钮,返回和设置;一个是跳转定位服务设置界面,一个是返回上一级界...
分类:
移动开发 时间:
2014-11-18 09:12:11
阅读次数:
300
#从service调用dialog ##需要权限 ##示例代码 Dialog dialog = new AlertDialog.Builder(ctx).create(); dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT); dialog.show(); ##注意事项...
分类:
移动开发 时间:
2014-11-14 18:09:27
阅读次数:
207