Android 动态壁纸幻灯片动画
目前我有我的动态壁纸,它从用户的 SD 卡中获取用户选择的图像并将其设置为背景。它进展顺利,但我注意到,当用户从右向左滑动切换主屏幕时,许多动态壁纸会改变背景视图。
例如,中间主屏幕显示图像的中间部分,当用户向右滑动手指以到达左侧的下一个主屏幕时,背景图像随之移动,向左显示部分图像。
我试图搜索如何执行此操作,但无济于事,有人知道用于重新创建此图像滑动动画的信息吗?
谢谢,
威廉·斯图尔特。
At the moment I have my live wallpaper which takes an image chosen by the user, from their SD card and sets it as the background. Its coming along nicely, however I notice that many live wallpapers change the view of the background when the user slides to switch their homescreens from right to left.
For example, the middle homescreen displays the middle part of the image, when the user slides their finger to the right to get to their next homescreen on the left, the background image moves with it showing part of the image further to the left.
I've trying searching how to do this, but to no avail, does anyone have any info on what's used to recreate this image sliding animation?
Thanks,
William Stewart.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您希望壁纸滚动,则需要监视 onOffsetsChanged() 事件。
看看这个答案:
Android 动态壁纸缩放
如果您还有任何疑问,请告诉我。
If you want your wallpaper to scroll, you will need to monitor onOffsetsChanged() events.
Take a look at this answer:
android live wallpaper rescaling
Let me know if you have any further questions.