2013年10月13日
摘要: TheonInterceptTouchEvent()method gives a parent the chance to see any touch event before its children do. If you returntruefromonInterceptTouchEvent(), the child view that was previously handling touch events receives anACTION_CANCEL, and the events from that point forward are sent to the parent' 阅读全文
posted @ 2013-10-13 17:52 meizixiong 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 1、关于on的返回值a return value oftruefrom the individualonmethods indicates that you have handled the touch event. A return value offalsepasses events down through the view stack until the touch has been successfully handled.true表示你已经处理了此touch事件,false则会将事件一直传到view栈,直到touch事件被处理。2、关于onDown()事件Whether or no 阅读全文
posted @ 2013-10-13 17:42 meizixiong 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 定义schema: 1 public final class FeedReaderContract { 2 // To prevent someone from accidentally instantiating the contract class, 3 // give it an empty constructor. 4 public FeedReaderContract() {} 5 6 /* Inner class that defines the table contents */ 7 public static abstract clas... 阅读全文
posted @ 2013-10-13 13:16 meizixiong 阅读(303) 评论(0) 推荐(0) 编辑
摘要: 将数据保存在外部存储器上 1 /* Checks if external storage is available for read and write */ 2 public boolean isExternalStorageWritable() { 3 String state = Environment.getExternalStorageState(); 4 if (Environment.MEDIA_MOUNTED.equals(state)) { 5 return true; 6 } 7 return false; 8 } 9 10 ... 阅读全文
posted @ 2013-10-13 12:37 meizixiong 阅读(246) 评论(0) 推荐(0) 编辑