android - Animation causes AsyncTask HttpClient task to be super slow -
android - Animation causes AsyncTask HttpClient task to be super slow -
i have network task defined within of asynctask takes approximately 2-3 seconds complete.
when add together animation code below:
<?xml version="1.0" encoding="utf-8"?> <rotate xmlns:android="http://schemas.android.com/apk/res/android" android:fromdegrees="0" android:todegrees="360" android:pivotx="50%" android:pivoty="50%" android:repeatcount="infinite" android:duration="60" android:interpolator="@android:anim/linear_interpolator" />
and in activity execute follows:
progressimageview = (imageview) getwindow().findviewbyid( r.id.progressimageview); progressanimation = animationutils.loadanimation(this, r.anim.progress); progressimageview.startanimation(progressanimation);
the network phone call takes approximately 12-13 seconds complete. doing incredibly wrong here?
i'd guess problem duration value, specified in milliseconds, i'm guessing intended more 6000 or 60000 (1 min).
a value little causing ui thread backed big number of frame updates delay processing the onprogressupdate , onpostexecute code in async task.
try setting duration larger value.
android
Comments
Post a Comment