注册一个观察者- (void)addNewObserver{ [object addObserver:self forKeyPath:@"oneKey" options:NSKeyValueObservingOptionNew ...
分类:
移动开发 时间:
2014-09-23 19:47:55
阅读次数:
7616
布局文件: 主Activity的代码package com.examp.manyactivity;import android.app.Activity;import android.content.Context;import android.content.Inte...
分类:
移动开发 时间:
2014-09-23 18:54:25
阅读次数:
253
1、首先需要导入包,必须导入的包如下: quartz-1.8.5.jar commons-logging.jar spring-core-3.0.5.RELEASE.jar spring-beans-3.0.5.RELEASE.jar spring-context-3.0.5.RELEAS...
分类:
其他好文 时间:
2014-09-23 18:50:25
阅读次数:
240
Context是什么
一个Context意味着一个场景,一个场景就是用户和操作系统交互的一个过程。在广义上,这个所谓的过程应该包括前台界面和后台数据。
举个例子,比如当你打电话的时候,场景包括电话程序对应的界面以及隐藏在界面后的数据。
从程序的角度来看,一个Activity就是一个Context,一个Service也是一个Context。
从语义的角度来看一下Context。谷歌程序员把“场景”抽象为Context类,他们认为用户和操作系统的每一次交互都是一个场景,比如打电话,发短信。
从代码的角...
分类:
移动开发 时间:
2014-09-23 17:37:34
阅读次数:
196
RT
CIContext *context = [CIContext contextWithOptions:nil];
CIImage *inputImage = [[CIImage alloc] initWithImage:[UIImage imageNamed:@"1.png"]];
// create gaussian blur filter
CIF...
分类:
移动开发 时间:
2014-09-23 15:03:36
阅读次数:
394
创建数据库首先定义SQLiteOpenHelper的子类代码如下:package com.example.myandroid;import android.content.Context;import android.database.sqlite.SQLiteDatabase;import and...
分类:
移动开发 时间:
2014-09-23 13:54:44
阅读次数:
233
import java.util.LinkedList;import com.mypower.R;import util.OnlyTools;import util.OnlyYouHelpMe;import android.content.Context;import android.graphic...
分类:
其他好文 时间:
2014-09-23 11:57:25
阅读次数:
252
1、创建一个drawboard#import "DrawBoard1.h"@implementation DrawBoard1-(void)drawRect:(CGRect)rect{ CGContextRef context=UIGraphicsGetCurrentContext(); CGC.....
分类:
其他好文 时间:
2014-09-23 01:29:23
阅读次数:
360
转载:http://ipjmc.iteye.com/blog/1615828 Android里Scroller类是为了实现View平滑滚动的一个Helper类。通常在自定义的View时使用,在View中定义一个私有成员mScroller = new Scroller(context)。设置mSc.....
分类:
移动开发 时间:
2014-09-23 01:04:33
阅读次数:
305
创建android app,编译后生成apk,手机安装后无法运行,弹出以下错误:JS errorreport errorassets/egret-game/libs/core/egret/context/devices/nativedevicecontext.js:203:egret_native....
分类:
移动开发 时间:
2014-09-22 23:47:03
阅读次数:
735