我有一个10个的图像视图内滚动视图OnTouch()的onClick()事件的滚动型
内的视图一旦图像被点击我要执行的操作
但是,当我我试图滚动了滚动Touch_down和Touch_UP的Imags一起被视为点击
帮我出 我知道解决的办法很容易 但我觉得我缺少一些逻辑
我推杆荷兰国际集团我的代码这里
public class CustomScrollView extends ScrollView {
public CustomScrollView(Context context) {
super(context);
}
public CustomScrollView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public CustomScrollView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
return false;
}
@Override
public boolean onTouchEvent(MotionEvent p_event) {
if (p_event.getAction() == MotionEvent.ACTION_MOVE && getParent() != null) {
getParent().requestDisallowInterceptTouchEvent(true);
}
return super.onTouchEvent(p_event);
}
}
在这种滚动型我增加了一个ImageView的
Plz的家伙建议一个解决方案,而不是使用ListView – user990967
在这里发布你的代码。 –
无代码无人可以帮到你 –