4

我有一个同时具有 ScrollView 和 Horizo​​ntalScrollView 的布局文件。并且能够在水平方向或垂直方向滚动。是否可以对角滚动?

<ScrollView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">

        <HorizontalScrollView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content">


           <Customview..../>

</HorizontalScrollView>
    </ScrollView>
4

1 回答 1

0

要实现对角滚动,您应该禁用两个视图上的触摸并使用GestureDetector.

有关详细说明,请参阅答案。

于 2021-11-16T17:09:47.963 回答