我正在开发一个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