Android ListView 中的列表项滑入?

发布于 2024-12-11 18:09:07 字数 287 浏览 0 评论 0原文

I would like to have each item in a ListView slide in from the right.现在我知道我可以执行翻译动画并偏移每个项目的开始时间,以便它们首先滑入顶部,然后滑入下一行,依此类推。 My question is where to perform this animation? I was thinking in the getView method of the adapter I have overridden. Is this how I would go about doing this?

I would like to have each item in a ListView slide in from the right. Now I know I could just perform a translate animation and offset the starting time of each item so they slide in top first then next row and so on. My question is where to perform this animation? I was thinking in the getView method of the adapter I have overridden. Is this how I would go about doing this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

千年*琉璃梦 2024-12-18 18:09:07

continue

Well you could use the method 'setLayoutAnimation' of the listview. This will take an animation controller. It basically calls the animation for each child of a viewgroup when its laid out on the screen.

listview.setLayoutAnimation(new LayoutAnimationController(YOUR ANIMATION OBJECT));

There is domo for this in the apiSamples. It will give you more idea.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文