问题描述
如何在 windows mobile 7 中的文本块(滑动)上实现轻弹和轻弹动画?
这有两个部分:
检测轻弹.- 为此,我建议您查看 工具包 中的 GestureListeners.>
动画轻弹".- 这将取决于您正在寻找的确切动画.我首先创建三个文本块,其中包含列表中的上一个、当前和下一个项目.如果用户以一种方式滑动(比如从左到右),我会将前一项设置为动画,当前项退出,以便前一项最终与当前项的位置完全相同.动画完成后,我会更新每个项目的内容(基于当前的内容),然后重置每个项目(没有任何动画).如果向另一个方向滑动,我会执行该过程,但使用下一个"项目.
无论您使用哪种技术 - 确保在快速连续多次滑动时测试行为.我已经看到很多应用程序在这方面做得很糟糕 - :(
How can I implement flick in and out animation on a textblock (swipe) in windows mobile 7?
There are two parts to this:
Detecting the flick. - For this I'd recommend staring by looking at the GestureListeners in the toolkit.
Animating the "flick". - This will depend on the exact animation you are looking for. I'd start by creating three textblock which hold the previous, current and next items in your list. If the user swipes one way (say left to right) I'd animate the previous item in and the current item out such that the previous item ends up in exactly the same position as the current one was originally. When the animations are complete I'd update the contents of each item (based on what's now current) and then reset each item (without any animation). If swiping in the other direction I'd do the process but with the "Next" item.
WHatever technique you use - be sure to test the behaviour when swiping multiple times in rapid succession. I've seen lots of apps do this badly - :(
这篇关于如何实现文本块轻弹动画 windows mobile 7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!