如何折叠认为从中期的机器人? [英] how to fold view from middle in android?

查看:113
本文介绍了如何折叠认为从中期的机器人?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我学习Android和尝试创建折叠在中间的观点就像一个在链接的视频的效果。

I am learning android and trying to create an effect of folding the view from middle like one in the linked video.

http://vimeo.com/37254322

任何人都可以提供一些指导或指向正确的资源。

Can anybody give some guidance or point to the right resource.

目前Android允许翻转Z轴的完整视图创建视图的翻页效果,如下面的视频。

Current android allows to flip the complete view on Z axis to create a view flip effect as shown in video below.

http://www.youtube.com/watch?v=a5b0EKUU3h4

code发现这里的翻页效果 HTTP ://www.inter-fuser.com/2009/08/android-animations-3d-flip.html

Code found here for flip effect http://www.inter-fuser.com/2009/08/android-animations-3d-flip.html

但在第一视频的影响,从中间折了。此外,我想用这种效果作为过渡动画其中隐藏的俯视图,并显示一个从后面用的ViewGroup。

But the effect in first video folds it from middle. Also I would like to use that effect as transition animation which hides the top view and display one from behind with a viewGroup.

感谢

推荐答案

您需要执行以下任务其中每一个都可以问自己的问题(这是简单的解决方案,我能想到的):

You would need to perform the following tasks which can each be asked in their own question (This is as simple a solution as I can think of):

  1. 您将需要捕获1和第2页作为独立的实体(这可以通过'的画布视图Heirachy或者通过一些截图技术汇编完成。)

  1. You will need to capture "Page 1" and "Page 2" as Separate entities (this could be done by compilation of the View Heirachy of Canvas' or through some screenshot technique.)

添加第4页下面第2页,所以它是可见的,因为它上面的视图收缩。

Add "Page 4" underneath "Page 2" so it's visible as the View above it shrinks.

您可以将一个动画第2页,这缩小它的宽度值。对于额外的效果,这也可能包括出现在页面上,网页EGDE和页面顶部/底部的动画阴影。

You can apply an animation to "Page 2" which shrinks it's width value. For extra effect this could also include a shadow appearing on the page, page egde and page top/bottom animations.

层第3页上1为0的宽度和半个屏幕宽度的x值。有宽度,如果这个视图开始生长并翻译它留在同样的速度x值。添加额外的阴影/页边缘/页底部。

Layer "Page 3" above "Page 1" with a width of 0 and with an x value of half of the screen width. Have the width if this View begin to grow and translate it's x value left at the same rate. Add extra shadow / page edge / page bottom.

删除原来的1和第2页。

Remove the original "Page 1" and "Page 2".

这篇关于如何折叠认为从中期的机器人?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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