summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/Camera.java3
-rw-r--r--src/com/android/camera/VideoCamera.java3
-rw-r--r--src/com/android/camera/ui/CameraPicker.java8
-rw-r--r--src/com/android/camera/ui/IndicatorControlBarContainer.java5
-rw-r--r--src/com/android/camera/ui/IndicatorControlWheel.java3
5 files changed, 18 insertions, 4 deletions
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java
index d682480..a71954c 100644
--- a/src/com/android/camera/Camera.java
+++ b/src/com/android/camera/Camera.java
@@ -16,6 +16,7 @@
package com.android.camera;
+import com.android.camera.ui.CameraPicker;
import com.android.camera.ui.FaceView;
import com.android.camera.ui.FocusRectangle;
import com.android.camera.ui.IndicatorControl;
@@ -1102,6 +1103,8 @@ public class Camera extends ActivityBase implements FocusManager.Listener,
CameraSettings.KEY_FOCUS_MODE,
CameraSettings.KEY_EXPOSURE,
CameraSettings.KEY_PICTURE_SIZE};
+
+ CameraPicker.setImageResourceId(R.drawable.ic_switch_photo_facing_holo_light);
mIndicatorControl.initialize(this, mPreferenceGroup,
CameraSettings.KEY_FLASH_MODE, SETTING_KEYS, OTHER_SETTING_KEYS);
mIndicatorControl.setListener(this);
diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java
index 0634c40..744357a 100644
--- a/src/com/android/camera/VideoCamera.java
+++ b/src/com/android/camera/VideoCamera.java
@@ -16,6 +16,7 @@
package com.android.camera;
+import com.android.camera.ui.CameraPicker;
import com.android.camera.ui.IndicatorControl;
import com.android.camera.ui.IndicatorControlWheelContainer;
import com.android.camera.ui.RotateImageView;
@@ -473,6 +474,8 @@ public class VideoCamera extends ActivityBase
CameraSettings.KEY_VIDEO_QUALITY};
final String[] OTHER_SETTING_KEYS = {
CameraSettings.KEY_VIDEO_TIME_LAPSE_FRAME_INTERVAL};
+
+ CameraPicker.setImageResourceId(R.drawable.ic_switch_video_facing_holo_light);
mIndicatorControl.initialize(this, mPreferenceGroup,
CameraSettings.KEY_VIDEOCAMERA_FLASH_MODE,
SETTING_KEYS, OTHER_SETTING_KEYS);
diff --git a/src/com/android/camera/ui/CameraPicker.java b/src/com/android/camera/ui/CameraPicker.java
index 6bdfe43..8b4596a 100644
--- a/src/com/android/camera/ui/CameraPicker.java
+++ b/src/com/android/camera/ui/CameraPicker.java
@@ -29,6 +29,8 @@ import android.widget.ImageView;
* A view for switching the front/back camera.
*/
public class CameraPicker extends RotateImageView implements View.OnClickListener {
+ private static int mImageResource;
+
private OnPreferenceChangedListener mListener;
private ListPreference mPreference;
private CharSequence[] mCameras;
@@ -36,7 +38,11 @@ public class CameraPicker extends RotateImageView implements View.OnClickListene
public CameraPicker(Context context) {
super(context);
- setImageResource(R.drawable.ic_switch_camera_facing_holo_light);
+ setImageResource(mImageResource);
+ }
+
+ public static void setImageResourceId(int imageResource) {
+ mImageResource = imageResource;
}
public void setListener(OnPreferenceChangedListener listener) {
diff --git a/src/com/android/camera/ui/IndicatorControlBarContainer.java b/src/com/android/camera/ui/IndicatorControlBarContainer.java
index 311615b..3695d56 100644
--- a/src/com/android/camera/ui/IndicatorControlBarContainer.java
+++ b/src/com/android/camera/ui/IndicatorControlBarContainer.java
@@ -47,15 +47,14 @@ public class IndicatorControlBarContainer extends IndicatorControl implements
public void initialize(Context context, PreferenceGroup group,
String flashSetting, String[] secondLevelKeys,
String[] secondLevelOtherSettingKeys) {
- mIndicatorControlBar = (IndicatorControlBar)
- findViewById(R.id.indicator_bar);
-
mZoomControlBar = (ZoomControlBar)
findViewById(R.id.zoom_control);
mZoomControlBar.setOnIndicatorEventListener(this);
// We need to show/hide the zoom slider icon accordingly.
// From UI spec, we have camera_flash setting on the first level.
+ mIndicatorControlBar = (IndicatorControlBar)
+ findViewById(R.id.indicator_bar);
mIndicatorControlBar.initialize(context, group, flashSetting,
mZoomControlBar.isZoomSupported());
mIndicatorControlBar.setOnIndicatorEventListener(this);
diff --git a/src/com/android/camera/ui/IndicatorControlWheel.java b/src/com/android/camera/ui/IndicatorControlWheel.java
index 20f4b9b..e432f6d 100644
--- a/src/com/android/camera/ui/IndicatorControlWheel.java
+++ b/src/com/android/camera/ui/IndicatorControlWheel.java
@@ -155,7 +155,10 @@ public class IndicatorControlWheel extends IndicatorControl implements
// Add first-level controls.
super.initialize(context, group, new String[] {flashSetting}, null);
+
+ // Add CameraPicker control.
initializeCameraPicker();
+
// Add second-level Indicator Icon.
mSecondLevelIcon = addImageButton(context, R.drawable.ic_settings_holo_light, true);
mSecondLevelStartIndex = getChildCount();