摘要: 1 package com.hu.callback; 2 /*一个类Caller中声明接口类型并调用接口的虚函数 3 * 而使用该类的类MyCall又实现了该接口,则该类必须实现接口中的虚函数 4 * 这样Caller中调用虚函数时也就回调了MyCall中重写的函数fun 5 */ ... 阅读全文
posted @ 2012-06-11 16:49 丛林听雨 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 使用Runnable产生新线程 使用postInvalidate进行刷新 1 package com.hu.move; 2 3 import android.content.Context; 4 import android.graphics.Canvas; 5 import andro... 阅读全文
posted @ 2012-06-11 13:59 丛林听雨 阅读(278) 评论(0) 推荐(0) 编辑
摘要: 首先将图片放入res/drawable文件夹下 申明bitmap对象 bitmap载入有两种方法: 1 bitmap=((BitmapDrawable)this.getResources().getDrawable(drawable.a01)).getBitmap(); 2 bitmap = Bi... 阅读全文
posted @ 2012-06-11 13:18 丛林听雨 阅读(472) 评论(0) 推荐(0) 编辑
摘要: Thread类 1 package com.hu.thread; 2 3 public class MyThread extends Thread{ 4 5 /** 6 * @param args 7 */ 8 public static void main(String[] a... 阅读全文
posted @ 2012-06-11 13:10 丛林听雨 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 添加新类MyView继承View 在MyView中实例化Paint 1 package com.hu.viewdemo; 2 3 import android.content.Context; 4 import android.graphics.Canvas; 5 import andr... 阅读全文
posted @ 2012-06-11 09:07 丛林听雨 阅读(1342) 评论(0) 推荐(0) 编辑