summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/filtershow/controller
diff options
context:
space:
mode:
authorJohn Hoford <hoford@google.com>2013-04-20 08:12:48 -0700
committerJohn Hoford <hoford@google.com>2013-04-23 19:19:09 -0700
commitdcd31fe8f7bc219b4e8f7608a6d5ad016da0f885 (patch)
tree4318a5b94eb2fc369ed3b6cee6d7f8dca04ddd37 /src/com/android/gallery3d/filtershow/controller
parentf9ff7ffe2004ed2077f38a91dafb213495e5bf70 (diff)
downloadandroid_packages_apps_Snap-dcd31fe8f7bc219b4e8f7608a6d5ad016da0f885.tar.gz
android_packages_apps_Snap-dcd31fe8f7bc219b4e8f7608a6d5ad016da0f885.tar.bz2
android_packages_apps_Snap-dcd31fe8f7bc219b4e8f7608a6d5ad016da0f885.zip
Fix local adjust
bug:8655977 Change-Id: I0aa4ac30de077663f52418528757a842372e0fc2
Diffstat (limited to 'src/com/android/gallery3d/filtershow/controller')
-rw-r--r--src/com/android/gallery3d/filtershow/controller/ActionSlider.java29
-rw-r--r--src/com/android/gallery3d/filtershow/controller/BasicParameterStyle.java2
-rw-r--r--src/com/android/gallery3d/filtershow/controller/ParameterActionAndInt.java8
3 files changed, 28 insertions, 11 deletions
diff --git a/src/com/android/gallery3d/filtershow/controller/ActionSlider.java b/src/com/android/gallery3d/filtershow/controller/ActionSlider.java
index 6ed2467de..f80a1cacb 100644
--- a/src/com/android/gallery3d/filtershow/controller/ActionSlider.java
+++ b/src/com/android/gallery3d/filtershow/controller/ActionSlider.java
@@ -27,7 +27,8 @@ import com.android.gallery3d.filtershow.editors.Editor;
public class ActionSlider extends TitledSlider {
private static final String LOGTAG = "ActionSlider";
- ImageButton mActionButton;
+ ImageButton mLeftButton;
+ ImageButton mRightButton;
public ActionSlider() {
mLayoutID = R.layout.filtershow_control_action_slider;
}
@@ -35,22 +36,36 @@ public class ActionSlider extends TitledSlider {
@Override
public void setUp(ViewGroup container, Parameter parameter, Editor editor) {
super.setUp(container, parameter, editor);
- mActionButton = (ImageButton) mTopView.findViewById(R.id.actionButton);
- mActionButton.setOnClickListener(new OnClickListener() {
+ mLeftButton = (ImageButton) mTopView.findViewById(R.id.leftActionButton);
+ mLeftButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
- ((ParameterActionAndInt) mParameter).fireAction();
+ ((ParameterActionAndInt) mParameter).fireLeftAction();
}
});
+
+ mRightButton = (ImageButton) mTopView.findViewById(R.id.rightActionButton);
+ mRightButton.setOnClickListener(new OnClickListener() {
+
+ @Override
+ public void onClick(View v) {
+ ((ParameterActionAndInt) mParameter).fireRightAction();
+ }
+ });
+ updateUI();
}
@Override
public void updateUI() {
super.updateUI();
- if (mActionButton != null) {
- int iconId = ((ParameterActionAndInt) mParameter).getActionIcon();
- mActionButton.setImageResource(iconId);
+ if (mLeftButton != null) {
+ int iconId = ((ParameterActionAndInt) mParameter).getLeftIcon();
+ mLeftButton.setImageResource(iconId);
+ }
+ if (mRightButton != null) {
+ int iconId = ((ParameterActionAndInt) mParameter).getRightIcon();
+ mRightButton.setImageResource(iconId);
}
}
}
diff --git a/src/com/android/gallery3d/filtershow/controller/BasicParameterStyle.java b/src/com/android/gallery3d/filtershow/controller/BasicParameterStyle.java
index 633e41ff6..072edd72a 100644
--- a/src/com/android/gallery3d/filtershow/controller/BasicParameterStyle.java
+++ b/src/com/android/gallery3d/filtershow/controller/BasicParameterStyle.java
@@ -92,8 +92,6 @@ public class BasicParameterStyle implements ParameterStyles {
@Override
public void getIcon(int index, RenderingRequestCaller caller) {
- Log.v(LOGTAG, "############ " + ID + " getIcon " + index);
-
mEditor.computeIcon(index, caller);
}
diff --git a/src/com/android/gallery3d/filtershow/controller/ParameterActionAndInt.java b/src/com/android/gallery3d/filtershow/controller/ParameterActionAndInt.java
index 04567e28c..8a05c3aa6 100644
--- a/src/com/android/gallery3d/filtershow/controller/ParameterActionAndInt.java
+++ b/src/com/android/gallery3d/filtershow/controller/ParameterActionAndInt.java
@@ -19,7 +19,11 @@ package com.android.gallery3d.filtershow.controller;
public interface ParameterActionAndInt extends ParameterInteger {
static String sParameterType = "ParameterActionAndInt";
- public void fireAction();
+ public void fireLeftAction();
- public int getActionIcon();
+ public int getLeftIcon();
+
+ public void fireRightAction();
+
+ public int getRightIcon();
}