我想向用户展示3D封闭的滚动纸张,他们可以用手指展开什么。什么是最好的方式来做到这一点?Android - 如何做一个可触摸的滚动纸张动画?
0
A
回答
1
要达到像你想要的的影响,你需要第一件事是平面设计师
你需要两个特别的图形资源:
- 完整的图像没有底部滚动部分的铺开羊皮纸
- 羊皮纸的底部 - 为此,您将需要多个框架(以使滚动成为动画)。所以你需要每帧滚动动画1张图片。
一旦你有了这些资产,你需要正确地布置它们。
我会推荐这样的布局(伪布局):
<LinearLayout - vertical, this will be your main container>
<RelativeLayout - will start at a small height, and will grow with animation. Should crop children>
<ImageView - with the top & center part of the parchment
- give this view an explicit height which is equal to the fully
extended size of the parent layout/>
<... any additional layouts or views />
</RelativeLayout>
<ImageView - contains a single frame of the rolling bottom part
- replace the image with the next frame every few milliseconds/>
</LinearLayout>
概念上讲,这应该足以获得你想要的效果。
道歉的答案的抽象性,但由于你没有发布任何你试过的代码(我假设你还没有尝试过),对我来说没有太多跟...共事。
希望这会给你足够的想法让你开始。
相关问题
- 1. 可可触摸:动画上的触摸
- 2. 可可触摸 - 一次播放动画
- 3. 在Android动态壁纸触摸事件
- 4. Android动态壁纸触摸事件
- 5. Android的触摸滚动动画页面翻转
- 6. 可滚动壁纸android
- 7. 水平画廊 - 滚动和触摸
- 8. 可可触摸 - 线程和动画
- 9. Iphone可可触摸动画建议
- 10. 可可触摸 - 用定时器动画
- 11. 在Android的触摸屏上触摸滚动?
- 12. Android动态壁纸动画
- 13. 如何在Android Studio中创建复杂的移动/可触摸动画?
- 14. Android - 滚动时禁用触摸事件
- 15. 如何使纸张动态
- 16. 触摸滚动的图像列表动画的iOS
- 17. 如何在触摸屏中滚动ListView
- 18. Android触摸震动?
- 19. 滚动SpriteNode使用触摸
- 20. 拦截UITableView滚动触摸
- 21. CorePlot触摸识别滚动
- 22. N8触摸滚动lwuit
- 23. 使用libgdx触摸滚动
- 24. 滚动触发动画
- 25. Sencha触摸:动画发送
- 26. 触摸后动画精灵?
- 27. 拦截动态壁纸触摸事件?
- 28. 动态纸张尺寸画面
- 29. 拉斐尔纸张缩放动画
- 30. 实现可滚动标签触摸的Android教程
有没有一个例子可以链接来说明这一点?你有没有看过什么呢? –
类似这样的:https://www.youtube.com/watch?v=JWy_ZD4pJMk – Peter