summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authornicolasroard <nicolasroard@google.com>2013-04-09 08:57:59 -0700
committernicolasroard <nicolasroard@google.com>2013-04-09 08:57:59 -0700
commit15f4efb50b40fbdf108121e367bfd6f50d5b2c41 (patch)
tree9215db8847127ab64458ffefb4b1bfb40a771b40 /src
parent40190f6917a127e156af72f72bfac9814de61ba8 (diff)
downloadandroid_packages_apps_Snap-15f4efb50b40fbdf108121e367bfd6f50d5b2c41.tar.gz
android_packages_apps_Snap-15f4efb50b40fbdf108121e367bfd6f50d5b2c41.tar.bz2
android_packages_apps_Snap-15f4efb50b40fbdf108121e367bfd6f50d5b2c41.zip
Fix history original image
Change 1st and 2nd panel background color Change-Id: Ib6a1033f99a4a1460c1a31be1e67ebd965e00add
Diffstat (limited to 'src')
-rw-r--r--src/com/android/gallery3d/filtershow/FilterShowActivity.java1
-rw-r--r--src/com/android/gallery3d/filtershow/HistoryAdapter.java9
2 files changed, 10 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/filtershow/FilterShowActivity.java b/src/com/android/gallery3d/filtershow/FilterShowActivity.java
index ff6e46635..81c171758 100644
--- a/src/com/android/gallery3d/filtershow/FilterShowActivity.java
+++ b/src/com/android/gallery3d/filtershow/FilterShowActivity.java
@@ -505,6 +505,7 @@ public class FilterShowActivity extends Activity implements OnItemClickListener,
}
pipeline.turnOnPipeline(true);
MasterImage.getImage().setOriginalGeometry(largeBitmap);
+ MasterImage.getImage().getHistory().setOriginalBitmap(mImageLoader.getOriginalBitmapSmall());
mLoadBitmapTask = null;
if (mAction == CROP_ACTION) {
diff --git a/src/com/android/gallery3d/filtershow/HistoryAdapter.java b/src/com/android/gallery3d/filtershow/HistoryAdapter.java
index 2afb7d2a6..8d682465a 100644
--- a/src/com/android/gallery3d/filtershow/HistoryAdapter.java
+++ b/src/com/android/gallery3d/filtershow/HistoryAdapter.java
@@ -44,6 +44,8 @@ public class HistoryAdapter extends ArrayAdapter<ImagePreset> {
private MenuItem mRedoMenuItem = null;
private MenuItem mResetMenuItem = null;
+ private Bitmap mOriginalBitmap = null;
+
public HistoryAdapter(Context context, int resource, int textViewResourceId) {
super(context, resource, textViewResourceId);
FilterShowActivity activity = (FilterShowActivity) context;
@@ -199,6 +201,9 @@ public class HistoryAdapter extends ArrayAdapter<ImagePreset> {
}
ImageView preview = (ImageView) view.findViewById(R.id.preview);
Bitmap bmp = item.getPreviewImage();
+ if (position == getCount()-1 && mOriginalBitmap != null) {
+ bmp = mOriginalBitmap;
+ }
if (bmp != null) {
preview.setImageBitmap(bmp);
} else {
@@ -214,4 +219,8 @@ public class HistoryAdapter extends ArrayAdapter<ImagePreset> {
return view;
}
+
+ public void setOriginalBitmap(Bitmap originalBitmap) {
+ mOriginalBitmap = originalBitmap;
+ }
}