summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/filtershow/PanelController.java
diff options
context:
space:
mode:
authorJohn Hoford <hoford@google.com>2013-03-01 13:22:57 -0800
committerJohn Hoford <hoford@google.com>2013-03-01 13:30:21 -0800
commit82148a5664f7d14712c6e9d5d7bb9d2a6374304e (patch)
tree45f8cd8182d1af16cc9281889ab4ef9c2cf2fdff /src/com/android/gallery3d/filtershow/PanelController.java
parentfacd6eec5e6e5ff63725d00a791662c462c111c4 (diff)
downloadandroid_packages_apps_Snap-82148a5664f7d14712c6e9d5d7bb9d2a6374304e.tar.gz
android_packages_apps_Snap-82148a5664f7d14712c6e9d5d7bb9d2a6374304e.tar.bz2
android_packages_apps_Snap-82148a5664f7d14712c6e9d5d7bb9d2a6374304e.zip
fixed hiding of tiny planet
Change-Id: I0d23a640cf4aee5ae03e6552637ba3663db85bde
Diffstat (limited to 'src/com/android/gallery3d/filtershow/PanelController.java')
-rw-r--r--src/com/android/gallery3d/filtershow/PanelController.java22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/com/android/gallery3d/filtershow/PanelController.java b/src/com/android/gallery3d/filtershow/PanelController.java
index 519733e08..58aded671 100644
--- a/src/com/android/gallery3d/filtershow/PanelController.java
+++ b/src/com/android/gallery3d/filtershow/PanelController.java
@@ -16,7 +16,6 @@
package com.android.gallery3d.filtershow;
-import android.annotation.TargetApi;
import android.content.Context;
import android.text.Html;
import android.view.View;
@@ -27,11 +26,10 @@ import android.widget.TextView;
import com.android.gallery3d.R;
import com.android.gallery3d.filtershow.editors.Editor;
+import com.android.gallery3d.filtershow.editors.EditorTinyPlanet;
import com.android.gallery3d.filtershow.filters.FilterRepresentation;
import com.android.gallery3d.filtershow.filters.ImageFilter;
import com.android.gallery3d.filtershow.filters.ImageFilterTinyPlanet;
-import com.android.gallery3d.filtershow.imageshow.ImageCrop;
-import com.android.gallery3d.filtershow.imageshow.ImageGeometry;
import com.android.gallery3d.filtershow.imageshow.ImageShow;
import com.android.gallery3d.filtershow.imageshow.MasterImage;
import com.android.gallery3d.filtershow.presets.ImagePreset;
@@ -525,21 +523,21 @@ public class PanelController implements OnClickListener {
return;
}
- switch (view.getId()) {
- case R.id.tinyplanetButton: {
- mCurrentImage = showImageView(R.id.imageTinyPlanet);
- String ename = mCurrentImage.getContext().getString(R.string.tinyplanet);
- mUtilityPanel.setEffectName(ename);
- break;
- }
- case R.id.applyEffect: {
+ int id = view.getId();
+ if (id == EditorTinyPlanet.ID) {
+ mCurrentImage = showImageView(R.id.imageTinyPlanet);
+ String ename = mCurrentImage.getContext().getString(R.string.tinyplanet);
+ mUtilityPanel.setEffectName(ename);
+
+ } else {
+ if (id == R.id.applyEffect) {
if (MasterImage.getImage().getCurrentFilter() instanceof ImageFilterTinyPlanet) {
mActivity.saveImage();
} else {
showPanel(mCurrentPanel);
}
MasterImage.getImage().invalidateFiltersOnly();
- break;
+
}
}
mCurrentImage.select();