java - 关于cocos2dx中的tableview scrollview 和android中的listview和scrollview

查看:188
本文介绍了java - 关于cocos2dx中的tableview scrollview 和android中的listview和scrollview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问 题

用java 写的一个listview和scrollview 然后用instrumentation 去拖动listview和scrollview 是可以拖动的

    

instrumentation = new Instrumentation();
        instrumentation.sendPointerSync(MotionEvent.obtai(SystemClock.uptimeMillis(),SystemClock.uptimeMillis(), MotionEvent.ACTION_DOWN, cpx, cpy, 0));
    instrumentation.sendPointerSync(MotionEvent.obtain(SystemClock.uptimeMillis(),.uptimeMillis(), MotionEvent.ACTION_MOVE, cpx + scrx, cpy + scry, 0));

但是这个instrumentation在cocos中的tableview和scrollview中就不能实现这个拖动 很纳闷不知道是怎么回事 拖动一个listview scrollview tableview不是都是先down然后move这样吗
为什么在cocos中的控件就不行了呢?难不成cocos中的scrollview相应拖动的事件不是down-move?求大神指点下 很急!!!!!先谢过了

解决方案

cocos中的scrollview相应拖动的事件有scrollToTop,scrollToBottom,以及scrolling

这篇关于java - 关于cocos2dx中的tableview scrollview 和android中的listview和scrollview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆