I have a horizontal scroll view that contains a hierarchy of viewgroups and then finally a google map. My problem is that the HSV is catching the left-right drag that\'s mea
You have to create custom MapView. Follow the code snippet provided below
public class AppMapView extends MapView {
public AppMapView(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
switch (ev.getAction()) {
case MotionEvent.ACTION_UP:
System.out.println("unlocked");
this.getParent().requestDisallowInterceptTouchEvent(false);
break;
case MotionEvent.ACTION_DOWN:
System.out.println("locked");
this.getParent().requestDisallowInterceptTouchEvent(true);
break;
}
return super.dispatchTouchEvent(ev);
}
}
In XML follow code below: