diff options
author | Wu-cheng Li <wuchengli@google.com> | 2010-12-14 19:10:07 +0800 |
---|---|---|
committer | Wu-cheng Li <wuchengli@google.com> | 2010-12-14 19:11:33 +0800 |
commit | 3e0ae4cf60e8735049aa9a276bc3c4b911537471 (patch) | |
tree | 9afa3073b11f84f2c4beee1854b61feb4fe764e2 | |
parent | 46872547dac204175ed5e017976f71efbcc3e27a (diff) | |
download | LegacyCamera-3e0ae4cf60e8735049aa9a276bc3c4b911537471.zip LegacyCamera-3e0ae4cf60e8735049aa9a276bc3c4b911537471.tar.gz LegacyCamera-3e0ae4cf60e8735049aa9a276bc3c4b911537471.tar.bz2 |
Ring lights up around preview frame to indicate time lapse mode.
bug:3278551
Change-Id: Ib2acf5266f256a47bd1b5eb29c9d96c518b0a0bc
-rw-r--r-- | res/drawable-hdpi/border_preview_time_lapse.9.png | bin | 0 -> 447 bytes | |||
-rw-r--r-- | res/drawable-mdpi/border_preview_time_lapse.9.png | bin | 0 -> 447 bytes | |||
-rw-r--r-- | src/com/android/camera/VideoCamera.java | 19 |
3 files changed, 14 insertions, 5 deletions
diff --git a/res/drawable-hdpi/border_preview_time_lapse.9.png b/res/drawable-hdpi/border_preview_time_lapse.9.png Binary files differnew file mode 100644 index 0000000..495a986 --- /dev/null +++ b/res/drawable-hdpi/border_preview_time_lapse.9.png diff --git a/res/drawable-mdpi/border_preview_time_lapse.9.png b/res/drawable-mdpi/border_preview_time_lapse.9.png Binary files differnew file mode 100644 index 0000000..495a986 --- /dev/null +++ b/res/drawable-mdpi/border_preview_time_lapse.9.png diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java index 725f133..62984dc 100644 --- a/src/com/android/camera/VideoCamera.java +++ b/src/com/android/camera/VideoCamera.java @@ -183,6 +183,7 @@ public class VideoCamera extends NoSearchActivity // Default 0. If it is larger than 0, the camcorder is in time lapse mode. private int mTimeBetweenTimeLapseFrameCaptureMs = 0; private View mTimeLapseLabel; + private View mPreviewBorder; private int mDesiredPreviewWidth; private int mDesiredPreviewHeight; @@ -381,6 +382,7 @@ public class VideoCamera extends NoSearchActivity mRecordingTimeView = (TextView) findViewById(R.id.recording_time); mOrientationListener = new MyOrientationEventListener(VideoCamera.this); mTimeLapseLabel = findViewById(R.id.time_lapse_label); + mPreviewBorder = findViewById(R.id.preview_border); // Make sure preview is started. try { @@ -393,7 +395,7 @@ public class VideoCamera extends NoSearchActivity // ignore } - showTimeLapseLabel(mCaptureTimeLapse); + showTimeLapseUI(mCaptureTimeLapse); resizeForPreviewAspectRatio(); mBackCameraId = CameraHolder.instance().getBackCameraId(); @@ -1852,13 +1854,20 @@ public class VideoCamera extends NoSearchActivity setCameraParameters(); } } - showTimeLapseLabel(mCaptureTimeLapse); + showTimeLapseUI(mCaptureTimeLapse); } } - private void showTimeLapseLabel(boolean enable) { - if (mTimeLapseLabel == null) return; - mTimeLapseLabel.setVisibility(enable ? View.VISIBLE : View.INVISIBLE); + private void showTimeLapseUI(boolean enable) { + if (mTimeLapseLabel != null) { + mTimeLapseLabel.setVisibility(enable ? View.VISIBLE : View.INVISIBLE); + } + if (mPreviewBorder != null) { + mPreviewBorder.setBackgroundResource(enable + ? R.drawable.border_preview_time_lapse + : R.drawable.border_preview); + } + } private class MyControlPanelListener implements ControlPanel.Listener { |