I am trying to animate that wraps the Google Maps Fragment in my layout. 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. I can only seem to hide and show the map with the FragmentManager.
According to this issue the Google Map uses a SurfaceView which can’t be animated. I cannot find anything official to support this. Can anyone confirm?
If “this” means the fact that Maps V2 uses
SurfaceView, drop aViewServerin your app, hook up Hierarchy View to your app running on a Maps V2-capable device, and see what you see. Cyril Mottier wrote comment #1 on the issue you cited; since he says it is aSurfaceView, I believe him.If “this” means the fact that
SurfaceViewcannot be animated, that is confirmed by reading the documentation forTextureView.