Skip to Content.
Sympa Menu

ndt-dev - [ndt-dev] [ndt] r710 committed - Animate progress bars.

Subject: NDT-DEV email list created

List archive

[ndt-dev] [ndt] r710 committed - Animate progress bars.


Chronological Thread 
  • From:
  • To:
  • Subject: [ndt-dev] [ndt] r710 committed - Animate progress bars.
  • Date: Tue, 11 Oct 2011 18:25:48 +0000

Revision: 710
Author:

Date: Tue Oct 11 11:24:45 2011
Log: Animate progress bars.
http://code.google.com/p/ndt/source/detail?r=710

Added:
/branches/android/Android/res/anim
/branches/android/Android/res/anim/blink.xml
/branches/android/Android/res/anim/left_translate.xml
/branches/android/Android/res/anim/right_translate.xml
Modified:
/branches/android/Android/src/net/measurementlab/ndt/TestsActivity.java

=======================================
--- /dev/null
+++ /branches/android/Android/res/anim/blink.xml Tue Oct 11 11:24:45
2011
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<set xmlns:android="http://schemas.android.com/apk/res/android";>
+ <alpha android:fromAlpha="1.0"
+ android:toAlpha="0.0"
+ android:interpolator="@android:anim/accelerate_interpolator"
+ android:duration="1500" android:repeatCount="-1"
+ android:repeatMode="reverse" />
+</set>
=======================================
--- /dev/null
+++ /branches/android/Android/res/anim/left_translate.xml Tue Oct 11 11:24:45 2011
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<set xmlns:android="http://schemas.android.com/apk/res/android";>
+ <translate android:fromXDelta="100%" android:toXDelta="-100%"
+ android:duration="3000" android:repeatCount="-1" />
+</set>
=======================================
--- /dev/null
+++ /branches/android/Android/res/anim/right_translate.xml Tue Oct 11 11:24:45 2011
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<set xmlns:android="http://schemas.android.com/apk/res/android";>
+ <translate android:fromXDelta="-100%" android:toXDelta="100%"
+ android:duration="3000" android:repeatCount="-1" />
+</set>
=======================================
--- /branches/android/Android/src/net/measurementlab/ndt/TestsActivity.java Tue Aug 23 14:09:58 2011
+++ /branches/android/Android/src/net/measurementlab/ndt/TestsActivity.java Tue Oct 11 11:24:45 2011
@@ -18,6 +18,8 @@
import android.net.NetworkInfo;
import android.os.Bundle;
import android.util.Log;
+import android.view.animation.Animation;
+import android.view.animation.AnimationUtils;
import android.widget.ImageView;
import android.widget.TextView;

@@ -107,7 +109,8 @@
}
ImageView imageView = (ImageView)
findViewById(R.id.NdtTestsProgress);
imageView.setImageDrawable(getResources().getDrawable(R.drawable.progress_bar));
- // TODO show preparation animation
+ Animation myFadeOutAnimation = AnimationUtils.loadAnimation(imageView.getContext(), R.anim.blink);
+ imageView.startAnimation(myFadeOutAnimation); //Set animation to your ImageView
}

private void uploading() {
@@ -115,7 +118,8 @@
updateHeader(R.string.tests_both_header,
R.string.tests_upload_info);
ImageView imageView = (ImageView)
findViewById(R.id.NdtTestsProgress);
imageView.setImageDrawable(getResources().getDrawable(R.drawable.progress_bar_left));
- // TODO show upload animation
+ Animation myFadeOutAnimation = AnimationUtils.loadAnimation(imageView.getContext(), R.anim.left_translate);
+ imageView.startAnimation(myFadeOutAnimation); //Set animation to your ImageView
}

private void downloading() {
@@ -123,7 +127,8 @@
updateHeader(R.string.tests_both_header,
R.string.tests_download_info);
ImageView imageView = (ImageView)
findViewById(R.id.NdtTestsProgress);
imageView.setImageDrawable(getResources().getDrawable(R.drawable.progress_bar_right));
- // TODO show download animation
+ Animation myFadeOutAnimation = AnimationUtils.loadAnimation(imageView.getContext(), R.anim.right_translate);
+ imageView.startAnimation(myFadeOutAnimation); //Set animation to your ImageView
}

private void complete(Intent status) {


  • [ndt-dev] [ndt] r710 committed - Animate progress bars., ndt, 10/11/2011

Archive powered by MHonArc 2.6.16.

Top of Page