diff options
author | Hung-ying Tyan <tyanh@google.com> | 2010-12-01 16:04:58 +0800 |
---|---|---|
committer | Hung-ying Tyan <tyanh@google.com> | 2010-12-01 16:10:34 +0800 |
commit | 1c62e1b83c2fdda82c726bf712324444136fdc5d (patch) | |
tree | d75a5cbcea03d057a0816dc5854b540ddfcad036 /src | |
parent | b6be7b78d2645c6e5a377b4d118ccaf28c6b10a2 (diff) | |
download | LegacyCamera-1c62e1b83c2fdda82c726bf712324444136fdc5d.zip LegacyCamera-1c62e1b83c2fdda82c726bf712324444136fdc5d.tar.gz LegacyCamera-1c62e1b83c2fdda82c726bf712324444136fdc5d.tar.bz2 |
Disable IndicatorWheel when ControlPanel is disabled.
Also removed "mEnabled" in ControlPanel as "enabled" is already a property in
the parent class (i.e., View).
Bug: 3242889
Change-Id: Ia035ed3eb068331f3d1b8184a51f2c1742710c12
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/camera/ui/ControlPanel.java | 8 | ||||
-rw-r--r-- | src/com/android/camera/ui/IndicatorWheel.java | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/com/android/camera/ui/ControlPanel.java b/src/com/android/camera/ui/ControlPanel.java index 5f20637..ed7d8fc 100644 --- a/src/com/android/camera/ui/ControlPanel.java +++ b/src/com/android/camera/ui/ControlPanel.java @@ -52,7 +52,6 @@ public class ControlPanel extends RelativeLayout private BasicSettingPopup[] mBasicSettingPopups; private OtherSettingsPopup mOtherSettingsPopup; private int mActiveIndicator = -1; - private boolean mEnabled = true; static public interface Listener { public void onSharedPreferenceChanged(); @@ -129,7 +128,7 @@ public class ControlPanel extends RelativeLayout } public void onIndicatorClicked(int index) { - if (!mEnabled) return; + if (!isEnabled()) return; if (index < mBasicSettingPopups.length) { if (mBasicSettingPopups[index] == null) { initializeSettingPopup(index); @@ -191,9 +190,10 @@ public class ControlPanel extends RelativeLayout return false; } + @Override public void setEnabled(boolean enabled) { - if (mEnabled == enabled) return; - mEnabled = enabled; + super.setEnabled(enabled); + mIndicatorWheel.setEnabled(enabled); } // Popup window is dismissed. diff --git a/src/com/android/camera/ui/IndicatorWheel.java b/src/com/android/camera/ui/IndicatorWheel.java index b80eea5..2dae7aa 100644 --- a/src/com/android/camera/ui/IndicatorWheel.java +++ b/src/com/android/camera/ui/IndicatorWheel.java @@ -88,6 +88,8 @@ public class IndicatorWheel extends ViewGroup { @Override public boolean onTouchEvent(MotionEvent event) { + if (!isEnabled()) return false; + int count = getChildCount(); if (mListener == null || count <= 1) return false; |