图像之间的翻转效果
我正在开发一个电子书阅读器,需要在页面之间具有翻转效果。
我想要支持从右或左翻转。
我怎样才能在 Android 上做到这一点?
I'm developing an eBook Reader and need to have the flip effect between pages.
I want has support to flip from right or left.
How can I do that on Android?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
对于基本的翻页动画,ViewFlipper 和 ViewAnimator 类 - 它们可以应用您可以在资源文件中定义的任何 inAnimation 和 outAnimation。
然而,为了获得完整的效果,您将希望弯曲的页面在经过时向您凸出,我认为这超出了这些简单动画的能力(如果这是错误的,请有人纠正我),并且您将需要一个触摸事件处理程序,以便它发生在整个拖动动作中。
For basic page-turning animations, the ViewFlipper and ViewAnimator classes -- they can apply any inAnimation and outAnimation you can define in a resource file.
However, for full effect you'll want the curved page bulging toward you as it passes by, which I think is beyond the ability of those simple animations (somebody correct me if that's wrong), and you'll want a touch event handler so it happens through the whole dragging motion.
这解决了我的问题:
http://code.google.com/p/android-page -curl/
这没有反射图像的效果,但有很大帮助。
This solve my problem:
http://code.google.com/p/android-page-curl/
This doesn't have the effect of the reflected image but help a lot.
看看这个视图: http://developer.android.com/reference/ android/widget/ViewFlipper.html
have a look at this View : http://developer.android.com/reference/android/widget/ViewFlipper.html