summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2012-10-25 10:08:37 -0700
committerJohn Reck <jreck@google.com>2012-10-25 17:42:21 -0700
commit24c6b09c392983efc772fce3e5973e68461db760 (patch)
treeb9813b31f61d105a108a1a30f46623f5fe738b6a /src
parentf6ac061eb455fff6e8d08410f70db2dffbaa9213 (diff)
downloadandroid_packages_apps_Snap-24c6b09c392983efc772fce3e5973e68461db760.tar.gz
android_packages_apps_Snap-24c6b09c392983efc772fce3e5973e68461db760.tar.bz2
android_packages_apps_Snap-24c6b09c392983efc772fce3e5973e68461db760.zip
Add loading spinner
Bug: 7408575 Change-Id: Ia737b36abb88d75381f41c25474e3cc03448dbb9
Diffstat (limited to 'src')
-rw-r--r--src/com/android/gallery3d/filtershow/FilterShowActivity.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/filtershow/FilterShowActivity.java b/src/com/android/gallery3d/filtershow/FilterShowActivity.java
index 0a6bb2dd3..95b7af069 100644
--- a/src/com/android/gallery3d/filtershow/FilterShowActivity.java
+++ b/src/com/android/gallery3d/filtershow/FilterShowActivity.java
@@ -393,6 +393,10 @@ public class FilterShowActivity extends Activity implements OnItemClickListener,
}
private void startLoadBitmap(Uri uri) {
+ final View filters = findViewById(R.id.filtersPanel);
+ final View loading = findViewById(R.id.loading);
+ loading.setVisibility(View.VISIBLE);
+ filters.setVisibility(View.INVISIBLE);
View tinyPlanetView = findViewById(R.id.tinyplanetButton);
if (tinyPlanetView != null) {
tinyPlanetView.setVisibility(View.GONE);
@@ -413,10 +417,21 @@ public class FilterShowActivity extends Activity implements OnItemClickListener,
@Override
protected Boolean doInBackground(Uri... params) {
mImageLoader.loadBitmap(params[0], mBitmapSize);
+ publishProgress();
return mImageLoader.queryLightCycle360();
}
@Override
+ protected void onProgressUpdate(Void... values) {
+ super.onProgressUpdate(values);
+ if (isCancelled()) return;
+ final View filters = findViewById(R.id.filtersPanel);
+ final View loading = findViewById(R.id.loading);
+ loading.setVisibility(View.GONE);
+ filters.setVisibility(View.VISIBLE);
+ }
+
+ @Override
protected void onPostExecute(Boolean result) {
if (isCancelled()) {
return;