我正在開發一個android應用程序。有包含不同佈局的Layout
創建。如何在列表視圖中使用水平滾動?
其中還有listview
。我使用custom adapter
代替listview
。我想在listview
中顯示水平滾動。但是當我在其中應用水平滾動時,它會顯示每個項目。但最後沒有。
請建議我如何應用此。下面
代碼給出: -
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/bg" >
<include
android:id="@+id/mainScreenHeader"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
layout="@layout/main_screen_header" />
<include
android:id="@+id/mainScreenListHeader"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/mainScreenHeader"
layout="@layout/main_screen_list_header" >
</include>
<ListView
android:id="@+id/list"
android:layout_width="fill_parent"
android:layout_height="270dp"
android:layout_below="@+id/mainScreenListHeader"
android:cacheColorHint="#00000000"
android:drawSelectorOnTop="false" />
<include
android:id="@+id/mainScreenFilterClient"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/list"
android:layout_marginTop="10dp"
layout="@layout/main_screen_filter_client" >
</include>
<include
android:id="@+id/footer"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/mainScreenFilterClient"
android:layout_marginTop="10dp"
layout="@layout/footer" >
</include>
早些時候我使用上面,但我有這個問題。不知道可能會爲你工作。 這裏是一些鏈接http://stackoverflow.com/questions/22397715/touch-event-not-working-with-horizontal-list-view-devsmart-lib http://stackoverflow.com/questions/3240331/ horizontal-listview-in-android – rup35h