summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/ImageGallery.java
diff options
context:
space:
mode:
authorChih-Chung Chang <chihchung@google.com>2009-07-07 20:01:55 +0800
committerChih-Chung Chang <chihchung@google.com>2009-07-08 10:50:16 +0800
commitcb4b88e7d62dec7c38953278d8d2facafd89a14c (patch)
tree60c4fa7b9297ac116a08df884662c2994d9f7684 /src/com/android/camera/ImageGallery.java
parent5f2686bef342f62421747fd743cf170d22f0e190 (diff)
downloadLegacyCamera-cb4b88e7d62dec7c38953278d8d2facafd89a14c.zip
LegacyCamera-cb4b88e7d62dec7c38953278d8d2facafd89a14c.tar.gz
LegacyCamera-cb4b88e7d62dec7c38953278d8d2facafd89a14c.tar.bz2
Draw the multiselect markers dynamically so we can avoid invalidating the thumbnails.
Diffstat (limited to 'src/com/android/camera/ImageGallery.java')
-rw-r--r--src/com/android/camera/ImageGallery.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/com/android/camera/ImageGallery.java b/src/com/android/camera/ImageGallery.java
index 2235dea..993d4f3 100644
--- a/src/com/android/camera/ImageGallery.java
+++ b/src/com/android/camera/ImageGallery.java
@@ -660,7 +660,7 @@ public class ImageGallery extends Activity implements
if (mMultiSelected != null) {
int original = mMultiSelected.size();
if (!mMultiSelected.add(img)) mMultiSelected.remove(img);
- mGvs.invalidateImage(index);
+ mGvs.invalidate();
if (original == 0) showFooter();
if (mMultiSelected.size() == 0) hideFooter();
return;
@@ -915,7 +915,14 @@ public class ImageGallery extends Activity implements
overlay.setBounds(mSrcRect);
overlay.draw(canvas);
}
+ }
+ public boolean needsDecoration() {
+ return (mMultiSelected != null);
+ }
+
+ public void drawDecoration(Canvas canvas, IImage image,
+ int xPos, int yPos, int w, int h) {
if (mMultiSelected != null) {
initializeMultiSelectDrawables();
@@ -1016,13 +1023,13 @@ public class ImageGallery extends Activity implements
private void closeMultiSelectMode() {
if (mMultiSelected == null) return;
mMultiSelected = null;
- mGvs.invalidateAllImages();
+ mGvs.invalidate();
hideFooter();
}
private void openMultiSelectMode() {
if (mMultiSelected != null) return;
mMultiSelected = new HashSet<IImage>();
- mGvs.invalidateAllImages();
+ mGvs.invalidate();
}
}