diff options
Diffstat (limited to 'src/com')
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; + } } |