[英]Google Maps Android API v2 animate GoogleMap View
I am trying to animate that wraps the Google Maps Fragment in my layout. 我正在尝试制作动画,以将Google Maps Fragment包装在我的布局中。 The following animation appears to have no effect. 以下动画似乎无效。
ObjectAnimator mapAnimator = ObjectAnimator.ofFloat(view, "translationY", -view.getHeight(), view.getHeight());
I have tried wrapping the fragment in FrameLayout and animating that with no luck. 我试过将片段包装在FrameLayout中,并使其没有动画效果。 I can only seem to hide and show the map with the FragmentManager. 我似乎只能使用FragmentManager隐藏和显示地图。
According to this issue the Google Map uses a SurfaceView which can't be animated. 根据此问题 ,Google Map使用无法动画的SurfaceView。 I cannot find anything official to support this. 我找不到任何官方机构来支持这一点。 Can anyone confirm? 谁能确认?
I cannot find anything official to support this. 我找不到任何官方机构来支持这一点。
If "this" means the fact that Maps V2 uses SurfaceView
, drop a ViewServer
in your app , hook up Hierarchy View to your app running on a Maps V2-capable device, and see what you see. 如果“这”表示Maps V2使用SurfaceView
, 将ViewServer
放到您的应用程序中 ,然后将Hierarchy View连接到在支持Maps V2的设备上运行的应用程序,然后查看您看到的内容。 Cyril Mottier wrote comment #1 on the issue you cited; 西里尔·莫蒂尔(Cyril Mottier)对您提到的问题发表了第一条评论; since he says it is a SurfaceView
, I believe him. 因为他说这是SurfaceView
,所以我相信他。
If "this" means the fact that SurfaceView
cannot be animated, that is confirmed by reading the documentation for TextureView
. 如果“这”表示不能对SurfaceView
进行动画处理,请阅读TextureView
的文档来TextureView
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.