summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/drawable-hdpi/ic_hdr_off_disabled.pngbin0 -> 1258 bytes
-rw-r--r--res/drawable-hdpi/ic_hdr_off_indicator.pngbin0 -> 1187 bytes
-rw-r--r--res/drawable-hdpi/ic_hdr_off_normal.pngbin0 -> 1378 bytes
-rw-r--r--res/drawable-hdpi/ic_hdr_on_disabled.pngbin0 -> 962 bytes
-rw-r--r--res/drawable-hdpi/ic_hdr_on_indicator.pngbin0 -> 909 bytes
-rw-r--r--res/drawable-hdpi/ic_hdr_on_normal.pngbin0 -> 1156 bytes
-rw-r--r--res/drawable-mdpi/ic_hdr_off_disabled.pngbin0 -> 935 bytes
-rw-r--r--res/drawable-mdpi/ic_hdr_off_indicator.pngbin0 -> 872 bytes
-rw-r--r--res/drawable-mdpi/ic_hdr_off_normal.pngbin0 -> 1032 bytes
-rw-r--r--res/drawable-mdpi/ic_hdr_on_disabled.pngbin0 -> 746 bytes
-rw-r--r--res/drawable-mdpi/ic_hdr_on_indicator.pngbin0 -> 699 bytes
-rw-r--r--res/drawable-mdpi/ic_hdr_on_normal.pngbin0 -> 853 bytes
-rw-r--r--res/drawable-xhdpi/ic_hdr_off_disabled.pngbin0 -> 1664 bytes
-rw-r--r--res/drawable-xhdpi/ic_hdr_off_indicator.pngbin0 -> 1595 bytes
-rw-r--r--res/drawable-xhdpi/ic_hdr_off_normal.pngbin0 -> 1931 bytes
-rw-r--r--res/drawable-xhdpi/ic_hdr_on_disabled.pngbin0 -> 1262 bytes
-rw-r--r--res/drawable-xhdpi/ic_hdr_on_indicator.pngbin0 -> 1175 bytes
-rw-r--r--res/drawable-xhdpi/ic_hdr_on_normal.pngbin0 -> 1548 bytes
-rw-r--r--res/drawable-xxhdpi/ic_hdr_off_disabled.pngbin0 -> 2122 bytes
-rw-r--r--res/drawable-xxhdpi/ic_hdr_off_indicator.pngbin0 -> 2042 bytes
-rw-r--r--res/drawable-xxhdpi/ic_hdr_off_normal.pngbin0 -> 2154 bytes
-rw-r--r--res/drawable-xxhdpi/ic_hdr_on_disabled.pngbin0 -> 1843 bytes
-rw-r--r--res/drawable-xxhdpi/ic_hdr_on_indicator.pngbin0 -> 1767 bytes
-rw-r--r--res/drawable-xxhdpi/ic_hdr_on_normal.pngbin0 -> 1942 bytes
-rw-r--r--res/drawable/ic_hdr_off.xml53
-rw-r--r--res/drawable/ic_hdr_on.xml53
-rw-r--r--res/values/arrays.xml10
-rw-r--r--src/com/android/camera/ButtonManager.java3
-rw-r--r--src/com/android/camera/widget/IndicatorIconController.java16
29 files changed, 131 insertions, 4 deletions
diff --git a/res/drawable-hdpi/ic_hdr_off_disabled.png b/res/drawable-hdpi/ic_hdr_off_disabled.png
new file mode 100644
index 000000000..8cd4956e3
--- /dev/null
+++ b/res/drawable-hdpi/ic_hdr_off_disabled.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_hdr_off_indicator.png b/res/drawable-hdpi/ic_hdr_off_indicator.png
new file mode 100644
index 000000000..c5c535dc9
--- /dev/null
+++ b/res/drawable-hdpi/ic_hdr_off_indicator.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_hdr_off_normal.png b/res/drawable-hdpi/ic_hdr_off_normal.png
new file mode 100644
index 000000000..06cb2c4bc
--- /dev/null
+++ b/res/drawable-hdpi/ic_hdr_off_normal.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_hdr_on_disabled.png b/res/drawable-hdpi/ic_hdr_on_disabled.png
new file mode 100644
index 000000000..4ca89195f
--- /dev/null
+++ b/res/drawable-hdpi/ic_hdr_on_disabled.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_hdr_on_indicator.png b/res/drawable-hdpi/ic_hdr_on_indicator.png
new file mode 100644
index 000000000..8b682bda1
--- /dev/null
+++ b/res/drawable-hdpi/ic_hdr_on_indicator.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_hdr_on_normal.png b/res/drawable-hdpi/ic_hdr_on_normal.png
new file mode 100644
index 000000000..d5c56e86c
--- /dev/null
+++ b/res/drawable-hdpi/ic_hdr_on_normal.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_hdr_off_disabled.png b/res/drawable-mdpi/ic_hdr_off_disabled.png
new file mode 100644
index 000000000..6305f34ae
--- /dev/null
+++ b/res/drawable-mdpi/ic_hdr_off_disabled.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_hdr_off_indicator.png b/res/drawable-mdpi/ic_hdr_off_indicator.png
new file mode 100644
index 000000000..61e775c3e
--- /dev/null
+++ b/res/drawable-mdpi/ic_hdr_off_indicator.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_hdr_off_normal.png b/res/drawable-mdpi/ic_hdr_off_normal.png
new file mode 100644
index 000000000..541002e94
--- /dev/null
+++ b/res/drawable-mdpi/ic_hdr_off_normal.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_hdr_on_disabled.png b/res/drawable-mdpi/ic_hdr_on_disabled.png
new file mode 100644
index 000000000..ee1a87775
--- /dev/null
+++ b/res/drawable-mdpi/ic_hdr_on_disabled.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_hdr_on_indicator.png b/res/drawable-mdpi/ic_hdr_on_indicator.png
new file mode 100644
index 000000000..ed8934645
--- /dev/null
+++ b/res/drawable-mdpi/ic_hdr_on_indicator.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_hdr_on_normal.png b/res/drawable-mdpi/ic_hdr_on_normal.png
new file mode 100644
index 000000000..c911e40f1
--- /dev/null
+++ b/res/drawable-mdpi/ic_hdr_on_normal.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_hdr_off_disabled.png b/res/drawable-xhdpi/ic_hdr_off_disabled.png
new file mode 100644
index 000000000..61e616cd0
--- /dev/null
+++ b/res/drawable-xhdpi/ic_hdr_off_disabled.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_hdr_off_indicator.png b/res/drawable-xhdpi/ic_hdr_off_indicator.png
new file mode 100644
index 000000000..637bfcb31
--- /dev/null
+++ b/res/drawable-xhdpi/ic_hdr_off_indicator.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_hdr_off_normal.png b/res/drawable-xhdpi/ic_hdr_off_normal.png
new file mode 100644
index 000000000..ac26067a8
--- /dev/null
+++ b/res/drawable-xhdpi/ic_hdr_off_normal.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_hdr_on_disabled.png b/res/drawable-xhdpi/ic_hdr_on_disabled.png
new file mode 100644
index 000000000..fcc79113e
--- /dev/null
+++ b/res/drawable-xhdpi/ic_hdr_on_disabled.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_hdr_on_indicator.png b/res/drawable-xhdpi/ic_hdr_on_indicator.png
new file mode 100644
index 000000000..74ae13f49
--- /dev/null
+++ b/res/drawable-xhdpi/ic_hdr_on_indicator.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_hdr_on_normal.png b/res/drawable-xhdpi/ic_hdr_on_normal.png
new file mode 100644
index 000000000..cb3ae4130
--- /dev/null
+++ b/res/drawable-xhdpi/ic_hdr_on_normal.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_hdr_off_disabled.png b/res/drawable-xxhdpi/ic_hdr_off_disabled.png
new file mode 100644
index 000000000..f29ab46e3
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_hdr_off_disabled.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_hdr_off_indicator.png b/res/drawable-xxhdpi/ic_hdr_off_indicator.png
new file mode 100644
index 000000000..1204315c1
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_hdr_off_indicator.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_hdr_off_normal.png b/res/drawable-xxhdpi/ic_hdr_off_normal.png
new file mode 100644
index 000000000..227d17377
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_hdr_off_normal.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_hdr_on_disabled.png b/res/drawable-xxhdpi/ic_hdr_on_disabled.png
new file mode 100644
index 000000000..0abd17ad5
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_hdr_on_disabled.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_hdr_on_indicator.png b/res/drawable-xxhdpi/ic_hdr_on_indicator.png
new file mode 100644
index 000000000..b24734354
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_hdr_on_indicator.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_hdr_on_normal.png b/res/drawable-xxhdpi/ic_hdr_on_normal.png
new file mode 100644
index 000000000..879e53d36
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_hdr_on_normal.png
Binary files differ
diff --git a/res/drawable/ic_hdr_off.xml b/res/drawable/ic_hdr_off.xml
new file mode 100644
index 000000000..0c6e54475
--- /dev/null
+++ b/res/drawable/ic_hdr_off.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:constantSize="true">
+ <item android:state_enabled="false">
+ <bitmap
+ android:gravity="center"
+ android:src="@drawable/ic_hdr_off_disabled" />
+ </item>
+ <item android:state_pressed="true">
+ <level-list>
+ <item android:maxLevel="0">
+ <layer-list>
+ <item android:drawable="@drawable/button_background_pressed_light" />
+ <item>
+ <bitmap
+ android:gravity="center"
+ android:src="@drawable/ic_hdr_off_normal" />
+ </item>
+ </layer-list>
+ </item>
+ <item android:maxLevel="1">
+ <layer-list>
+ <item android:drawable="@drawable/button_background_pressed_dark" />
+ <item>
+ <bitmap
+ android:gravity="center"
+ android:src="@drawable/ic_hdr_off_normal" />
+ </item>
+ </layer-list>
+ </item>
+ </level-list>
+ </item>
+ <item>
+ <bitmap
+ android:gravity="center"
+ android:src="@drawable/ic_hdr_off_normal" />
+ </item>
+</selector>
diff --git a/res/drawable/ic_hdr_on.xml b/res/drawable/ic_hdr_on.xml
new file mode 100644
index 000000000..2623a2214
--- /dev/null
+++ b/res/drawable/ic_hdr_on.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:constantSize="true">
+ <item android:state_enabled="false">
+ <bitmap
+ android:gravity="center"
+ android:src="@drawable/ic_hdr_on_disabled" />
+ </item>
+ <item android:state_pressed="true">
+ <level-list>
+ <item android:maxLevel="0">
+ <layer-list>
+ <item android:drawable="@drawable/button_background_pressed_light" />
+ <item>
+ <bitmap
+ android:gravity="center"
+ android:src="@drawable/ic_hdr_on_normal" />
+ </item>
+ </layer-list>
+ </item>
+ <item android:maxLevel="1">
+ <layer-list>
+ <item android:drawable="@drawable/button_background_pressed_dark" />
+ <item>
+ <bitmap
+ android:gravity="center"
+ android:src="@drawable/ic_hdr_on_normal" />
+ </item>
+ </layer-list>
+ </item>
+ </level-list>
+ </item>
+ <item>
+ <bitmap
+ android:gravity="center"
+ android:src="@drawable/ic_hdr_on_normal" />
+ </item>
+</selector>
diff --git a/res/values/arrays.xml b/res/values/arrays.xml
index b57698ed8..d133bfc69 100644
--- a/res/values/arrays.xml
+++ b/res/values/arrays.xml
@@ -470,11 +470,21 @@
<item>@drawable/ic_hdr_plus_on</item>
</array>
+ <array name="pref_camera_hdr_icons" translatable="false">
+ <item>@drawable/ic_hdr_off</item>
+ <item>@drawable/ic_hdr_on</item>
+ </array>
+
<array name="pref_camera_hdr_plus_indicator_icons" translatable="false">
<item>@drawable/ic_hdr_plus_off_indicator</item>
<item>@drawable/ic_hdr_plus_on_indicator</item>
</array>
+ <array name="pref_camera_hdr_indicator_icons" translatable="false">
+ <item>@drawable/ic_hdr_off_indicator</item>
+ <item>@drawable/ic_hdr_on_indicator</item>
+ </array>
+
<string-array name="pref_camera_hdr_plus_entryvalues" translatable="false">
<item>@string/setting_off_value</item>
<item>@string/setting_on_value</item>
diff --git a/src/com/android/camera/ButtonManager.java b/src/com/android/camera/ButtonManager.java
index 4f2979b67..7cf909c9b 100644
--- a/src/com/android/camera/ButtonManager.java
+++ b/src/com/android/camera/ButtonManager.java
@@ -300,8 +300,7 @@ public class ButtonManager implements SettingsManager.OnSettingChangedListener {
enableHdrPlusButton(button, cb, R.array.pref_camera_hdr_plus_icons);
break;
case BUTTON_HDR:
- // TODO: enableHdrButton
- enableHdrPlusButton(button, cb, R.array.pref_camera_hdr_plus_icons);
+ enableHdrPlusButton(button, cb, R.array.pref_camera_hdr_icons);
break;
case BUTTON_REFOCUS:
enableRefocusButton(button, cb, R.array.refocus_icons);
diff --git a/src/com/android/camera/widget/IndicatorIconController.java b/src/com/android/camera/widget/IndicatorIconController.java
index 071cbe928..a3cf9f51d 100644
--- a/src/com/android/camera/widget/IndicatorIconController.java
+++ b/src/com/android/camera/widget/IndicatorIconController.java
@@ -52,6 +52,7 @@ public class IndicatorIconController
private TypedArray mFlashIndicatorPhotoIcons;
private TypedArray mFlashIndicatorVideoIcons;
+ private TypedArray mHdrPlusIndicatorIcons;
private TypedArray mHdrIndicatorIcons;
private TypedArray mRefocusIndicatorIcons;
private TypedArray mPanoramaIndicatorIcons;
@@ -71,8 +72,10 @@ public class IndicatorIconController
R.array.camera_flashmode_indicator_icons);
mFlashIndicatorVideoIcons = context.getResources().obtainTypedArray(
R.array.video_flashmode_indicator_icons);
- mHdrIndicatorIcons = context.getResources().obtainTypedArray(
+ mHdrPlusIndicatorIcons = context.getResources().obtainTypedArray(
R.array.pref_camera_hdr_plus_indicator_icons);
+ mHdrIndicatorIcons = context.getResources().obtainTypedArray(
+ R.array.pref_camera_hdr_indicator_icons);
mRefocusIndicatorIcons = context.getResources().obtainTypedArray(
R.array.refocus_indicator_icons);
mPanoramaIndicatorIcons = context.getResources().obtainTypedArray(
@@ -107,6 +110,10 @@ public class IndicatorIconController
syncHdrIndicator();
break;
}
+ case ButtonManager.BUTTON_HDR: {
+ syncHdrIndicator();
+ break;
+ }
case ButtonManager.BUTTON_REFOCUS: {
syncRefocusIndicator();
break;
@@ -163,7 +170,7 @@ public class IndicatorIconController
}
/**
- * Sync the icon and the visibility of the hdr indicator.
+ * Sync the icon and the visibility of the hdr/hdrplus indicator.
*/
private void syncHdrIndicator() {
ButtonManager buttonManager = mController.getButtonManager();
@@ -173,6 +180,11 @@ public class IndicatorIconController
&& buttonManager.isVisible(ButtonManager.BUTTON_HDRPLUS)) {
setIndicatorState(mController.getSettingsManager(),
SettingsManager.SETTING_CAMERA_HDR,
+ mHdrIndicator, mHdrPlusIndicatorIcons, false);
+ } else if (buttonManager.isEnabled(ButtonManager.BUTTON_HDR)
+ && buttonManager.isVisible(ButtonManager.BUTTON_HDR)) {
+ setIndicatorState(mController.getSettingsManager(),
+ SettingsManager.SETTING_CAMERA_HDR,
mHdrIndicator, mHdrIndicatorIcons, false);
} else {
mHdrIndicator.setVisibility(View.GONE);