/**
* 从config.xml中获取版本信息以及应用id
*
* @param urlPath
* @return
* @throws Exception
*/
public List getUpdateInfo() {
Resources r = context.getResources();
// 通过Resources,获得XmlResourceParser实例
X...
分类:
移动开发 时间:
2014-12-29 12:10:14
阅读次数:
218
Context类,时刻的在与它打交道,例如:Service、BroadcastReceiver、Activity等都会利用到Context的相关方法。
但是不懂Context的原理、类结构关系。一个简单的问题是,一个应用程序App中存在多少个Context实例对象呢?
Context,中文直译为“上下文”,SDK中对其说明如下:
Interface to gl...
分类:
移动开发 时间:
2014-12-29 12:04:06
阅读次数:
215
以上文章介绍的方法或方式,都是注入基本数据类型例如String,int等等,本例将介绍自定义对象的注入方式的配置。
【转载使用,请注明出处:http://blog.csdn.net/mahoking】
操作步骤:
1、 创建Topic对象。
public class Topic {
/**内容*/
private String context;
public String get...
分类:
编程语言 时间:
2014-12-28 22:14:50
阅读次数:
139
Mainpackage com.lxt008;import android.app.Activity;import android.content.Context;import android.content.Intent;import android.os.Bundle;import androi...
分类:
移动开发 时间:
2014-12-28 15:31:33
阅读次数:
209
SimpleAdapter的构造函数是:public SimpleAdapter (Context context, List> data, int resource, String[] from, int[] to)官方说明了其各个参数含义,我这里根据自己的理解解释下:第一个context,很明显...
分类:
其他好文 时间:
2014-12-28 14:07:17
阅读次数:
189
这篇文章是自己对new学习过程中的一些理解,有不对的地方希望指出,接受组织的批评教育。导火线,前段时间学习jQuery的时候,看到源码中有这样一段:jQuery = function(selector, context) { return new jQuery.fn.init(selector...
分类:
编程语言 时间:
2014-12-28 12:55:52
阅读次数:
129
var c = context.getContext("2d");var cimg = new Image();cimg.src = "img path";//path either relative or absolute positioncimg.onload = function(){//ca...
分类:
其他好文 时间:
2014-12-27 22:54:58
阅读次数:
226
var c = canvas.getContext("2d");//get canvas 2d contextcanvas including a proposed 3D context;c.fillStyle("#ffffff");//rawing canvas background colorc...
+(UIImage *)screenForView:(UIView *)view{// UIGraphicsBeginImageContext(view.frame.size);// CGContextRef context = UIGraphicsGetCurrentContext();// [v...
分类:
移动开发 时间:
2014-12-27 20:25:33
阅读次数:
149
翻译自http://aosabook.org/en/zeromq.html中的Global
State
在库中使用全局变量并不理想.一个库也许会被程序加载很多次,但即便如此,也只会存在唯一一个全局变量集.
Figure24.1: ØMQ being used by different libraries
图24.1中两个不同且独立的库都...
分类:
其他好文 时间:
2014-12-27 11:28:36
阅读次数:
171