2013-07-18 126 views
2

我们如何在嵌套滚动中给予优先级?想象一下,我们有一个ListView,它由需要滚动的大行组成。现在我们想让ListView在内部布局滚动完成时滚动。嵌套滚动

回答

-1
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:paddingBottom="@dimen/activity_vertical_margin" 
    android:paddingLeft="@dimen/activity_horizontal_margin" 
    android:paddingRight="@dimen/activity_horizontal_margin" 
    android:paddingTop="@dimen/activity_vertical_margin" 
    > 

     <ScrollView 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:id="@+id/poicroll" 
    > 

     <RelativeLayout 
      android:id="@+id/addLay" 
      android:layout_width="match_parent" 
      android:layout_height="490dp" 
      android:paddingLeft="10dp" 
      android:paddingRight="5dp" 
      android:paddingTop="10dp" > 


//Your Data/ Content here 





<HorizontalScrollView 
     android:layout_below="@+id/btnSavePOI" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content > 


//Your Listview here 


    </HorizontalScrollView> 

     </RelativeLayout> 

</RelativeLayout> 

使用此希望它会帮助你

+0

THX的家伙,但我怕我们没有得到对方:DI知道如何实现滚动,只是想知道如何给予重点的行一个listView,然后到listView本身 –