viewpager에 onTouch리스너를 추가했습니다.
그런데.. onTouch리스너가 괄호방향으로 스왑할때는 되는데,, 수직방향으로 할때는 먹히질 않네요..
만약 scrollview를 지우면.. 수직방향이 먹히더라구요.. 왜이럴까요 리스너는 뷰페이져에 setOnTouchListener을 했습니다.
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/container"
>
<RelativeLayout
android:id="@+id/layout_for_touchEvent"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<LinearLayout
android:id="@+id/layout_viewpager"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v4.view.ViewPager
android:id="@+id/viewPager"
android:layout_width="match_parent"
android:layout_height="700dp">
</android.support.v4.view.ViewPager>
</LinearLayout>
뷰페이져
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ScrollView
android:id="@+id/layout_scrollView"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<LinearLayout
android:id="@+id/viewPager_top_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<ImageView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="0dp"
android:scaleType="fitXY"
android:layout_weight="7"
/>