简体   繁体   English

调度触摸事件

[英]dispatching touch events

I have 12 horoscope sign images which are placed in 360 degree circular position. 我有12个星座符号图像,它们以360度圆形位置放置。 ImageButtons are being used to display the horoSignImages. ImageButtons用于显示horoSignImages。 ImageButton has selector that show pressed and unpressed states for horosSignImage. ImageButton具有选择器,该选择器显示horosSignImage的按下状态和未按下状态。 The signWheel rotates by using gestuer. signWheel通过使用手势来旋转。

Problem is that, When i tap right over the horosignImage to rotate the wheel, the imageButton catches the event and wheel is not rotated upon scrolling the finger. 问题是,当我在horosignImage上方点击以旋转滚轮时,imageButton会捕获事件,并且在滚动手指时滚轮不会旋转。 I want to animate the image its pressed state when the user taps right over it, meanwhile the wheel should rotate if the user scrolls his finger. 当用户在图像上点击时,我想为其图像设置动画状态,与此同时,如果用户滚动手指,则滚轮也应旋转。 Wheel rotation only works if i tap outside the horosignImage and scroll the finger. 仅当我在horosignImage外部点击并滚动手指时,才可以旋转车轮。

Any suggestions to solve this problem? 有解决这个问题的建议吗?

Sadly I don't have the answer, but your problem seems to be similar to Passing touch events to the parent view 很遗憾,我没有答案,但是您的问题似乎类似于将触摸事件传递给父视图

In both cases you want the touch event handled by the imageButton as well as the signWheel. 在这两种情况下,您都希望imageButton和signWheel处理触摸事件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM