No swipe when wrapping a ViewFlipper with a Scroll

2019-04-17 00:16发布

问题:

Here is my XML:

<ScrollView
        android:layout_height="wrap_content"
        android:layout_width="fill_parent"
        android:layout_below="@id/header_layout">

            <ViewFlipper android:id="@+id/active_sessions_flipper"
                 android:layout_width="fill_parent"
                 android:layout_height="fill_parent"
                 android:layout_below="@id/header_layout"
                 android:layout_above="@id/dots_layout">
            </ViewFlipper>

</ScrollView>

For my landscape viewing, I've put a scrollview around the viewflipper, which allows me to easily scroll up and down. However, the issue is, there is no swipe back and forth with the viewflipper any more, I'm guessing because the scroll view is catching the swipe.

How do I go about getting the viewflipper to see the horizontal swipes and the scrollview to see the vertical? The interesting thing is, even in portrait when there is no scrolling at all, the swipe still does not work.