New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add animation utilities + demo. #17
Conversation
@cyrilmottier haha - looking at logcat while running the demo is a bit sad. So many GC ops :-( |
@broady Looks like we have the exact same problems then ... I've taken some time a while ago to tune the snippet of code and reduce the GC ops but unfortunately it's kinda hard/impossible because of the nature of the Google Maps Android API v2. First, the Secondly, when animating multiple Finally, IPCs create tons of objects. This is probably the worst part of animating Markers and I don't think of a way to work around that :( The result is rather disappointing from a UI point of view. I mean, the animations are slow and janky which is a real nightmare to me :) I hate janky UIs. |
+1 to everything you said. Fixing any of that would either mean completely changing the API, or just adding complexity (and many ways to do one thing). Any good suggestions are welcomed :) There's also another source of jank: the map is drawn in a different thread (GL thread, not main Android UI thread). The Animator's loop is tied to the main thread. |
Yep, Forgot about this too. I definitely have a take a look back at my code and start having fun with Google Maps Android API v2 again (haven't used with it since for 6 months :s). Maybe there is a way to smooth things up ... |
…Animator. ObjectAnimator is final, so if we have more flexibility if we have a better animation strategy in the future.
I've always been afraid of using a If I remember correctly my old days on iOS, the |
…evice (i.e. `adb shell am start ...`).
It could certainly be attributed to a preference for fast vector map rendering (OpenGL) over performance of other (developer-provided) overlays. It delivers a good (and consistent w/ Maps app) experience for the majority of use cases. Unfortunately, outside of that, there's a much steeper learning curve. I don't have firsthand experience with MKMapView, but yes, that sounds right. I haven't had a look at the API in iOS7, but I would be interested to see whether it has similar limitations to Android Maps API v2. |
Holding off on this. Lots of questions around backwards compatibility:
|
@broady FYI, here is what I've done for AVélov: The first version of AVélov bundle with clustering was completely backward compatible thanks to NOA. This was working like a charm but when I started investigating performance issues I noticed NOA was kind of slowing down animations. Without deep diving into the actual reasons (probably wrapping & object allocation), I decided to remove it and the animations were smoother ... or at least less janky :p. Hence, I'd say option 1 is bad. AVélov now have a simple backward compatibility because it doesn't animate on pre-HC devices :). Regarding android-maps-utils I have always considered a library must be as independent as possible. It should not rely on another library to work (this is the exact same reason I hate the fact Personally, I'd go for the 5th option or simply no animation at all on pre-HC devices. |
@cyrilmottier appreciate the comments. Your conclusion is what I lean towards. There's also the possibility that we can do animation better without Android's animation framework, in which case returning an Android Animator object would be bad. #5 would be nice then, but you then lose compatibility with AnimatorSet or be wasteful and keep an Animator object around unnecessarily. |
No description provided.