summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/layout-w1024dp/preview_frame_video.xml32
-rw-r--r--res/layout/preview_frame_video.xml30
-rw-r--r--res/values/styles.xml3
-rw-r--r--src/com/android/camera/VideoCamera.java4
4 files changed, 42 insertions, 27 deletions
diff --git a/res/layout-w1024dp/preview_frame_video.xml b/res/layout-w1024dp/preview_frame_video.xml
index 555f55d..a125187 100644
--- a/res/layout-w1024dp/preview_frame_video.xml
+++ b/res/layout-w1024dp/preview_frame_video.xml
@@ -27,22 +27,28 @@
<SurfaceView android:id="@+id/camera_preview"
android:layout_width="match_parent"
android:layout_height="match_parent" />
- <LinearLayout android:id="@+id/labels"
+ <com.android.camera.ui.RotateLayout android:id="@+id/recording_time_rect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_margin="20dp"
android:layout_alignParentTop="true"
- android:layout_alignParentRight="true">
- <TextView android:id="@+id/time_lapse_label"
- android:text="@string/time_lapse_title"
- style="@style/OnViewfinderLabel"
- android:visibility="gone" />
- <TextView android:id="@+id/recording_time"
- style="@style/OnViewfinderLabel"
- android:gravity="center"
- android:drawableLeft="@drawable/ic_recording_indicator_small"
- android:drawablePadding="5dp"
- android:visibility="gone" />
- </LinearLayout>
+ android:layout_alignParentLeft="true">
+
+ <LinearLayout android:id="@+id/labels"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content">
+ <TextView android:id="@+id/time_lapse_label"
+ android:text="@string/time_lapse_title"
+ style="@style/OnViewfinderLabel"
+ android:visibility="gone" />
+ <TextView android:id="@+id/recording_time"
+ style="@style/OnViewfinderLabel"
+ android:gravity="center"
+ android:drawableLeft="@drawable/ic_recording_indicator_small"
+ android:drawablePadding="5dp"
+ android:visibility="gone"/>
+ </LinearLayout>
+ </com.android.camera.ui.RotateLayout>
<ImageView android:id="@+id/review_image"
android:layout_width="match_parent"
android:layout_height="match_parent"
diff --git a/res/layout/preview_frame_video.xml b/res/layout/preview_frame_video.xml
index 92849df..f80ffe3 100644
--- a/res/layout/preview_frame_video.xml
+++ b/res/layout/preview_frame_video.xml
@@ -27,20 +27,26 @@
<SurfaceView android:id="@+id/camera_preview"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
- <!-- Note: In this TextView the paddingRight="2"
- attribute is required because otherwise the
- text's drop shadow will be clipped. -->
- <TextView android:id="@+id/recording_time"
- style="@style/RecordingTime"
- android:drawablePadding="8dp"
- android:drawableLeft="@drawable/ic_recording_indicator"
- android:layout_width="300dp"
+ <com.android.camera.ui.RotateLayout android:id="@+id/recording_time_rect"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="left|bottom"
- android:layout_marginBottom="13dp"
+ android:layout_marginTop="13dp"
android:layout_marginLeft="17dp"
- android:paddingRight="2dp"
- android:visibility="gone"/>
+ android:layout_alignParentTop="true"
+ android:layout_alignParentLeft="true">
+
+ <!-- Note: In this TextView the paddingRight="2"
+ attribute is required because otherwise the
+ text's drop shadow will be clipped. -->
+ <TextView android:id="@+id/recording_time"
+ style="@style/RecordingTime"
+ android:drawablePadding="8dp"
+ android:drawableLeft="@drawable/ic_recording_indicator"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingRight="2dp"
+ android:visibility="gone"/>
+ </com.android.camera.ui.RotateLayout>
<ImageView android:id="@+id/review_image"
android:layout_width="match_parent"
android:layout_height="match_parent"
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 8a01313..05eb0c1 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -146,8 +146,7 @@
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:singleLine">true</item>
- <item name="android:layout_marginRight">20dp</item>
- <item name="android:layout_marginTop">20dp</item>
+ <item name="android:layout_margin">10dp</item>
<item name="android:paddingLeft">15dp</item>
<item name="android:paddingRight">15dp</item>
<item name="android:paddingTop">3dp</item>
diff --git a/src/com/android/camera/VideoCamera.java b/src/com/android/camera/VideoCamera.java
index 2c656dc..4107f42 100644
--- a/src/com/android/camera/VideoCamera.java
+++ b/src/com/android/camera/VideoCamera.java
@@ -20,6 +20,7 @@ import com.android.camera.ui.CameraPicker;
import com.android.camera.ui.IndicatorControlContainer;
import com.android.camera.ui.IndicatorControlWheelContainer;
import com.android.camera.ui.RotateImageView;
+import com.android.camera.ui.RotateLayout;
import com.android.camera.ui.SharePopup;
import com.android.camera.ui.ZoomControl;
@@ -180,6 +181,7 @@ public class VideoCamera extends ActivityBase
private boolean mMediaRecorderRecording = false;
private long mRecordingStartTime;
private boolean mRecordingTimeCountsDown = false;
+ private RotateLayout mRecordingTimeRect;
private long mOnResumeTime;
// The video file that the hardware camera is about to record into
// (or is recording into.)
@@ -400,6 +402,7 @@ public class VideoCamera extends ActivityBase
mShutterButton.requestFocus();
mRecordingTimeView = (TextView) findViewById(R.id.recording_time);
+ mRecordingTimeRect = (RotateLayout) findViewById(R.id.recording_time_rect);
mOrientationListener = new MyOrientationEventListener(VideoCamera.this);
mTimeLapseLabel = findViewById(R.id.time_lapse_label);
@@ -525,6 +528,7 @@ public class VideoCamera extends ActivityBase
if (mModePicker != null) mModePicker.setDegree(degree);
if (mSharePopup != null) mSharePopup.setOrientation(degree);
if (mIndicatorControlContainer != null) mIndicatorControlContainer.setDegree(degree);
+ mRecordingTimeRect.setOrientation(mOrientationCompensation);
}
private void startPlayVideoActivity() {