diff options
author | nicolasroard <nicolasroard@google.com> | 2013-04-09 08:57:59 -0700 |
---|---|---|
committer | nicolasroard <nicolasroard@google.com> | 2013-04-09 08:57:59 -0700 |
commit | 15f4efb50b40fbdf108121e367bfd6f50d5b2c41 (patch) | |
tree | 9215db8847127ab64458ffefb4b1bfb40a771b40 /src/com/android/gallery3d/filtershow/HistoryAdapter.java | |
parent | 40190f6917a127e156af72f72bfac9814de61ba8 (diff) | |
download | android_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/com/android/gallery3d/filtershow/HistoryAdapter.java')
-rw-r--r-- | src/com/android/gallery3d/filtershow/HistoryAdapter.java | 9 |
1 files changed, 9 insertions, 0 deletions
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; + } } |