2014年5月24日

利用View静态画图

摘要: you should consider creating a custom View component and drawing with a Canvas inView.onDraw(). The most convenient aspect of doing so is that the And... 阅读全文

posted @ 2014-05-24 17:39 muyable 阅读(425) 评论(0) 推荐(0) 编辑

Canvas

摘要: canvas可以通过系统给定View.onDraw()或者surfaceHolder.lockCanvas(),也可以自己创建。但注意,自己创建时,一定要定义绑定一个Bitmap到Canvas 以承载canvas内容 阅读全文

posted @ 2014-05-24 17:14 muyable 阅读(210) 评论(0) 推荐(0) 编辑

SurfaceView部分译

摘要: SurfaceView一、简述TheSurfaceViewis a special subclass of View that offers a dedicated drawing surface within the View hierarchy. The aim is to offer this... 阅读全文

posted @ 2014-05-24 12:32 muyable 阅读(237) 评论(0) 推荐(0) 编辑

2014年3月20日

java 利用Scanner解析逗号字符串

摘要: 对形如"a,b,c,d,e"类字符串的解析,所用的正则表达式:[\\s*,*\\s]Scanner sc = new Scanner(System.in);Pattern p = Pattern.compile("[\\s*,*\\s]");sc.useDelimiter(p);或者Scanner sc = new Scanner(System.in);sc.useDelimiter("[\\s*,*\\s]");A Scanner breaks its input into tokens using a delimiter patt 阅读全文

posted @ 2014-03-20 18:08 muyable 阅读(1047) 评论(0) 推荐(0) 编辑

2014年3月14日

Context部分译(http://developer.android.com/reference/android/content/Context.html))

摘要: Class OverviewInterface to global information about an application environment. This is an abstract class whose implementation is provided by the Android system. It allows access to application-specific resources and classes, as well as up-calls for application-level operations such as launching act 阅读全文

posted @ 2014-03-14 12:12 muyable 阅读(212) 评论(0) 推荐(0) 编辑

2014年3月11日

handler

摘要: handler:HandlerLooper(同一线程中的对象)涉及到的有Looper、MessageQueue、Message要点:1、Looper初始化时会自动创建一个MessageQueue,用来对Message进行管理(先进先出)2、UI主线程默认初始化好了一个Looper.若在子线程中创建Looper,使用Loop.prepare()方法。启动looper,用looper.loop()方法。3、Handler 发送与处理(一般重写)MessageQueue中的Message4、handler所在的线程中,必须有一个looper。handler与looper中的MessageQueue进 阅读全文

posted @ 2014-03-11 11:36 muyable 阅读(158) 评论(0) 推荐(0) 编辑

导航