summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Hoford <hoford@google.com>2013-02-08 14:37:35 -0800
committerJohn Hoford <hoford@google.com>2013-02-08 14:53:46 -0800
commitb4e6733731e751afe7dcf2a3b9803d2f720cb253 (patch)
treeb4bbe06d702f9a4d91de3efb3858f8841e7dcfd5
parent0606108a8126b357772db415ad4517395fce8875 (diff)
downloadandroid_packages_apps_Snap-b4e6733731e751afe7dcf2a3b9803d2f720cb253.tar.gz
android_packages_apps_Snap-b4e6733731e751afe7dcf2a3b9803d2f720cb253.tar.bz2
android_packages_apps_Snap-b4e6733731e751afe7dcf2a3b9803d2f720cb253.zip
remove slider from FX and Border UI
Change-Id: Ic1c38734c4351ab0150b90d5d4fc575cce9db9e9
-rw-r--r--src/com/android/gallery3d/filtershow/FilterShowActivity.java7
-rw-r--r--src/com/android/gallery3d/filtershow/editors/ImageOnlyEditor.java46
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterBorder.java7
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterFx.java8
4 files changed, 63 insertions, 5 deletions
diff --git a/src/com/android/gallery3d/filtershow/FilterShowActivity.java b/src/com/android/gallery3d/filtershow/FilterShowActivity.java
index 1b7408f62..051ffaf4a 100644
--- a/src/com/android/gallery3d/filtershow/FilterShowActivity.java
+++ b/src/com/android/gallery3d/filtershow/FilterShowActivity.java
@@ -64,6 +64,7 @@ import com.android.gallery3d.filtershow.cache.ImageLoader;
import com.android.gallery3d.filtershow.editors.BasicEditor;
import com.android.gallery3d.filtershow.editors.EditorDraw;
import com.android.gallery3d.filtershow.editors.EditorManager;
+import com.android.gallery3d.filtershow.editors.ImageOnlyEditor;
import com.android.gallery3d.filtershow.filters.*;
import com.android.gallery3d.filtershow.imageshow.ImageCrop;
import com.android.gallery3d.filtershow.imageshow.ImageDraw;
@@ -223,6 +224,7 @@ public class FilterShowActivity extends Activity implements OnItemClickListener,
mEditorPlaceHolder.setContainer((FrameLayout) findViewById(R.id.editorContainer));
mEditorPlaceHolder.addEditor(new EditorDraw());
mEditorPlaceHolder.addEditor(new BasicEditor());
+ mEditorPlaceHolder.addEditor(new ImageOnlyEditor());
EditorManager.addEditors(mEditorPlaceHolder);
mEditorPlaceHolder.setOldViews(mImageViews);
mEditorPlaceHolder.setImageLoader(mImageLoader);
@@ -305,11 +307,6 @@ public class FilterShowActivity extends Activity implements OnItemClickListener,
LoadBordersTask loadBorders = new LoadBordersTask(listBorders);
loadBorders.execute();
- SeekBar seekBar = (SeekBar) findViewById(R.id.filterSeekBar);
- seekBar.setMax(SEEK_BAR_MAX);
-
- mImageShow.setSeekBar(seekBar);
- mImageTinyPlanet.setSeekBar(seekBar);
mPanelController.setRowPanel(findViewById(R.id.secondRowPanel));
mPanelController.setUtilityPanel(this, findViewById(R.id.filterButtonsList),
findViewById(R.id.panelAccessoryViewList),
diff --git a/src/com/android/gallery3d/filtershow/editors/ImageOnlyEditor.java b/src/com/android/gallery3d/filtershow/editors/ImageOnlyEditor.java
new file mode 100644
index 000000000..a3fc5aab4
--- /dev/null
+++ b/src/com/android/gallery3d/filtershow/editors/ImageOnlyEditor.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.gallery3d.filtershow.editors;
+
+import android.content.Context;
+import android.widget.FrameLayout;
+
+import com.android.gallery3d.R;
+import com.android.gallery3d.filtershow.imageshow.ImageShow;
+
+/**
+ * The editor with no slider for filters without UI
+ */
+public class ImageOnlyEditor extends Editor {
+ public static int ID = R.id.imageOnlyEditor;
+ private final String LOGTAG = "ImageOnlyEditor";
+
+ public ImageOnlyEditor() {
+ super(ID);
+ }
+
+ protected ImageOnlyEditor(int id) {
+ super(id);
+ }
+
+ @Override
+ public void createEditor(Context context, FrameLayout frameLayout) {
+ super.createEditor(context, frameLayout);
+ mView = mImageShow = new ImageShow(context);
+ }
+
+}
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterBorder.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterBorder.java
index 200bcf153..16e491b89 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterBorder.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterBorder.java
@@ -25,6 +25,7 @@ import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import com.android.gallery3d.R;
+import com.android.gallery3d.filtershow.editors.ImageOnlyEditor;
import java.util.HashMap;
@@ -55,6 +56,12 @@ public class ImageFilterBorder extends ImageFilter {
}
@Override
+ public int getEditingViewId() {
+ return ImageOnlyEditor.ID;
+ }
+
+ @Override
+
public boolean showParameterValue() {
return false;
}
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterFx.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterFx.java
index 2fa4cfb16..ebc08f0b4 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterFx.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterFx.java
@@ -18,6 +18,9 @@ package com.android.gallery3d.filtershow.filters;
import android.graphics.Bitmap;
+import com.android.gallery3d.filtershow.editors.BasicEditor;
+import com.android.gallery3d.filtershow.editors.ImageOnlyEditor;
+
public class ImageFilterFx extends ImageFilter {
private static final String TAG = "ImageFilterFx";
Bitmap fxBitmap;
@@ -57,6 +60,11 @@ public class ImageFilterFx extends ImageFilter {
}
@Override
+ public int getEditingViewId() {
+ return ImageOnlyEditor.ID;
+ }
+
+ @Override
public boolean showParameterValue() {
return false;
}