diff options
author | Cheng-Ru Lin <owenlin@google.com> | 2009-10-01 00:34:41 +0800 |
---|---|---|
committer | Cheng-Ru Lin <owenlin@google.com> | 2009-10-01 08:36:13 +0800 |
commit | 25156f0e1bb921d3d8f7f5cc51e141522533b502 (patch) | |
tree | 9676c3338317ea093dc4d480654d7000fe14bf41 | |
parent | b7c32e2f8ef5b9e2a77c2b942be0df0852090f22 (diff) | |
download | LegacyCamera-25156f0e1bb921d3d8f7f5cc51e141522533b502.zip LegacyCamera-25156f0e1bb921d3d8f7f5cc51e141522533b502.tar.gz LegacyCamera-25156f0e1bb921d3d8f7f5cc51e141522533b502.tar.bz2 |
Add indicator for focus, white balance, and scene mode.
Change-Id: Iead8a7a28aeaa07210fd56ecac1f6f6a74fee155
19 files changed, 37 insertions, 25 deletions
diff --git a/res/drawable-hdpi/ic_viewfinder_focus_infinity.png b/res/drawable-hdpi/ic_viewfinder_focus_infinity.png Binary files differindex bed0f59..82112fc 100644 --- a/res/drawable-hdpi/ic_viewfinder_focus_infinity.png +++ b/res/drawable-hdpi/ic_viewfinder_focus_infinity.png diff --git a/res/drawable-hdpi/ic_viewfinder_focus_macro.png b/res/drawable-hdpi/ic_viewfinder_focus_macro.png Binary files differindex 317d4a6..85d4a55 100644 --- a/res/drawable-hdpi/ic_viewfinder_focus_macro.png +++ b/res/drawable-hdpi/ic_viewfinder_focus_macro.png diff --git a/res/drawable-hdpi/ic_viewfinder_scenemode.png b/res/drawable-hdpi/ic_viewfinder_scenemode.png Binary files differnew file mode 100644 index 0000000..01752a6 --- /dev/null +++ b/res/drawable-hdpi/ic_viewfinder_scenemode.png diff --git a/res/drawable-hdpi/ic_viewfinder_wb_cloudy.png b/res/drawable-hdpi/ic_viewfinder_wb_cloudy.png Binary files differnew file mode 100644 index 0000000..9766f7b --- /dev/null +++ b/res/drawable-hdpi/ic_viewfinder_wb_cloudy.png diff --git a/res/drawable-hdpi/ic_viewfinder_wb_daylight.png b/res/drawable-hdpi/ic_viewfinder_wb_daylight.png Binary files differnew file mode 100644 index 0000000..3ecebe6 --- /dev/null +++ b/res/drawable-hdpi/ic_viewfinder_wb_daylight.png diff --git a/res/drawable-hdpi/ic_viewfinder_wb_fluorescent.png b/res/drawable-hdpi/ic_viewfinder_wb_fluorescent.png Binary files differnew file mode 100644 index 0000000..889f607 --- /dev/null +++ b/res/drawable-hdpi/ic_viewfinder_wb_fluorescent.png diff --git a/res/drawable-hdpi/ic_viewfinder_wb_incandescent.png b/res/drawable-hdpi/ic_viewfinder_wb_incandescent.png Binary files differnew file mode 100644 index 0000000..0fce7ce --- /dev/null +++ b/res/drawable-hdpi/ic_viewfinder_wb_incandescent.png diff --git a/res/drawable-hdpi/ic_viewfinder_whitebalance.png b/res/drawable-hdpi/ic_viewfinder_whitebalance.png Binary files differdeleted file mode 100644 index 0475dac..0000000 --- a/res/drawable-hdpi/ic_viewfinder_whitebalance.png +++ /dev/null diff --git a/res/drawable-mdpi/ic_viewfinder_focus_infinity.png b/res/drawable-mdpi/ic_viewfinder_focus_infinity.png Binary files differindex 3971df8..afa0902 100644 --- a/res/drawable-mdpi/ic_viewfinder_focus_infinity.png +++ b/res/drawable-mdpi/ic_viewfinder_focus_infinity.png diff --git a/res/drawable-mdpi/ic_viewfinder_focus_macro.png b/res/drawable-mdpi/ic_viewfinder_focus_macro.png Binary files differindex 10098fc..e5c560f 100644 --- a/res/drawable-mdpi/ic_viewfinder_focus_macro.png +++ b/res/drawable-mdpi/ic_viewfinder_focus_macro.png diff --git a/res/drawable-mdpi/ic_viewfinder_scenemode.png b/res/drawable-mdpi/ic_viewfinder_scenemode.png Binary files differnew file mode 100644 index 0000000..8484f9e --- /dev/null +++ b/res/drawable-mdpi/ic_viewfinder_scenemode.png diff --git a/res/drawable-mdpi/ic_viewfinder_wb_cloudy.png b/res/drawable-mdpi/ic_viewfinder_wb_cloudy.png Binary files differnew file mode 100644 index 0000000..2d02af3 --- /dev/null +++ b/res/drawable-mdpi/ic_viewfinder_wb_cloudy.png diff --git a/res/drawable-mdpi/ic_viewfinder_wb_daylight.png b/res/drawable-mdpi/ic_viewfinder_wb_daylight.png Binary files differnew file mode 100644 index 0000000..77e4a6e --- /dev/null +++ b/res/drawable-mdpi/ic_viewfinder_wb_daylight.png diff --git a/res/drawable-mdpi/ic_viewfinder_wb_fluorescent.png b/res/drawable-mdpi/ic_viewfinder_wb_fluorescent.png Binary files differnew file mode 100644 index 0000000..3a5f6ef --- /dev/null +++ b/res/drawable-mdpi/ic_viewfinder_wb_fluorescent.png diff --git a/res/drawable-mdpi/ic_viewfinder_wb_incandescent.png b/res/drawable-mdpi/ic_viewfinder_wb_incandescent.png Binary files differnew file mode 100644 index 0000000..cddb4a1 --- /dev/null +++ b/res/drawable-mdpi/ic_viewfinder_wb_incandescent.png diff --git a/res/drawable-mdpi/ic_viewfinder_whitebalance.png b/res/drawable-mdpi/ic_viewfinder_whitebalance.png Binary files differdeleted file mode 100644 index 2f85711..0000000 --- a/res/drawable-mdpi/ic_viewfinder_whitebalance.png +++ /dev/null diff --git a/res/layout/camera.xml b/res/layout/camera.xml index 8091891..8984a0c 100644 --- a/res/layout/camera.xml +++ b/res/layout/camera.xml @@ -66,12 +66,19 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/whitebalance_icon" - camera:modes="@array/whitebalance_modes" + camera:modes="@array/pref_camera_whitebalance_entryvalues" camera:icons="@array/whitebalance_icons" android:visibility="visible"/> <com.android.camera.IconIndicator android:layout_width="wrap_content" android:layout_height="wrap_content" + android:id="@+id/scenemode_icon" + camera:modes="@array/scenemode_modes" + camera:icons="@array/scenemode_icons" + android:visibility="visible"/> + <com.android.camera.IconIndicator + android:layout_width="wrap_content" + android:layout_height="wrap_content" android:id="@+id/flash_icon" camera:modes="@array/pref_camera_flashmode_entryvalues" camera:icons="@array/flash_icons" diff --git a/res/values/arrays.xml b/res/values/arrays.xml index bdbddef..41e8dfe 100644 --- a/res/values/arrays.xml +++ b/res/values/arrays.xml @@ -136,34 +136,24 @@ <item>@string/pref_camera_whitebalance_entry_daylight</item> <item>@string/pref_camera_whitebalance_entry_fluorescent</item> <item>@string/pref_camera_whitebalance_entry_cloudy</item> - <item>@string/pref_camera_whitebalance_entry_twilight</item> - <item>@string/pref_camera_whitebalance_entry_shade</item> - <item>@string/pref_camera_whitebalance_entry_warm_fluorescent</item> - <item>@string/pref_camera_whitebalance_entry_halogen</item> </string-array> - <string-array name="whitebalance_modes" translatable="false"> - <item>off</item> - <item>on</item> - </string-array> - - <array name="whitebalance_icons"> - <item>0</item> - <item>@drawable/ic_viewfinder_whitebalance</item> - </array> - <string-array name="pref_camera_whitebalance_entryvalues" translatable="false"> <item>auto</item> <item>incandescent</item> <item>daylight</item> <item>fluorescent</item> <item>cloudy</item> - <item>twilight</item> - <item>shade</item> - <item>warm-fluorescent</item> - <item>halogen</item> </string-array> + <array name="whitebalance_icons"> + <item>0</item> + <item>@drawable/ic_viewfinder_wb_incandescent</item> + <item>@drawable/ic_viewfinder_wb_daylight</item> + <item>@drawable/ic_viewfinder_wb_fluorescent</item> + <item>@drawable/ic_viewfinder_wb_cloudy</item> + </array> + <!-- Camera Preferences Color effect dialog box entries --> <string-array name="pref_camera_coloreffect_entries" translatable="false"> <item>@string/pref_camera_coloreffect_entry_none</item> @@ -229,4 +219,15 @@ <item>steadyphoto</item> <item>fireworks</item> </string-array> + + <string-array name="scenemode_modes" translatable="false"> + <item>off</item> + <item>on</item> + </string-array> + + <array name="scenemode_icons"> + <item>0</item> + <item>@drawable/ic_viewfinder_scenemode</item> + </array> + </resources> diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java index ae00df8..a7f40dd 100644 --- a/src/com/android/camera/Camera.java +++ b/src/com/android/camera/Camera.java @@ -99,8 +99,8 @@ public class Camera extends Activity implements View.OnClickListener, private static final int SCREEN_DELAY = 2 * 60 * 1000; private static final int FOCUS_BEEP_VOLUME = 100; - private static final String WHITE_BALANCE_ON = "on"; - private static final String WHITE_BALANCE_OFF = "off"; + private static final String SCENE_MODE_ON = "on"; + private static final String SCENE_MODE_OFF = "off"; private double mZoomValue; // The current zoom value. private double mZoomStep; @@ -144,6 +144,7 @@ public class Camera extends Activity implements View.OnClickListener, private IconIndicator mFlashIndicator; private IconIndicator mFocusIndicator; private IconIndicator mWhitebalanceIndicator; + private IconIndicator mSceneModeIndicator; private ToneGenerator mFocusToneGenerator; private ZoomButtonsController mZoomButtons; private GestureDetector mGestureDetector; @@ -926,6 +927,7 @@ public class Camera extends Activity implements View.OnClickListener, mFlashIndicator = (IconIndicator) findViewById(R.id.flash_icon); mFocusIndicator = (IconIndicator) findViewById(R.id.focus_icon); + mSceneModeIndicator = (IconIndicator) findViewById(R.id.scenemode_icon); mWhitebalanceIndicator = (IconIndicator) findViewById(R.id.whitebalance_icon); @@ -1726,16 +1728,18 @@ public class Camera extends Activity implements View.OnClickListener, // We post the runner because this function can be called from // non-UI thread (i.e., startPreviewThread). - final String finalWhiteBalance = - Parameters.WHITE_BALANCE_AUTO.equals(whiteBalance) - ? WHITE_BALANCE_OFF - : WHITE_BALANCE_ON; + final String finalWhiteBalance = whiteBalance; final String finalFlashMode = flashMode; + final String finalSceneMode = + Parameters.SCENE_MODE_AUTO.equals(whiteBalance) + ? SCENE_MODE_OFF + : SCENE_MODE_ON; mHandler.post(new Runnable() { public void run() { mFocusIndicator.setMode(mFocusMode); mWhitebalanceIndicator.setMode(finalWhiteBalance); + mSceneModeIndicator.setMode(finalSceneMode); mFlashIndicator.setMode(finalFlashMode); } }); |