diff options
author | nicolasroard <nicolasroard@google.com> | 2013-03-25 21:40:08 -0700 |
---|---|---|
committer | nicolasroard <nicolasroard@google.com> | 2013-03-25 21:40:08 -0700 |
commit | 88efa27609d08a749cda7ba928cb825de71a7f2b (patch) | |
tree | 1594d673a040ab77be4398d77916038750d76aeb /src/com/android/gallery3d/filtershow/editors | |
parent | 175fc2198c8ff313fa90f0c37d09d80fa0c604cb (diff) | |
download | android_packages_apps_Snap-88efa27609d08a749cda7ba928cb825de71a7f2b.tar.gz android_packages_apps_Snap-88efa27609d08a749cda7ba928cb825de71a7f2b.tar.bz2 android_packages_apps_Snap-88efa27609d08a749cda7ba928cb825de71a7f2b.zip |
Hides popup indicator on some editors
Change-Id: I88f17b9352c582f26f09a74db9d91e1fb81dbeae
Diffstat (limited to 'src/com/android/gallery3d/filtershow/editors')
4 files changed, 30 insertions, 4 deletions
diff --git a/src/com/android/gallery3d/filtershow/editors/Editor.java b/src/com/android/gallery3d/filtershow/editors/Editor.java index af974b910..69266fffd 100644 --- a/src/com/android/gallery3d/filtershow/editors/Editor.java +++ b/src/com/android/gallery3d/filtershow/editors/Editor.java @@ -17,15 +17,13 @@ package com.android.gallery3d.filtershow.editors; import android.content.Context; +import android.graphics.drawable.Drawable; import android.text.Html; import android.view.LayoutInflater; import android.view.Menu; import android.view.View; import android.view.ViewGroup; -import android.widget.FrameLayout; -import android.widget.LinearLayout; -import android.widget.PopupMenu; -import android.widget.SeekBar; +import android.widget.*; import android.widget.SeekBar.OnSeekBarChangeListener; import com.android.gallery3d.R; @@ -85,6 +83,10 @@ public class Editor implements OnSeekBarChangeListener { return true; } + public boolean showsPopupIndicator() { + return true; + } + /** * @param actionButton the would be the area for menu etc * @param editControl this is the black area for sliders etc @@ -97,6 +99,14 @@ public class Editor implements OnSeekBarChangeListener { } else { mSeekBar.setVisibility(View.INVISIBLE); } + Button button = (Button) actionButton.findViewById(R.id.applyEffect); + if (button != null) { + if (showsPopupIndicator()) { + button.setCompoundDrawablesRelativeWithIntrinsicBounds(0, 0, R.drawable.filtershow_menu_marker, 0); + } else { + button.setCompoundDrawablesRelativeWithIntrinsicBounds(0, 0, 0, 0); + } + } } @Override diff --git a/src/com/android/gallery3d/filtershow/editors/EditorFlip.java b/src/com/android/gallery3d/filtershow/editors/EditorFlip.java index 6642ce0c3..c996dcbe3 100644 --- a/src/com/android/gallery3d/filtershow/editors/EditorFlip.java +++ b/src/com/android/gallery3d/filtershow/editors/EditorFlip.java @@ -62,4 +62,9 @@ public class EditorFlip extends Editor implements EditorInfo { public boolean showsSeekBar() { return false; } + + @Override + public boolean showsPopupIndicator() { + return false; + } } diff --git a/src/com/android/gallery3d/filtershow/editors/EditorRotate.java b/src/com/android/gallery3d/filtershow/editors/EditorRotate.java index 6bf195394..e49555831 100644 --- a/src/com/android/gallery3d/filtershow/editors/EditorRotate.java +++ b/src/com/android/gallery3d/filtershow/editors/EditorRotate.java @@ -62,4 +62,9 @@ public class EditorRotate extends Editor implements EditorInfo { public boolean showsSeekBar() { return false; } + + @Override + public boolean showsPopupIndicator() { + return false; + } } diff --git a/src/com/android/gallery3d/filtershow/editors/EditorStraighten.java b/src/com/android/gallery3d/filtershow/editors/EditorStraighten.java index 5b651292b..3c0c01733 100644 --- a/src/com/android/gallery3d/filtershow/editors/EditorStraighten.java +++ b/src/com/android/gallery3d/filtershow/editors/EditorStraighten.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; @@ -73,4 +74,9 @@ public class EditorStraighten extends Editor implements EditorInfo { public boolean showsSeekBar() { return false; } + + @Override + public boolean showsPopupIndicator() { + return false; + } } |