我想創建一個包含一個HorizontalScrollableView
可以水平滾動卡內ListView
佈局卡一種卡片佈局。一切正常,但我有滾動問題。只有當我沒有水平滾動卡片並反之時,我纔可以垂直滾動列表視圖。使用ScrollViews佈局,並將HorizontalScrollView
這是主要的容器:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<HorizontalScrollView
android:id="@+id/listview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#ddd" >
<LinearLayout
android:id="@+id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent" android:orientation="horizontal" >
</LinearLayout>
</HorizontalScrollView>
</RelativeLayout>
我膨脹並添加列表視圖項的線性佈局。 我想允許垂直和水平滾動順利沒有這些限制(同時水平和垂直滾動)。
我該如何做到這一點?
所以你要水平或只是在ListView行滾動整個列表視圖? –
我想垂直滾動列表以及水平包含列表的卡片。我能做到這一點,但我不能simoultaneously滾動,這是非常困難 – Matroska
你的意思是,你想有一個對角線手勢同時滾動兩個容器和列表視圖,實現了良好的效果 - 就像,移動你的手指向上和向右,使滾動視圖滾動右和listview同時向上滾動? –