如何获得一个非滚动的ListView? [英] How to get a non scrollable ListView?
本文介绍了如何获得一个非滚动的ListView?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想一个非滚动的ListView,并显示整个的ListView。这是因为我的整个屏幕是滚动型的,我派遣部件用RelativeLayout的,所以我并不需要在ListView滚动。
I should want a non scrollable ListView, and show the entire ListView. It's because my entire screen is a ScrollView, and I dispatch widgets with a RelativeLayout, so I don't need the ListView scroll.
我把我的用户界面与code,不使用XML。
I set my ui with code, not with xml.
我用 listView.setScrollContainer(假)
,但它不工作,我不明白为什么。
I've used listView.setScrollContainer(false)
, but it's not work, I don't understand why.
感谢。
推荐答案
不要把一个ListView的滚动视图,这是行不通的。如果你想不滚动的项目列表,它被称为的LinearLayout。
Don't put a listview in a scrollview, it doesn't work. If you want a list of items that doesn't scroll, it's called a linearlayout.
这篇关于如何获得一个非滚动的ListView?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文