动态改变ImageView的位置

发布于 2024-12-25 04:04:58 字数 196 浏览 6 评论 0原文

我在 LinearLayout(水平方向)中有 3 个 ImageView。我想根据向左或向右移动触摸来显示它们。首先,我必须在 LinearLayout 内创建 3 个图像视图,并且只有 3 个图像视图中的一个可见。在 TouchEvent 中,我想更改可见一本的位置,然后我想平滑地显示另一本,就像 iBooks 中的书籍一样。我怎样才能做到这一点?

此致,

I have 3 ImageViews in LinearLayout(Horizontal Orientation). I want to show them according to move touches to the left or right. First of all, I have to create 3 imageviews inside of the LinearLayout and only the one of the 3 imageviews can be visible. In TouchEvent I want to change position of the visible one,then I want to show smoothly the other one like books in iBooks. How can I do that?

Best Regards,

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

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

发布评论

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

评论(1

面犯桃花 2025-01-01 04:04:58

您可以参考下面的例子。这会对你有帮助。
此处

You can refer below example. This will be helpful to you.
here

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