android
Animation in google maps is causing lag / map movement when touched is slow?
The below code can be used to make a ripple animation on the map. But the issue is if I leave the map with the animation running for an hour or more, there is a lag in the UI, the animation becomes very slow, some times the map itself gets stuck and moves. Its very annoying to see the map behaving like this. So how do I make this right? How do I make the map smooth even when there is an animation running on it? Kindly help me out with this issue. Thanks in advance. public void animateCircleOne(){ if(circle_1!=null){ valueAnimator_1.setRepeatCount(ValueAnimator.INFINITE); valueAnimator_1.setRepeatMode(ValueAnimator.RESTART); valueAnimator_1.setIntValues(getIntStart(), getIntEnd()); valueAnimator_1.setDuration(getDuration()); valueAnimator_1.setStartDelay(getAnimationDelayOne()); valueAnimator_1.setEvaluator(new IntEvaluator()); valueAnimator_1.setInterpolator(new LinearInterpolator()); valueAnimator_1.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { #Override public void onAnimationUpdate(ValueAnimator valueAnimator) { float animatedFraction = valueAnimator.getAnimatedFraction(); if(circle_1!=null) { circle_1.setStrokeColor(returnAlphaColor(animatedFraction)); circle_1.setRadius(animatedFraction * getMaxAnimationLengthOne()); } } }); valueAnimator_1.start(); } } /*return alpha fraction*/ private double returnAlphaFraction(float fraction){ double value = ALPHA * fraction; if(value==0){ return 255; } return (ALPHA * fraction); } /*return animated alpha and color*/ private int returnAlphaColor(float animatedFraction){ return Color.argb((int)(ALPHA - returnAlphaFraction(animatedFraction)), Color_R, Color_G, Color_B); }
Related Links
Android: Control Video quality while invoking intent
VideoView looping videos Replenish
How to pass ArrayList<my_custom_class> to an other activity?
Android Patterns
Android- Destroy media player service when click on item in Listview
Cannot get NMEA file based mock location provider to work
How To Send the xml file to .net web service in android
Database Sorting depending on Integer?
HttpClient problem with URLs which include curly braces
Using Wireshark or Fiddler to study Android app without using emulator
Differentiate MMS and SMS via MMS/SMS listeners in Android
Send User ID Variable With Paypal Subscribe - PhoneGap
Android: how to know file located in web server is modified?
Combine image and text to drawable
Traffic on MapView is not an Overlay
how to add a marker to basicComponentMap from given coordinates with Nutiteq package?