ViewPager 嵌套ListView,listView可以点击,viewpager不能滑动,怎么办???
viewpager自定义:
@Override
public boolean onTouchEvent(MotionEvent ev) {
// TODO Auto-generated method stub
L.i(TAG, "onTouchEvent");
return super.onTouchEvent(ev);
}
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
// TODO Auto-generated method stub
L.i(TAG, "dispatchTouchEvent");
boolean ret = super.dispatchTouchEvent(ev);
if (ret) {
requestDisallowInterceptTouchEvent(true);
} else
requestDisallowInterceptTouchEvent(false);
return ret;
}
ListView:
@Override
public boolean onTouchEvent(MotionEvent event) {
// TODO Auto-generated method stub
L.i(TAG, "onTouchEvent");
return super.onTouchEvent(event);
}
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
// TODO Auto-generated method stub
L.i(TAG, "dispatchTouchEvent");
return super.dispatchTouchEvent(ev);
}
大神们,怎么办啊???