zoukankan      html  css  js  c++  java
  • Touch事件传递的实验

    通过自定义的Relayout   LinearLayout   TextView ,

    布局为:
     
     
    分别打印事件方法:
    1.当所有的都是super的时候,点击TextView的时候,事件的传递是:
    此时,我再TextView上随意的滑动,是没有任何的事件过程的。
       2)如果我在TextView的OntouchEvent中返回true,则事件传递:
            
               一直的做循环。
     3)如果我在TextView的OntouchEvent中返回false,则事件传递:
        结果跟1.1是一样的
       4)如果我在TextView的dispatchtouchevent中返回true,ontouchevent中返回super  则事件传递:
        
        5)如果我在TextView的dispatchtouchevent中返回false,ontouchevent中返回super  则事件传递:
                
      根本就不会进入onTouchEvent事件
     
     
     
    2. 当点击LinearLayout的时候  事件的传递:
       2)如果我在LinearLayout的dispatchTouchEvent中返回true,则事件传递:
            
                3)如果我在LinearLayout的dispatchTouchEvent中返回false,则事件传递:        
                    
                4) 如果我在LinearLayout的dispatchTouchEvent中返回super   onintercepttouchevent返回true,则事件传递:
                    
           4) 如果我在LinearLayout的dispatchTouchEvent中返回super   onintercepttouchevent返回false,则事件传递:
             
             5) 如果我在LinearLayout的dispatchTouchEvent中返回super   onintercepttouchevent返回super,  TouchEvent  返回true则事件传递:
                
     
     
     
     





  • 相关阅读:
    webpy使用mysql数据库操作(web.database)
    python MySQLdb Windows下安装教程及问题解决方法(python2.7)
    python使用模板手记
    React常用方法手记
    PHP进阶知识
    Javascript文件加载:LABjs和RequireJS
    Debug的F5~F8用法
    myeclipse中导入的jquery文件报错(出现红叉叉,提示语法错误)
    Spring-data-jpa详解
    <c:if test="value ne, eq, lt, gt,...."> 用法
  • 原文地址:https://www.cnblogs.com/flyme2012/p/4047032.html
Copyright © 2011-2022 走看看