Java scrollView中的Android嵌套mapView未触发事件
在Android编程中,我试图滚动scrollView中的mapView时遇到了一些问题。这是我的XML文件:Java scrollView中的Android嵌套mapView未触发事件,java,android,scrollview,android-mapview,Java,Android,Scrollview,Android Mapview,在Android编程中,我试图滚动scrollView中的mapView时遇到了一些问题。这是我的XML文件: <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/scrollView" android:layout_width="fill_parent" android:layout_height="fill_parent" > <com.esri.an
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/scrollView"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<com.esri.android.map.MapView
android:id="@+id/mapBlock"
android:layout_width="fill_parent"
android:layout_height="300dp"
initExtent="21801.3, 25801.0, 33218.7, 44830.0" >
</com.esri.android.map.MapView>
</ScrollView>
但是,使用这些代码,当我的地图是onClick时,滚动视图被禁用,但我无法放大/缩小或在地图周围导航。有什么想法吗
提前谢谢。嘿,你解决了这个问题吗?我这里有一个类似的问题:有什么解决办法吗!
scrollView = (ScrollView) eventChart.findViewById(R.id.scrollView);
mMapViewBlock = (MapView) eventChart.findViewById(R.id.mapBlock);
scrollView.setOnTouchListener(new OnTouchListener(){
public boolean onTouch(View v, MotionEvent event) {
eventChart.findViewById(R.id.scrollView).getParent()
.requestDisallowInterceptTouchEvent(false);
return false;
}
});
mMapViewBlock.setOnTouchListener(new OnTouchListener() {
public boolean onTouch(View v, MotionEvent event) {
v.getParent().requestDisallowInterceptTouchEvent(true);
return false;
}
});