summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWu-cheng Li <wuchengli@google.com>2010-10-14 18:10:41 +0800
committerWu-cheng Li <wuchengli@google.com>2010-10-18 17:24:57 +0800
commit9847656580c612bee31b5b1f2256d2cad718644f (patch)
treee531742a400cea71fd760c5d915e66469ec007ff /src
parentde751a6a61b0e2806df4b2c5902aaadc7bb1aeb4 (diff)
downloadLegacyCamera-9847656580c612bee31b5b1f2256d2cad718644f.zip
LegacyCamera-9847656580c612bee31b5b1f2256d2cad718644f.tar.gz
LegacyCamera-9847656580c612bee31b5b1f2256d2cad718644f.tar.bz2
Change recording time position for xlarge layout.
Move recording time to the top right of the camera control panel. Change-Id: I8c13d2903f568d479d1aa963c6f0955e3126860c
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/VideoCamera.java24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java
index b3a9721..fddfdaf 100644
--- a/src/com/android/camera/VideoCamera.java
+++ b/src/com/android/camera/VideoCamera.java
@@ -192,7 +192,7 @@ public class VideoCamera extends NoSearchActivity
private ContentResolver mContentResolver;
private ShutterButton mShutterButton;
- private TextView mRecordingTimeView;
+ private TextView mRecordingTimeView, mTimeLapseRecordingTimeView;
private Switcher mSwitcher;
private boolean mRecordingTimeCountsDown = false;
@@ -358,7 +358,6 @@ public class VideoCamera extends NoSearchActivity
mIsVideoCaptureIntent = isVideoCaptureIntent();
mQuickCapture = getIntent().getBooleanExtra(EXTRA_QUICK_CAPTURE, false);
- mRecordingTimeView = (TextView) findViewById(R.id.recording_time);
ViewGroup rootView = (ViewGroup) findViewById(R.id.video_camera);
LayoutInflater inflater = this.getLayoutInflater();
@@ -386,6 +385,10 @@ public class VideoCamera extends NoSearchActivity
mShutterButton.setOnShutterButtonListener(this);
mShutterButton.requestFocus();
+ mRecordingTimeView = (TextView) findViewById(R.id.recording_time);
+ mTimeLapseRecordingTimeView = (TextView) findViewById(
+ R.id.time_lapse_recording_time);
+
// Make sure preview is started.
try {
startPreviewThread.join();
@@ -1333,6 +1336,10 @@ public class VideoCamera extends NoSearchActivity
updateRecordingIndicator(false);
mRecordingTimeView.setText("");
mRecordingTimeView.setVisibility(View.VISIBLE);
+ if (mTimeLapseRecordingTimeView != null) {
+ mTimeLapseRecordingTimeView.setText("");
+ mTimeLapseRecordingTimeView.setVisibility(View.VISIBLE);
+ }
updateRecordingTime();
keepScreenOn();
}
@@ -1435,6 +1442,9 @@ public class VideoCamera extends NoSearchActivity
releaseMediaRecorder();
updateRecordingIndicator(true);
mRecordingTimeView.setVisibility(View.GONE);
+ if (mTimeLapseRecordingTimeView != null) {
+ mTimeLapseRecordingTimeView.setVisibility(View.GONE);
+ }
keepScreenOnAwhile();
}
if (needToRegisterRecording && mStorageStatus == STORAGE_STATUS_OK) {
@@ -1632,7 +1642,15 @@ public class VideoCamera extends NoSearchActivity
// Since the length of time lapse video is different from the length
// of the actual wall clock time elapsed, we display the video length
// alongside the wall clock time.
- text = text + " (" + getTimeLapseVideoLengthString(delta) + ")";
+ String timeLapseText = "(" + getTimeLapseVideoLengthString(delta) + ")";
+ // In xlarge layout, recording time and time lapse recording time
+ // are separated in two lines. In other layouts, they are in one
+ // line.
+ if (mTimeLapseRecordingTimeView == null) {
+ text += " " + timeLapseText;
+ } else {
+ mTimeLapseRecordingTimeView.setText(timeLapseText);
+ }
}
mRecordingTimeView.setText(text);