如何使用水平滚动列表视图中? [英] How to use horizontal scroll in listview?

查看:190
本文介绍了如何使用水平滚动列表视图中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的一个Android应用程序。有布局创建其中包含不同的布局。

I am working on an android app. There is Layout created in which different layout included.

有一个列表视图也在它。我用自定义适配器列表视图。我想,以显示 ListView控件水平滚动。但是当我把它应用水平滚动,它列出了每个项目。但不是在最后一次。

There is a listview also in it. I used custom adapter for listview . I want to show horizontal scroll in listview .But when i apply horizontal scroll in it, it shows for each item. but not in last.

请建议我如何应用它。

code为如下: -

code is given below:-

<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>

推荐答案

我使用这个库,你CAL试试这个:

I am using this library you cal try this one:

https://github.com/sephiroth74/Horizo​​ntalVariableListView

这篇关于如何使用水平滚动列表视图中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆