I am trying to implement the ParallaxHeaderViewPager like here. But instead using a KenBurnsSupportView and an ImageView as a Header i have used a FrameLayout that contains a ViewPager. My problem is that if i try to use vertical scroll on the Header the Event gets consumed but nothing happens. I can only scroll horizontally on the Header(ViewPager) and the Page changes correctly. But this is not what i want to accomplish. I want if i scroll vertically on the Header the event to be recognized as a ListView scroll and when i scroll horizontally (on the Header) as a ViewPager scroll. The scrolling is functioning correctly on the area that is not used from the header. Namely under the header where i have 4 Listviews I can scroll both vertically and horizontally. The Layout I am currently using is like the below code snippet:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<android.support.v4.view.ViewPager
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<FrameLayout
android:id="@+id/header"
android:layout_width="match_parent"
android:layout_height="@dimen/header_height" >
<FrameLayout
android:id="@+id/news_pager_content_area"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:background="@color/white"
/>
<com.astuetz.PagerSlidingTabStrip
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="48dip"
android:layout_gravity="bottom"
android:background="@android:color/transparent" />
</FrameLayout>
I have tried to subclass both the Listviews and the Viewpager to intercept and handle touch Events but it seems that the default behavior documented in the Android Documentation is not applicable in my example. Thank you for your help.