summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Newberger <alann@google.com>2014-09-23 16:53:25 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-09-23 16:53:25 +0000
commit1db7f2860a5117ad2082802f9e3ce7c0314bfee8 (patch)
treeea17e8b7838463c99bcc70749b6f85a37f284c55
parent9f3628da2cbef7db47e5f9f5e0e2f69a451ee4b9 (diff)
parentb60af188e3bc712a7f06700c591c428834237dff (diff)
downloadandroid_packages_apps_Camera2-1db7f2860a5117ad2082802f9e3ce7c0314bfee8.tar.gz
android_packages_apps_Camera2-1db7f2860a5117ad2082802f9e3ce7c0314bfee8.tar.bz2
android_packages_apps_Camera2-1db7f2860a5117ad2082802f9e3ce7c0314bfee8.zip
am b60af188: Merge "Fix filmstrip item bounds to filmstrip scale" into ub-camera-glacier
* commit 'b60af188e3bc712a7f06700c591c428834237dff': Fix filmstrip item bounds to filmstrip scale
-rw-r--r--src/com/android/camera/widget/FilmstripView.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/com/android/camera/widget/FilmstripView.java b/src/com/android/camera/widget/FilmstripView.java
index 371dcdb2b..5774ab397 100644
--- a/src/com/android/camera/widget/FilmstripView.java
+++ b/src/com/android/camera/widget/FilmstripView.java
@@ -797,8 +797,12 @@ public class FilmstripView extends ViewGroup {
return null;
}
- int width = Math.round(mScale * getWidth());
- int height = Math.round(mScale * getHeight());
+ // Always scale by fixed filmstrip scale, since we only show items when
+ // in filmstrip. Preloading images with a different scale and bounds
+ // interferes with caching.
+ int width = Math.round(FILM_STRIP_SCALE * getWidth());
+ int height = Math.round(FILM_STRIP_SCALE * getHeight());
+ Log.v(TAG, "suggesting item bounds: " + width + "x" + height);
mDataAdapter.suggestViewSizeBound(width, height);
data.prepare();