2017-01-14 4 views
0

Ich habe einen Viewpager und Textview in demselben Layout. ich möchte, dass textview scrollen, und wenn Benutzer horizontal in dieser textview scrollen, kann viewpager scrollen. aber es funktioniert nicht jetzt bitte helfen Sie mir danke.viewpager funktionieren nicht, wenn viewpager und scrollview in demselben layour

hier ist mein Layout

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout   xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:tools="http://schemas.android.com/tools" 
android:id="@+id/activity_test" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
tools:context="com.will.custom_rxandroid.ui.TestActivity"> 


<android.support.v4.view.ViewPager 
    android:id="@+id/vp_test" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" /> 


<TextView 
    android:id="@+id/tv_test" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:layout_alignParentBottom="true" 
    android:maxLines="5" 
    android:scrollbars="vertical" /> 

</RelativeLayout> 

Antwort

0

Touch-Ereignis Konflikt, see this.

+0

danke ein Protokoll, aber diese Frage ist, dass meine Textansicht und Viewpager im selben Layout als diese Textansicht in Viewpager –

Verwandte Themen