Android的手风琴/手风琴/折叠动画 [英] Android concertina/accordian/folding animation

查看:265
本文介绍了Android的手风琴/手风琴/折叠动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图创造一个互动的手风琴/六角/折叠的动画,这样一个看法倍/时,与之交互本身展开 - 以同样的方式<一个href=\"https://play.google.com/store/apps/details?id=flipboard.app&referrer=utm_source=flipweb&utm_medium=web_button&utm_term=android&utm_campaign=download_button_android\"相对=nofollow> Flipboard的褶皱的观点,但双方折

I'm trying to create an interactive accordian/concertina/folding animation so that a view folds/unfolds on itself when interacted with - in the same way flipboard folds the view, but both sides fold

我想我能做到这一点是重写的onDraw方法,在某种程度上复制帆布或帆布上的信息,然后画在画布前半旋转的一种方式,然后画在画布上的另一半旋转的方式另一种方式让他们在中间相遇,但是我似乎无法抓住从画布的信息!是否有可能从画布抢位图/快照?

The way I thought I could do it was to override the onDraw method, somehow duplicate the canvas or the information on the canvas, then draw the first half of the canvas rotated one way, then draw the other half of the canvas rotated the other way so that they meet in the middle, however I can't seem to grab the information from the canvas! Is it possible to grab a bitmap/snapshot from a canvas?

唯一的其他方式,我认为这是可能实现这种动画是用OpenGL。

The only other way I think it's possible to achieve this kind of animation is with OpenGL.

任何帮助是极大的AP preciated。

Any help are greatly appreciated.

编辑继承人什么,我想达到一个很好的例子的http://www.nytimes.com/interactive/2008/03/28/arts/20080330_FOLD_IN_FEATURE.html

EDIT heres a good example of what i want to achieve http://www.nytimes.com/interactive/2008/03/28/arts/20080330_FOLD_IN_FEATURE.html

推荐答案

检查此存档acheive倍动画

check this archive to acheive fold animation

code: http://developer.android.com/shareables/devbytes /FoldingLayout.zip

修改它,使之成为低版本截至API level11

modifies it to make it work for lower version up till API level11

这篇关于Android的手风琴/手风琴/折叠动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆