我怎样才能把一个ListView成滚动型没有它崩溃? [英] How can I put a ListView into a ScrollView without it collapsing?

查看:188
本文介绍了我怎样才能把一个ListView成滚动型没有它崩溃?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经搜索周围解决这一问题,唯一的答案我能找到似乎的不要把一个ListView成滚动型。我还没有看到任何真正的解释的为什么的虽然。我似乎可以找到的唯一原因是,谷歌不认为你应该想这样做。好吧,我做的,所以我做到了。

I've searched around for solutions to this problem, and the only answer I can find seems to be "don't put a ListView into a ScrollView". I have yet to see any real explanation for why though. The only reason I can seem to find is that Google doesn't think you should want to do that. Well I do, so I did.

所以,问题是,你怎么可以把一个ListView成滚动型没有它折叠到最小高度?

So the question is, how can you place a ListView into a ScrollView without it collapsing to its minimum height?

推荐答案

使用的ListView ,使之不能滚动是非常昂贵的,违背了整个目的的ListView 。你不应该这样做。只需使用的LinearLayout 代替。

Using a ListView to make it not scroll is extremely expensive and goes against the whole purpose of ListView. You should NOT do this. Just use a LinearLayout instead.

这篇关于我怎样才能把一个ListView成滚动型没有它崩溃?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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