summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authornicolasroard <nicolasroard@google.com>2013-03-25 21:08:47 -0700
committernicolasroard <nicolasroard@google.com>2013-03-25 21:08:47 -0700
commit175fc2198c8ff313fa90f0c37d09d80fa0c604cb (patch)
treebad8fff991a3a9fff182b29044455df3609feb73 /src
parent8737bd93a989cc5608065b13f0682f60a6e18e27 (diff)
downloadandroid_packages_apps_Snap-175fc2198c8ff313fa90f0c37d09d80fa0c604cb.tar.gz
android_packages_apps_Snap-175fc2198c8ff313fa90f0c37d09d80fa0c604cb.tar.bz2
android_packages_apps_Snap-175fc2198c8ff313fa90f0c37d09d80fa0c604cb.zip
Hides seekbar in some editors
Change-Id: Ifce385f9a6bf9b741f0873f49d826fbcf453d97c
Diffstat (limited to 'src')
-rw-r--r--src/com/android/gallery3d/filtershow/editors/Editor.java11
-rw-r--r--src/com/android/gallery3d/filtershow/editors/EditorCrop.java6
-rw-r--r--src/com/android/gallery3d/filtershow/editors/EditorCurves.java6
-rw-r--r--src/com/android/gallery3d/filtershow/editors/EditorDraw.java5
-rw-r--r--src/com/android/gallery3d/filtershow/editors/EditorFlip.java5
-rw-r--r--src/com/android/gallery3d/filtershow/editors/EditorRedEye.java5
-rw-r--r--src/com/android/gallery3d/filtershow/editors/EditorRotate.java5
-rw-r--r--src/com/android/gallery3d/filtershow/editors/EditorStraighten.java5
8 files changed, 47 insertions, 1 deletions
diff --git a/src/com/android/gallery3d/filtershow/editors/Editor.java b/src/com/android/gallery3d/filtershow/editors/Editor.java
index 3fd44b6fd..af974b910 100644
--- a/src/com/android/gallery3d/filtershow/editors/Editor.java
+++ b/src/com/android/gallery3d/filtershow/editors/Editor.java
@@ -81,13 +81,22 @@ public class Editor implements OnSeekBarChangeListener {
return mShowParameter;
}
+ public boolean showsSeekBar() {
+ return true;
+ }
+
/**
* @param actionButton the would be the area for menu etc
* @param editControl this is the black area for sliders etc
*/
public void setUtilityPanelUI(View actionButton, View editControl) {
mSeekBar = (SeekBar) editControl.findViewById(R.id.primarySeekBar);
- mSeekBar.setOnSeekBarChangeListener(this);
+ if (showsSeekBar()) {
+ mSeekBar.setOnSeekBarChangeListener(this);
+ mSeekBar.setVisibility(View.VISIBLE);
+ } else {
+ mSeekBar.setVisibility(View.INVISIBLE);
+ }
}
@Override
diff --git a/src/com/android/gallery3d/filtershow/editors/EditorCrop.java b/src/com/android/gallery3d/filtershow/editors/EditorCrop.java
index 947fccb82..df922f10a 100644
--- a/src/com/android/gallery3d/filtershow/editors/EditorCrop.java
+++ b/src/com/android/gallery3d/filtershow/editors/EditorCrop.java
@@ -17,6 +17,7 @@
package com.android.gallery3d.filtershow.editors;
import android.content.Context;
+import android.view.View;
import android.widget.FrameLayout;
import com.android.gallery3d.R;
@@ -61,6 +62,11 @@ public class EditorCrop extends Editor implements EditorInfo {
}
@Override
+ public boolean showsSeekBar() {
+ return false;
+ }
+
+ @Override
public int getTextId() {
return R.string.crop;
}
diff --git a/src/com/android/gallery3d/filtershow/editors/EditorCurves.java b/src/com/android/gallery3d/filtershow/editors/EditorCurves.java
index be35b9723..d84d9fc8d 100644
--- a/src/com/android/gallery3d/filtershow/editors/EditorCurves.java
+++ b/src/com/android/gallery3d/filtershow/editors/EditorCurves.java
@@ -17,6 +17,7 @@
package com.android.gallery3d.filtershow.editors;
import android.content.Context;
+import android.view.View;
import android.widget.FrameLayout;
import com.android.gallery3d.R;
@@ -48,4 +49,9 @@ public class EditorCurves extends Editor {
mImageCurves.setFilterDrawRepresentation(drawRep);
}
}
+
+ @Override
+ public boolean showsSeekBar() {
+ return false;
+ }
}
diff --git a/src/com/android/gallery3d/filtershow/editors/EditorDraw.java b/src/com/android/gallery3d/filtershow/editors/EditorDraw.java
index 1cc8aa2a3..4b09051e2 100644
--- a/src/com/android/gallery3d/filtershow/editors/EditorDraw.java
+++ b/src/com/android/gallery3d/filtershow/editors/EditorDraw.java
@@ -78,6 +78,11 @@ public class EditorDraw extends Editor {
});
}
+ @Override
+ public boolean showsSeekBar() {
+ return false;
+ }
+
private void showPopupMenu(LinearLayout accessoryViewList) {
final Button button = (Button) accessoryViewList.findViewById(
R.id.applyEffect);
diff --git a/src/com/android/gallery3d/filtershow/editors/EditorFlip.java b/src/com/android/gallery3d/filtershow/editors/EditorFlip.java
index 94ab2ee29..6642ce0c3 100644
--- a/src/com/android/gallery3d/filtershow/editors/EditorFlip.java
+++ b/src/com/android/gallery3d/filtershow/editors/EditorFlip.java
@@ -57,4 +57,9 @@ public class EditorFlip extends Editor implements EditorInfo {
public boolean getOverlayOnly() {
return true;
}
+
+ @Override
+ public boolean showsSeekBar() {
+ return false;
+ }
}
diff --git a/src/com/android/gallery3d/filtershow/editors/EditorRedEye.java b/src/com/android/gallery3d/filtershow/editors/EditorRedEye.java
index 8e9e705d7..b0e88dd44 100644
--- a/src/com/android/gallery3d/filtershow/editors/EditorRedEye.java
+++ b/src/com/android/gallery3d/filtershow/editors/EditorRedEye.java
@@ -57,4 +57,9 @@ public class EditorRedEye extends Editor {
mImageRedEyes.setRepresentation(redEyeRep);
}
}
+
+ @Override
+ public boolean showsSeekBar() {
+ return false;
+ }
}
diff --git a/src/com/android/gallery3d/filtershow/editors/EditorRotate.java b/src/com/android/gallery3d/filtershow/editors/EditorRotate.java
index 0032399a3..6bf195394 100644
--- a/src/com/android/gallery3d/filtershow/editors/EditorRotate.java
+++ b/src/com/android/gallery3d/filtershow/editors/EditorRotate.java
@@ -57,4 +57,9 @@ public class EditorRotate extends Editor implements EditorInfo {
public boolean getOverlayOnly() {
return true;
}
+
+ @Override
+ public boolean showsSeekBar() {
+ return false;
+ }
}
diff --git a/src/com/android/gallery3d/filtershow/editors/EditorStraighten.java b/src/com/android/gallery3d/filtershow/editors/EditorStraighten.java
index 2dbab7ab9..5b651292b 100644
--- a/src/com/android/gallery3d/filtershow/editors/EditorStraighten.java
+++ b/src/com/android/gallery3d/filtershow/editors/EditorStraighten.java
@@ -68,4 +68,9 @@ public class EditorStraighten extends Editor implements EditorInfo {
public boolean getOverlayOnly() {
return true;
}
+
+ @Override
+ public boolean showsSeekBar() {
+ return false;
+ }
}