简体   繁体   English

如何在活动A中获得与活动B的布局层次结构动画相关的视图?

[英]How to get Views in activity A animate to activity B's layout hierarchy?

I have two activities A & B. When I click on a view in A, I would like the clicked view to move to the top and expand into the layout defined by activity B. 我有两个活动A和B。单击A中的视图时,我希望单击的视图移动到顶部并扩展到活动B定义的布局中。

Is this possible? 这可能吗?

One of the ideas I had was to call a method that could measure B's layout hierarchy while still in activity A, animate the clicked view in A to B's layout positions, then expand/crossfade A to B. However, I'm having trouble trying to get B's layout measurements while still in A. 我的想法之一是调用一种方法,该方法可以在仍处于活动A时测量B的布局层次结构,在A到B的布局位置中对单击的视图进行动画处理,然后将A扩展/交叉淡入淡出。但是,我在尝试时遇到了麻烦在仍在A中时获得B的布局尺寸。

Thank you. 谢谢。

Google I/O 2013 A Moving Experience Google I / O 2013的移动体验

This session introduce similar example. 本次会议介绍类似的例子。 You can fix the image location of Activity B or sending animation result layout from activity A to B using intent extra. 您可以使用额外的意图来固定活动B的图像位置或将动画结果布局从活动A发送到B。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM