summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHung-ying Tyan <tyanh@google.com>2010-12-14 23:33:27 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-12-14 23:33:27 -0800
commit2a6febcc11326a6275a24cac9523e81cdc316a42 (patch)
tree25723fe7687350cff0237a7dbb10146b822956e4 /src
parentddf09d13c8e0f6756d1a5eadb971885131343a75 (diff)
parentb28ff297859deeacd9b70c0bb0299862a8606cbc (diff)
downloadLegacyCamera-2a6febcc11326a6275a24cac9523e81cdc316a42.zip
LegacyCamera-2a6febcc11326a6275a24cac9523e81cdc316a42.tar.gz
LegacyCamera-2a6febcc11326a6275a24cac9523e81cdc316a42.tar.bz2
Merge "Disable focus, flash, white-balance in scene mode."
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/ui/InLineSettingPicker.java9
-rw-r--r--src/com/android/camera/ui/IndicatorWheel.java15
2 files changed, 14 insertions, 10 deletions
diff --git a/src/com/android/camera/ui/InLineSettingPicker.java b/src/com/android/camera/ui/InLineSettingPicker.java
index 11f1a78..adc0e89 100644
--- a/src/com/android/camera/ui/InLineSettingPicker.java
+++ b/src/com/android/camera/ui/InLineSettingPicker.java
@@ -151,6 +151,9 @@ public class InLineSettingPicker extends LinearLayout {
private void updateView() {
if (mOverrideValue == null) {
mEntry.setText(mPreference.getEntry());
+ mNextButton.setVisibility(mIndex == 0 ? View.INVISIBLE : View.VISIBLE);
+ mPrevButton.setVisibility(mIndex == mPreference.getEntryValues().length - 1
+ ? View.INVISIBLE : View.VISIBLE);
} else {
int index = mPreference.findIndexOfValue(mOverrideValue);
if (index != -1) {
@@ -160,11 +163,9 @@ public class InLineSettingPicker extends LinearLayout {
Log.e(TAG, "Fail to find override value=" + mOverrideValue);
mPreference.print();
}
+ mNextButton.setVisibility(View.INVISIBLE);
+ mPrevButton.setVisibility(View.INVISIBLE);
}
-
- mNextButton.setVisibility(mIndex == 0 ? View.INVISIBLE : View.VISIBLE);
- mPrevButton.setVisibility(mIndex == mPreference.getEntryValues().length - 1
- ? View.INVISIBLE : View.VISIBLE);
}
public void setSettingChangedListener(Listener listener) {
diff --git a/src/com/android/camera/ui/IndicatorWheel.java b/src/com/android/camera/ui/IndicatorWheel.java
index 7012925..7bb38a8 100644
--- a/src/com/android/camera/ui/IndicatorWheel.java
+++ b/src/com/android/camera/ui/IndicatorWheel.java
@@ -270,6 +270,7 @@ public class IndicatorWheel extends ViewGroup {
IndicatorButton indicator = (IndicatorButton) v;
if (key.equals(indicator.getKey())) {
indicator.overrideSettings(value);
+ setEnabled(indicator, (value == null));
}
}
}
@@ -290,14 +291,16 @@ public class IndicatorWheel extends ViewGroup {
public void setEnabled(boolean enabled) {
super.setEnabled(enabled);
int count = getChildCount();
+ for (int i = 1; i < count; i++) {
+ setEnabled((ImageView) getChildAt(i), enabled);
+ }
+ }
+
+ private void setEnabled(ImageView view, boolean enabled) {
if (enabled) {
- for (int i = 1; i < count; i++) {
- ((ImageView) getChildAt(i)).clearColorFilter();
- }
+ view.clearColorFilter();
} else {
- for (int i = 1; i < count; i++) {
- ((ImageView) getChildAt(i)).setColorFilter(DISABLED_COLOR);
- }
+ view.setColorFilter(DISABLED_COLOR);
}
}
}