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?

Categories

HOME
android
uml
go
phpword
turing-machines
codenvy
wakanda
static
camera
vscode-extensions
vxml
big-o
android-json
google-admin-sdk
character
g++
categorical-data
siddhi
mod-security
opengl-es-3.0
naivebayes
code-generation
atlassian
alpacajs
smartclient
gmm
zxing
bulletphysics
motion-detection
fragment-backstack
has-and-belongs-to-many
gp
complex-numbers
card.io
cd
timing
release
google-data-api
stringtokenizer
ssrs-2014
signal-strength
rfc3339
cnc
dotnet-httpclient
video-conferencing
avx
cup
er-diagram
cpu-cache
jtree
gets
taocp
simplepie
greatest-n-per-group
mongodb-php
php-socket
aurora
contentcontrol
relativelayout
sapi
poppler
android-launcher
sony-lifelog-api
dronekit-android
ocra
google-refine
snoop
actionfilterattribute
gamekit
ssis-data-flow
grails-plugin-rabbitmq
draw2d-js
android-framework
terminate
clickbank
gd-graph
cffile
gpars
traceability
server-administration
wimax
listitem
subproject
virtualpathprovider
user-tracking
catransform3d
load-time
django-piston
lobo-cobra
wordprocessingml
software-lifecycle
java1.4
blind

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile