summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/ui
diff options
context:
space:
mode:
authorHung-ying Tyan <tyanh@google.com>2010-12-20 14:54:03 +0800
committerHung-ying Tyan <tyanh@google.com>2010-12-20 17:01:42 +0800
commita25ee04fcb7be1a9aabc8bbccf044da70d4b5e88 (patch)
tree29d861d71a412ada62573e4079f3e081f259c293 /src/com/android/camera/ui
parent1afe2a1ff266f1ccd7fccf2c37e97d2136384896 (diff)
downloadLegacyCamera-a25ee04fcb7be1a9aabc8bbccf044da70d4b5e88.zip
LegacyCamera-a25ee04fcb7be1a9aabc8bbccf044da70d4b5e88.tar.gz
LegacyCamera-a25ee04fcb7be1a9aabc8bbccf044da70d4b5e88.tar.bz2
Update icons on the camera indicator ring.
No new icons for: ic_viewfinder_video_quality_high ic_viewfinder_video_quality_low ic_viewfinder_video_quality_youtube Copied from drawable-hdpi. Also, don't enable/disable an indicator if the state is not changed. This is so not to interfere with the highlight state. Bug: 3278636 Change-Id: Ie3355c28afeabfebf951624324df38fe855a7069
Diffstat (limited to 'src/com/android/camera/ui')
-rw-r--r--src/com/android/camera/ui/IndicatorWheel.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/com/android/camera/ui/IndicatorWheel.java b/src/com/android/camera/ui/IndicatorWheel.java
index 7221a9f..42090a5 100644
--- a/src/com/android/camera/ui/IndicatorWheel.java
+++ b/src/com/android/camera/ui/IndicatorWheel.java
@@ -277,6 +277,7 @@ public class IndicatorWheel extends ViewGroup {
if (key.equals(indicator.getKey())) {
indicator.overrideSettings(value);
setEnabled(indicator, (value == null));
+ break;
}
}
}
@@ -303,10 +304,15 @@ public class IndicatorWheel extends ViewGroup {
}
private void setEnabled(ImageView view, boolean enabled) {
- if (enabled) {
- view.clearColorFilter();
- } else {
- view.setColorFilter(DISABLED_COLOR);
+ // Don't do anything if state is not changed so not to interfere with
+ // the "highlight" state.
+ if (view.isEnabled() ^ enabled) {
+ view.setEnabled(enabled);
+ if (enabled) {
+ view.clearColorFilter();
+ } else {
+ view.setColorFilter(DISABLED_COLOR);
+ }
}
}
}