I have a ViewPager with a SectionPagerAdapter handling Fragments.
The Fragment has the following Layout:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/tvemptyview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:background="@drawable/card_bg"
android:text="@string/no_trans"
android:textAppearance="?android:attr/textAppearanceMedium" />
<ListView
android:id="@+id/transactionlist"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:divider="@null"
android:dividerHeight="0dp" >
</ListView>
<RelativeLayout
android:id="@+id/rLayout1"
android:layout_width="fill_parent"
android:layout_height="50dp"
android:layout_alignParentBottom="true"
android:background="@drawable/footer_shadow"
android:orientation="horizontal" >
<TextView
android:id="@+id/tvMonth"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_centerVertical="true"
android:layout_toRightOf="@id/btn_dateback"
android:text="test"
android:textAppearance="?android:attr/textAppearanceMedium" />
</RelativeLayout>
</RelativeLayout>
I'm trying to catch a swipe gesture (left or right) on the TextView tvMonth
but I have absolutely no idea how to dispatch the Event from the ViewPager down to the TextView itself. The Fragments just keep on scrolling and thats it.
I can attach an OnTouchListener to the TextView and the recognition works pretty fine but the tabs are changing anyway.
How can i solve this problem?