summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/camera/ui')
-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
3 files changed, 12 insertions, 4 deletions
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();