我在scrollview内使用HorizontalScrollView来实现图片放大后的水平和纵向滚动
滚动效果是实现了
可是有个问题就是一次只能滚动一个方向
也就是说我触摸屏幕做纵向滚动后,手不离开屏幕,这时要再横向滚动就没办法滚动了
我有看到其他应用是可以同时双向滚动的
不知道是怎么实现的呢?
以下是我的部分代码:<ScrollView android:id="@+id/ScrollViewDetail" 
                        android:layout_width="fill_parent"  
                    android:layout_height="fill_parent" android:fillViewport="true"
                    android:fadingEdge="none" android:scrollbarSize="0dip"
                    android:layout_gravity="center">
                    <HorizontalScrollView android:id="@+id/scrollImageView"
                            android:layout_width="fill_parent"
                            android:layout_height="fill_parent"
                            android:fadingEdge="none"  android:scrollbarSize="0dip" android:scrollbarAlwaysDrawHorizontalTrack="true">
                            <LinearLayout androidrientation="vertical" android:gravity="center"
                            android:layout_width="fill_parent" android:layout_height="fill_parent">
                                        <ImageView android:id="@+id/ImageDetail"
                                                android:layout_width="fill_parent" 
                                                android:layout_height="fill_parent"
                                                android:tag="imageDetail" android:scaleType="fitCenter" 
                                                android:layout_gravity="center"
                                                android:layout_weight="1" android:padding="0dip" android:layout_margin="0dip">
                                        </ImageView>
                        </LinearLayout>
                </HorizontalScrollView>
                </ScrollView>