一直看到好多应用里面,随手使用getApplicationContext(),不想说也不乐意说,今天转载一篇文章区分两者的区别:在android中常常会遇到与context有关的内容浅论一下context : 在语句 AlertDialog.Builder builder = new AlertDi...
分类:
移动开发 时间:
2015-01-28 14:29:19
阅读次数:
126
我的个人网站 :www.shichengwu.com 登陆实例客户端处理逻辑:LoginActivity package com.amaker.wlo;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
...
分类:
移动开发 时间:
2015-01-28 13:13:25
阅读次数:
177
在Android中 我们经常会用AlertDialog来显示对话框。通过这个对话框是显示在屏幕中心的。但在某些程序中,要求对话框可以显示在不同的位置。例如,屏幕的上 方或下方。要实现这种效果。就需要获得对话框的Window对象,获得这个Window对象有多种方法。最容易的就是直接通过AlertDia...
分类:
移动开发 时间:
2015-01-27 20:08:02
阅读次数:
150
最近在做项目,小组几个回了家。界面暂时没人做,用到自定义对话框只能临时去学。现在把对话框的相关整理。
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_wid...
分类:
移动开发 时间:
2015-01-26 21:06:55
阅读次数:
219
.java代码如下:
package org.lxh.demo;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.Notification;
import android.app.NotificationManager;
impo...
分类:
移动开发 时间:
2015-01-26 10:16:53
阅读次数:
206
android service Dialog 弹出框 相信大家第一次在Service中实现 AlertDialog 弹出框时,都会遇到应用闪退然后报出这个异常:Caused by: android.view.WindowManager$BadTokenException: 下面说下为什么出现这个.....
分类:
移动开发 时间:
2015-01-23 16:12:04
阅读次数:
160
package com.example.dialog5;import android.os.Bundle;import android.app.Activity;import android.app.AlertDialog;import android.app.Dialog;import andro...
分类:
移动开发 时间:
2015-01-22 19:56:13
阅读次数:
161
ProgressDialog的使用ProgressDialog 继承自AlertDialog,AlertDialog继承自Dialog,实现DialogInterface接口。ProgressDialog的创建方式有两种,一种是new Dialog ,一种是调用Dialog的静态方法Dialog.s...
分类:
其他好文 时间:
2015-01-22 19:51:27
阅读次数:
149
package com.example.dialog3;import android.os.Bundle;import android.app.Activity;import android.app.AlertDialog;import android.app.Dialog;import andro...
分类:
移动开发 时间:
2015-01-22 19:47:44
阅读次数:
246
package com.example.dialog4;import android.os.Bundle;import android.app.Activity;import android.app.AlertDialog;import android.app.Dialog;import andro...
分类:
移动开发 时间:
2015-01-22 19:42:11
阅读次数:
145