Android的滚动到ListView底部 [英] Android scroll to the bottom of a listview
问题描述
这是不是另外一个问题重复......这是更大的扩张。我希望:)
this is not a repeat of another question.. it's more an expansion. I hope :)
我有一个列表视图,在这几百个项目。他们是另一种看法日期戳项。
I've a list view with a few hundred items in it.. They are date stamped entries in another view.
当我告诉我希望它滚动到屏幕底部,所以最新的项目显示,但在排序的方式逻辑的东西到底。
When I show the screen I want it to scroll to the bottom, so the most recent items are displayed, but in a logical "end of the thing" sort of way.
m_list.setSelection(m_list.getCount()-1);
KEWL作为......但:(现在我的名单不会滚动,它似乎停留在底部。我可以看到车,这是微小的,在底部。
Kewl as... but :( Now my list won't scroll. It seem stuck on the bottom. I can see the "truck" and it's tiny and at the bottom.
确定..所以我questy是这样..我该如何开始滚动到底部,但仍允许用户(我)向上滚动时,他们(我了),要滚动起来。
Ok.. so my questy is thus.. How do I start off by scrolling to the bottom, but still allow the user (me) to scroll up when they (me again) want to scroll up.
推荐答案
设置你的在XML列表视图
以下。
android:stackFromBottom="true"
android:transcriptMode="alwaysScroll"
这篇关于Android的滚动到ListView底部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!