之前做自定义对话框需要宽度铺满全屏时,基本是这样操作的.AlertDialogdialog=newAlertDialog.Builder(context).create();
dialog.show();
Windowwindow=dialog.getWindow();
WindowManager.LayoutParamslp=window.getAttributes();
lp.width=WindowManager.LayoutParams.MATCH_..
分类:
移动开发 时间:
2016-06-17 19:45:02
阅读次数:
3266
一、描述: 近期一个项目中需要开发一种类似表格的界面来显示和配置参数,Android并无直接类似表格的控件支持,我采用了ListView中布局EditText和TextView来实现,其中TextView用来显示参数表示符,EditText用来显示参数值,用一个自定义AlertDialog弹出显示, ...
分类:
移动开发 时间:
2016-06-17 14:23:31
阅读次数:
436
Dialog 使用总结Dialog 是Android中对话框相关的类,起到相关提示的作用。Dialog在Android 中主要分为以下几类:
AlertDialog :警告对话框(提示对话框)
ProgressDialog:进度对话框
DatePickerDialog:日期选择对话框
TimerPickerDialog: 时间选择对话框
自定义对话框
下面将按照如上所分类,进行一一介绍。AlertD...
分类:
其他好文 时间:
2016-06-16 14:46:51
阅读次数:
192
于是就小小的模仿了下自己写了这个这样的效果,主要代码如下:dlg = new AlertDialog.Builder(context).create();dlg.show();dlg.getWindow().setContentView(R.layout.alert_style);LayoutInf ...
分类:
移动开发 时间:
2016-06-13 06:34:56
阅读次数:
263
package com.example.wang.tongxunlu; import android.app.AlertDialog; import android.content.DialogInterface; import android.support.v7.app.AppCompatAct ...
分类:
其他好文 时间:
2016-06-12 00:13:58
阅读次数:
291
原文网址:http://blog.csdn.net/jumping_android/article/details/7571309 protected void dialog() { AlertDialog.Builder builder = new Builder(AccoutList.this) ...
分类:
移动开发 时间:
2016-06-10 23:13:46
阅读次数:
186
package com.example.wang.blacklist; import android.app.AlertDialog; import android.content.DialogInterface; import android.os.Bundle; import android.s ...
分类:
其他好文 时间:
2016-06-08 15:54:31
阅读次数:
311
使用PopupWindow可实现弹出窗口效果,,其实和AlertDialog一样,也是一种对话框,两者也经常混用,但是也各有特点。下面就看看使用方法。首先初始化一个PopupWindow,指定窗口大小参数。 也可以分开写: 当然也可以手动设置PopupWindow大小。 设置进场动画: 当有mPop ...
分类:
移动开发 时间:
2016-06-06 22:03:58
阅读次数:
346
(一):DialogFragment的使用优点:* 1,屏幕的选择和按下返回键能更好的管理它的什么周期方法
* 2,DialogFragment也允许开发者把Dialog作为内嵌的组件进行重用,
类似Fragment(可以在大屏幕和小屏幕显示出不同的效果)
* 3,横竖屏切换,传统的new AlertDialog在屏幕旋转时, 第一不会保存用户输入的值,
而通过DialogFragm...
分类:
移动开发 时间:
2016-06-02 14:22:37
阅读次数:
247
下面直接来看下主控制类代码 import java.io.File; import android.app.Activity; import android.app.AlertDialog; import android.content.DialogInterface; import android ...
分类:
移动开发 时间:
2016-05-28 11:35:13
阅读次数:
328