如何使翻页效果的Andr​​oid?翻页、效果、oid、Andr

2023-09-03 22:02:57 作者:女人要活的很好

任何一个可以告诉我如何在Android的翻页效果? 任何一个可以请提供我一些code段。

Can any one tell me how to make page turn effect in Android? Can any one please provide me some code snippet.

推荐答案

看看这个。

这是一个计算器应用程序,在轻扫手势正常/科学的模式之间变化:

It's a Calculator application, which changes between normal/scientific mode on swipe gesture:

onFling(MotionEvent, MotionEvent, float, float)

它使用 TranslateAnimation 来实现的效果,但在iPhone上的视图之间拖动和跟踪你的手指,像不落实。尝试使用

It uses TranslateAnimation to accomplish the effect, but dragging between the views and tracking your finger, like in the iPhone is not implemented. Try using

onScroll(MotionEvent, MotionEvent, float, float)

至于 Flexbook 般的组件,它不应该是很难实现的,如果您使用的屏蔽方法。

As for Flexbook-like component, it shouldn't be hard to implement, if you use the masking approach.

Android的M3(pre-1.0版本),甚至有PageTurner小部件,但它得到了德precated,因为它不是通用的,足够的,像其他小部件。你可以尝试,挖了旧的Andr​​oid源找到PageTurner的实施和修改的蛋糕/甜甜圈。

Android M3 (pre-1.0 version) even had PageTurner widget, but it got deprecated, since it wasn't generic-enough, like the other widgets. You can try and dig up the old Android sources to find the implementation of PageTurner and modify it for Cupcake/Donut.