summaryrefslogtreecommitdiffstats
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
commit01a4beb197d74dddf788efaf6aedef434dfb8f8f (patch)
tree610c3ae809bbcc120a8ad837a91146e1234bd0f3
parent948a4e6e38d8d9ec9926877524478d6692437105 (diff)
downloadandroid_packages_apps_Gallery2-01a4beb197d74dddf788efaf6aedef434dfb8f8f.tar.gz
android_packages_apps_Gallery2-01a4beb197d74dddf788efaf6aedef434dfb8f8f.tar.bz2
android_packages_apps_Gallery2-01a4beb197d74dddf788efaf6aedef434dfb8f8f.zip
Fix history original image
Change 1st and 2nd panel background color Change-Id: Ib6a1033f99a4a1460c1a31be1e67ebd965e00add
-rw-r--r--res/drawable/filtershow_state_button_background0
-rw-r--r--res/layout/filtershow_activity.xml2
-rw-r--r--src/com/android/gallery3d/filtershow/FilterShowActivity.java1
-rw-r--r--src/com/android/gallery3d/filtershow/HistoryAdapter.java9
4 files changed, 12 insertions, 0 deletions
diff --git a/res/drawable/filtershow_state_button_background b/res/drawable/filtershow_state_button_background
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/res/drawable/filtershow_state_button_background
diff --git a/res/layout/filtershow_activity.xml b/res/layout/filtershow_activity.xml
index 6c96225f5..644bd5a54 100644
--- a/res/layout/filtershow_activity.xml
+++ b/res/layout/filtershow_activity.xml
@@ -101,6 +101,7 @@
android:id="@+id/fxList"
android:layout_width="match_parent"
android:layout_height="@dimen/thumbnail_size"
+ android:background="@color/background_main_toolbar"
android:scrollbars="none" >
<LinearLayout
@@ -116,6 +117,7 @@
android:id="@+id/bordersList"
android:layout_width="match_parent"
android:layout_height="@dimen/thumbnail_size"
+ android:background="@color/background_main_toolbar"
android:visibility="gone"
android:scrollbars="none" >
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;
+ }
}