summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/VideoCamera.java
diff options
context:
space:
mode:
authorHung-ying Tyan <tyanh@google.com>2010-11-18 17:59:58 +0800
committerHung-ying Tyan <tyanh@google.com>2010-11-24 17:37:14 +0800
commiteb1f0c8299d96bad9bb449ff9e13eff4b43272cc (patch)
treea8f78fb4623b5c89eb3af56fb2b695e2f574f6cf /src/com/android/camera/VideoCamera.java
parent677c81c916b4105131b395399b0a91d5eeb82935 (diff)
downloadLegacyCamera-eb1f0c8299d96bad9bb449ff9e13eff4b43272cc.zip
LegacyCamera-eb1f0c8299d96bad9bb449ff9e13eff4b43272cc.tar.gz
LegacyCamera-eb1f0c8299d96bad9bb449ff9e13eff4b43272cc.tar.bz2
Highlight camera/video icon when mode is changed.
+ Make camera/video icons on switcher radio buttons instead of RotateImageView for x-large devices. + Add icons for camera and video on different states (normal and checked) for x-large devices. + Add SwitcherSet.java that consists of the radio buttons and the Switcher and replace the camera_switch_set linear layout with it. + Replace Switcher with SwitcherSet in Camera and VideoCamera. Bug: 3156677 Change-Id: I1ea7b4d4149d0a8dc548086150a9ae1a616cd8de
Diffstat (limited to 'src/com/android/camera/VideoCamera.java')
-rw-r--r--src/com/android/camera/VideoCamera.java19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java
index c4ab942..7ff6bec 100644
--- a/src/com/android/camera/VideoCamera.java
+++ b/src/com/android/camera/VideoCamera.java
@@ -187,7 +187,7 @@ public class VideoCamera extends NoSearchActivity
private ShutterButton mShutterButton;
private TextView mRecordingTimeView, mTimeLapseRecordingTimeView;
- private Switcher mSwitcher;
+ private SwitcherSet mSwitcher;
private boolean mRecordingTimeCountsDown = false;
private final ArrayList<MenuItem> mGalleryItems = new ArrayList<MenuItem>();
@@ -353,9 +353,8 @@ public class VideoCamera extends NoSearchActivity
setContentView(R.layout.video_camera);
initThumbnailButton();
- mSwitcher = ((Switcher) findViewById(R.id.camera_switch));
+ mSwitcher = (SwitcherSet) findViewById(R.id.camera_switch);
mSwitcher.setOnSwitchListener(this);
- mSwitcher.addTouchView(findViewById(R.id.camera_switch_set));
}
mPreviewFrameLayout = (PreviewFrameLayout)
@@ -517,14 +516,14 @@ public class VideoCamera extends NoSearchActivity
}
private void setOrientationIndicator(int degree) {
- RotateImageView thumbnail = (RotateImageView) findViewById(
+ RotateImageView icon = (RotateImageView) findViewById(
R.id.review_thumbnail);
- if (thumbnail != null) thumbnail.setDegree(degree);
+ if (icon != null) icon.setDegree(degree);
- ((RotateImageView) findViewById(
- R.id.camera_switch_icon)).setDegree(degree);
- ((RotateImageView) findViewById(
- R.id.video_switch_icon)).setDegree(degree);
+ icon = (RotateImageView) findViewById(R.id.camera_switch_icon);
+ if (icon != null) icon.setDegree(degree);
+ icon = (RotateImageView) findViewById(R.id.video_switch_icon);
+ if (icon != null) icon.setDegree(degree);
}
@Override
@@ -1730,7 +1729,7 @@ public class VideoCamera extends NoSearchActivity
private boolean switchToCameraMode() {
if (isFinishing() || mMediaRecorderRecording) return false;
- MenuHelper.gotoCameraMode(this);
+ MenuHelper.gotoCameraMode(VideoCamera.this);
finish();
return true;
}