Android的列表视图设置的默认位置,而动画 [英] Android List View set default position without animation

查看:213
本文介绍了Android的列表视图设置的默认位置,而动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用程序表列表视图。并且用户可以在列表中添加更多的数据。我想显示在新添加的数据默认列表视图位置。但是,我使用如果我使用smoothScrollToPosition,有动画慢慢向下滚动,这是不可取的。难道你们知道如何设置默认的位置,而该动画?

I have a table list view in my app. and user can add more data in the list. I would like to show the default list view position at the newly added data. however, i use if i use smoothScrollToPosition, there is animation slowly scrolling down, which is not desirable. Do you guys know how to set the default position without that animation?

非常感谢的答复!
问候
一分钱

thanks alot for reply! regards penny

推荐答案

我觉得 ListView.setSelection(INT位置)是你所需要的。

这篇关于Android的列表视图设置的默认位置,而动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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