Android的手风琴/手风琴/折叠动画

编程入门 行业动态 更新时间:2024-10-16 00:23:10
本文介绍了Android的手风琴/手风琴/折叠动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我试图创造一个互动的手风琴/六角/折叠的动画,这样一个看法倍/时,与之交互本身展开 - 以同样的方式 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.

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

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

推荐答案

检查此存档acheive倍动画

check this archive to acheive fold animation

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

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

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

更多推荐

Android的手风琴/手风琴/折叠动画

本文发布于:2023-11-25 00:46:47,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1627623.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:手风琴   动画   Android

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!