2012-03-02 40 views
0

我在ViewPager內部實施了HorizontalListViewViewPager正常工作,但ViewPagerHorizontalListView)的孩子不滾動。相反,整個頁面滾動到下一個。父母和孩子都觸摸事件時如何解決觸摸事件?如何在android中Viewpager中處理觸摸事件Horizo​​ntalListScrollview或horizo​​ntalListview?

在我的情況ViewPager是膨脹pager.xml

pager.xml

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:orientation="vertical" > 

    <com.geekyouup.paug.awesomepager.HorizontialListView 
     android:id="@+id/listview" 
     android:layout_width="fill_parent" 
     android:layout_height="135dip" 
     android:background="#ffffff" 
     android:gravity="left" /> 

    <TextView 
     android:id="@+id/t1" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:text="sagfjsdkfksjdfhkjs" /> 

    <TextView 
     android:id="@+id/t2" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:text="he ha ha ha" /> 

</LinearLayout> 
+0

只是想,兩個控件都在消耗「水平觸摸動作」,所以我認爲它不可能使其工作 – Selvin 2012-03-02 11:21:39

+0

:(真的不可能嗎?沒有其他選擇 – 2012-03-02 11:30:34

回答

0

看看一個solution

,並給他的感謝誰使人們有可能父視圖:)

相關問題