2012-03-02 64 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

,并给他的感谢谁使人们有可能父视图:)

相关问题