2011年6月6日
摘要: Java2的开发包中提供了一种很使用的线程功能:提前安排将来某段时间执行某任务Timer ,TimerTask。你可以使用这些类创建后台进程,让其在等待一段规定的时间后执行,或者让其没隔一段时间执行。你也可以用Thread来完成,但利用Timer与TimerTask显然省事不少。 TimerTask实现了Runnable接口,待执行的任务置于run()中。Timer是一个安排TimerTask的类此此两者一般一起工作。所应用时首先硬创建一个TimerTask的对象,然后用一个Timer的类对象安排执行它 Timer类包含的方法有: 1.Timer() 以常规方式运行task 2.Timer(. 阅读全文
posted @ 2011-06-06 20:52 Panda&Kings 阅读(6487) 评论(0) 推荐(0)
摘要: 首先我们先来看下官方API对SurfaceView的介绍SurfaceView的API介绍Provides a dedicated drawing surface embedded inside of a view hierarchy. You can control the format of this surface and, if you like, its size; the SurfaceView takes care of placing the surface at the correct location on the screen The surface is Z order 阅读全文
posted @ 2011-06-06 17:37 Panda&Kings 阅读(274795) 评论(31) 推荐(36)