In my application I am using MapFragment
inside Activity
class.In layout file the fragment
inside the ScrollView
.when I am touching the Map,It leads to scroll the page I cannot access the Map to Zoom In,Zoom Out,Move the Places.Only ScrollView
focus in this layout.
MapFragment:
MapFragment mapFragment = (MapFragment) getFragmentManager().findFragmentById(R.id.map);
I tried the Below Answer for My problem.But it's not working for me.
( Don't post the Below Answer.Because It will for Mapview
)
@Override
public boolean onTouchEvent(MotionEvent ev) {
int action = ev.getAction();
switch (action) {
case MotionEvent.ACTION_DOWN:
// Disallow ScrollView to intercept touch events.
this.getParent().requestDisallowInterceptTouchEvent(true);
break;
case MotionEvent.ACTION_UP:
// Allow ScrollView to intercept touch events.
this.getParent().requestDisallowInterceptTouchEvent(false);
break;
}
// Handle MapView's touch events.
super.onTouchEvent(ev);
return true;
}