简体   繁体   English

Google Maps Android API v2使GoogleMap View动画

[英]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使用SurfaceViewViewServer放到您的应用程序中 ,然后将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.

相关问题 在InfoWindow隐藏在GoogleMap Google Maps Android API v2中后,android onMarkerClick不会调用 - android onMarkerClick doesn't call after InfoWindow hiding in GoogleMap Google Maps Android API v2 使用Android Google Maps API v2在GoogleMap中旋转多边形 - Rotate Polygon inside GoogleMap using Android Google Maps API v2 当新版Google Maps Android API v2中的MapView对象中的GoogleMap准备就绪时,有没有办法得到通知? - Is there a way to get notified when the GoogleMap is ready in a MapView object in the new Google Maps Android API v2? 我无法使Google Maps Android API v2正常工作:GoogleMap无法解析为某种类型 - I can't get Google Maps Android API v2 to work : GoogleMap cannot be resolved to a type 在FrameLayout中添加Google Maps Android API v2 MapFragment和视图 - Adding a Google Maps Android API v2 MapFragment and a View in a FrameLayout 使用Android版Google Maps api v2扩展视图 - Inflating view with Google Maps api v2 for Android Google Map Android API v2:GoogleMap为空 - Google Map Android API v2 : GoogleMap is null Android Google Maps API v2 - NoSuchFieldError - Android Google Maps API v2 - NoSuchFieldError Google Maps Android API v2 - DirectionsRenderer - Google Maps Android API v2 - DirectionsRenderer 谷歌地图android api v2错误 - google maps android api v2 error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM