问题描述
我想了一些好吃的东西在ListView,喜欢能够使用ListAdapter和项目的选择等,但我不希望它的滚动型部分。我想要实现的那部分自己,以不同的方式(为什么还是我该怎么办这是不是真的对这个问题的地步,所以请不要问为什么)。
I want some of the goodies in a ListView, like being able to use a ListAdapter, and item selection, etc, but I don't want the ScrollView portion of it. I want to implement that part myself, in a different way (why or how I do this isn't really the point of this question, so please don't ask "why").
有没有办法有一个ListView,这不是在滚动型或已滚动停用?
Is there a way to have a ListView that's not in a ScrollView or has the scrolling disabled?
推荐答案
A 的ListView
不在滚动型
。 A 的ListView
并滚动instrinsically。我不相信你可以禁用通过简单的API滚动。如果是这样,你的选择是要么继承的ListView
,并试图找到办法来覆盖滚动的行为,克隆的ListView
和消除滚动的行为,或者自己写适配器视图
呈现的东西,你想要的方式。
A ListView
is not in a ScrollView
. A ListView
does scrolling instrinsically. I do not believe you can disable scrolling through a simple API. If so, your choices are either to subclass ListView
and try to find ways to override scrolling behaviors, clone ListView
and eliminate scrolling behaviors, or write your own AdapterView
that renders things the way you want.
这篇关于如何创建一个ListView,这不是在一个滚动型,或有滚动型禁用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!