MyTouchListener tl = new MyTouchListener(this, mMapView); mMapView.setOnTouchListener(tl);
class MyTouchListener extends MapOnTouchListener{ ScrollView sv; public MyTouchListener(Context c, MapView m){ super(c, m); } // gets the touch event for the MapView public boolean onTouch(View v, MotionEvent event){ sv = (ScrollView) findViewById(R.id.scrollview); int action = event.getAction(); switch(action){ case MotionEvent.ACTION_DOWN: // Disallow your scrollview id to intercept the touch event sv.requestDisallowInterceptTouchEvent(true); break; case MotionEvent.ACTION_UP: // Gives touch control back to the ScrollView sv.requestDisallowInterceptTouchEvent(false); break; } super.onTouch(v, event); return true; } }
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.