diff options
author | Wu-cheng Li <wuchengli@google.com> | 2010-12-20 15:16:07 +0800 |
---|---|---|
committer | Wu-cheng Li <wuchengli@google.com> | 2010-12-20 16:11:03 +0800 |
commit | 1afe2a1ff266f1ccd7fccf2c37e97d2136384896 (patch) | |
tree | 86d77a97a768831986a6f10d05cb7f5f5d14f28f /src/com/android/camera/VideoCamera.java | |
parent | 8303435a2466803e05dd99c60cdb2de074b79162 (diff) | |
download | LegacyCamera-1afe2a1ff266f1ccd7fccf2c37e97d2136384896.zip LegacyCamera-1afe2a1ff266f1ccd7fccf2c37e97d2136384896.tar.gz LegacyCamera-1afe2a1ff266f1ccd7fccf2c37e97d2136384896.tar.bz2 |
Avoid time-lapse recording label overlapping on review control.
1. Put time-lapse label under review control.
2. Hide review control during recording.
3. Hide time-lapse UI during review.
bug:3287027
Change-Id: If1695e5b1b0c5d222c8ae65ac721a4bb2e05a131
Diffstat (limited to 'src/com/android/camera/VideoCamera.java')
-rw-r--r-- | src/com/android/camera/VideoCamera.java | 39 |
1 files changed, 23 insertions, 16 deletions
diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java index 363cc50..114273b 100644 --- a/src/com/android/camera/VideoCamera.java +++ b/src/com/android/camera/VideoCamera.java @@ -148,6 +148,7 @@ public class VideoCamera extends NoSearchActivity private ControlPanel mControlPanel; // Front/back camera picker for xlarge layout. private CameraPicker mCameraPicker; + private View mReviewControl; private boolean mIsVideoCaptureIntent; private boolean mQuickCapture; @@ -336,12 +337,12 @@ public class VideoCamera extends NoSearchActivity if (mIsVideoCaptureIntent) { setContentView(R.layout.video_camera_attach); - View reviewControl = findViewById(R.id.review_control); - reviewControl.setVisibility(View.VISIBLE); - reviewControl.findViewById(R.id.btn_cancel).setOnClickListener(this); - reviewControl.findViewById(R.id.btn_done).setOnClickListener(this); + mReviewControl = findViewById(R.id.review_control); + mReviewControl.setVisibility(View.VISIBLE); + mReviewControl.findViewById(R.id.btn_cancel).setOnClickListener(this); + mReviewControl.findViewById(R.id.btn_done).setOnClickListener(this); findViewById(R.id.btn_play).setOnClickListener(this); - View retake = reviewControl.findViewById(R.id.btn_retake); + View retake = mReviewControl.findViewById(R.id.btn_retake); retake.setOnClickListener(this); if (retake instanceof ImageView) { ((ImageView) retake).setImageResource(R.drawable.btn_ic_review_retake_video); @@ -1393,23 +1394,26 @@ public class VideoCamera extends NoSearchActivity mMediaRecorderRecording = true; mRecordingStartTime = SystemClock.uptimeMillis(); - updateRecordingIndicator(false); - mRecordingTimeView.setText(""); - mRecordingTimeView.setVisibility(View.VISIBLE); + showRecordingUI(true); updateRecordingTime(); keepScreenOn(); } - private void updateRecordingIndicator(boolean showRecording) { - if (showRecording) { - mShutterButton.setImageDrawable(getResources().getDrawable( - R.drawable.btn_ic_video_record)); - mShutterButton.setBackgroundResource(R.drawable.btn_shutter); - } else { + private void showRecordingUI(boolean recording) { + if (recording) { mShutterButton.setImageDrawable(getResources().getDrawable( R.drawable.btn_ic_video_record_stop)); mShutterButton.setBackgroundResource(R.drawable.btn_shutter_recording); + mRecordingTimeView.setText(""); + mRecordingTimeView.setVisibility(View.VISIBLE); + if (mReviewControl != null) mReviewControl.setVisibility(View.GONE); + } else { + mShutterButton.setImageDrawable(getResources().getDrawable( + R.drawable.btn_ic_video_record)); + mShutterButton.setBackgroundResource(R.drawable.btn_shutter); + mRecordingTimeView.setVisibility(View.GONE); + if (mReviewControl != null) mReviewControl.setVisibility(View.VISIBLE); } } @@ -1444,6 +1448,7 @@ public class VideoCamera extends NoSearchActivity // Remove the text of the cancel button View view = findViewById(R.id.btn_cancel); if (view instanceof Button) ((Button) view).setText(""); + showTimeLapseUI(false); } private void hideAlert() { @@ -1463,6 +1468,9 @@ public class VideoCamera extends NoSearchActivity View button = findViewById(id); ((View) button.getParent()).setVisibility(View.GONE); } + if (mCaptureTimeLapse) { + showTimeLapseUI(true); + } } private static void fadeIn(View view) { @@ -1518,8 +1526,7 @@ public class VideoCamera extends NoSearchActivity deleteVideoFile(mVideoFilename); } mMediaRecorderRecording = false; - updateRecordingIndicator(true); - mRecordingTimeView.setVisibility(View.GONE); + showRecordingUI(false); if (!mIsVideoCaptureIntent) { enableCameraControls(true); } |