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; } }
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.