package com.example.dialog2;import android.os.Bundle;import android.app.Activity;import android.app.AlertDialog;import android.app.Dialog;import andro...
分类:
移动开发 时间:
2015-01-22 17:33:00
阅读次数:
185
package com.example.helloworld;import android.os.Bundle;import android.app.Activity;import android.app.AlertDialog;import android.app.Dialog;import an...
分类:
移动开发 时间:
2015-01-22 12:35:56
阅读次数:
144
ackage com.example.helloworld;import android.os.Bundle;import android.app.Activity;import android.app.AlertDialog;import android.app.Dialog;import and...
分类:
移动开发 时间:
2015-01-22 11:05:02
阅读次数:
119
.java代码如下:
package org.lxh.demo;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.content.SharedPreferen...
分类:
移动开发 时间:
2015-01-21 18:24:44
阅读次数:
221
使用AlertDialog.Builder虽然也可以自定义自己的Dialog。但是如果Dialog中有EditText,你会发现点击EditText系统可能不会弹出软键盘。这个时候使用继承Dialog的方法就不会出现此问题。自定义Dialog示例代码:publicclassMyDialogextendsDialog{
privateContextcontext;
//OnCreat..
分类:
移动开发 时间:
2015-01-20 18:22:00
阅读次数:
202
ProgressDialog的使用ProgressDialog 继承自AlertDialog,AlertDialog继承自Dialog,实现DialogInterface接口。ProgressDialog的创建方式有两种,一种是new Dialog ,一种是调用Dialog的静态方法Dialog.s...
分类:
其他好文 时间:
2015-01-18 15:34:36
阅读次数:
117
应用中常用的弹出对话框,提示一些信息,或是让用户输入一些信息。在此记下使用步骤。1、建立对话框的界面,使用xml文件。 2、获取对话框界面及界面下的组件,如获取EditText因为可能要取它的Text View view = getLayoutInflater().inf...
分类:
其他好文 时间:
2015-01-17 12:27:03
阅读次数:
178
ProgressDialog的使用ProgressDialog 继承自AlertDialog,AlertDialog继承自Dialog,实现DialogInterface接口。ProgressDialog的创建方式有两种,一种是new Dialog ,一种是调用Dialog的静态方法Dialog.s...
分类:
其他好文 时间:
2015-01-15 17:35:39
阅读次数:
177
(1)布局文件:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_heigh...
分类:
移动开发 时间:
2015-01-14 12:46:33
阅读次数:
219
在android中常常会遇到与context有关的内容浅论一下context : 在语句 AlertDialog.Builder builder = new AlertDialog.Builder(this); 中,要求传递的 参数就是一个context,在这里我们传入的是this,那么这个this...
分类:
移动开发 时间:
2015-01-13 14:04:28
阅读次数:
150