summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/filtershow/controller
diff options
context:
space:
mode:
authorJohn Hoford <hoford@google.com>2013-04-24 13:21:17 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-04-24 13:21:17 -0700
commitb83e36df79a9bc3fadc9baa152dfa1608c214bdd (patch)
treeaa2a97dfea413b8349422e01558a658f10b73075 /src/com/android/gallery3d/filtershow/controller
parent0630dcde223db78f0b474bca451e27e1791adf29 (diff)
parentdcd31fe8f7bc219b4e8f7608a6d5ad016da0f885 (diff)
downloadandroid_packages_apps_Snap-b83e36df79a9bc3fadc9baa152dfa1608c214bdd.tar.gz
android_packages_apps_Snap-b83e36df79a9bc3fadc9baa152dfa1608c214bdd.tar.bz2
android_packages_apps_Snap-b83e36df79a9bc3fadc9baa152dfa1608c214bdd.zip
am dc464a12: Merge "Fix local adjust" into gb-ub-photos-bryce
* commit 'dc464a129bad2a2918531fc8a4415c41b60605e6': Fix local adjust
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/ParameterActionAndInt.java8
2 files changed, 28 insertions, 9 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/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();
}