From 04e714257e8d6da434cb2d23feab365d38d05273 Mon Sep 17 00:00:00 2001 From: Adam Copp Date: Tue, 11 Sep 2012 17:21:36 +0100 Subject: Do not show loading bar after thumbnail has loaded After talking to the designers for Google Now, who have said they talked to the designers from gallery app, it appears that we should not show the loading spinner once the thumbnail has loaded. Let me know if this is orthogonal to the behaviour you would like in the gmail app, and I can write a more involved patch with an overridable callback to decide wether to show the spinner or not. Change-Id: I77a3f2e2487d469ab47e45c7a94942f831528d41 --- photoviewer/src/com/android/ex/photo/fragments/PhotoViewFragment.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/photoviewer/src/com/android/ex/photo/fragments/PhotoViewFragment.java b/photoviewer/src/com/android/ex/photo/fragments/PhotoViewFragment.java index 7be37b0..c6c2e3b 100644 --- a/photoviewer/src/com/android/ex/photo/fragments/PhotoViewFragment.java +++ b/photoviewer/src/com/android/ex/photo/fragments/PhotoViewFragment.java @@ -272,18 +272,16 @@ public class PhotoViewFragment extends Fragment implements } break; case LOADER_ID_THUMBNAIL: + mProgressBarNeeded = false; if (isPhotoBound()) { // There is need to do anything with the thumbnail image, as the full size // image is being shown. mPhotoPreviewAndProgress.setVisibility(View.GONE); - mProgressBarNeeded = false; return; } else if (data == null) { // no preview, show default mPhotoPreviewImage.setVisibility(View.VISIBLE); mPhotoPreviewImage.setImageResource(R.drawable.default_image); - - mProgressBarNeeded = false; } else { bindPhoto(data); getLoaderManager().initLoader(LOADER_ID_PHOTO, null, this); -- cgit v1.2.3