summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/layout-xlarge/camera_control.xml122
-rw-r--r--res/layout-xlarge/video_camera.xml41
-rw-r--r--res/layout/video_camera.xml15
-rw-r--r--res/values/styles.xml11
-rw-r--r--src/com/android/camera/VideoCamera.java24
5 files changed, 149 insertions, 64 deletions
diff --git a/res/layout-xlarge/camera_control.xml b/res/layout-xlarge/camera_control.xml
index 76ab293..82ddc55 100644
--- a/res/layout-xlarge/camera_control.xml
+++ b/res/layout-xlarge/camera_control.xml
@@ -15,74 +15,96 @@
-->
<com.android.camera.ui.ControlPanel xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:camera="http://schemas.android.com/apk/res/com.android.camera"
android:id="@+id/control_panel"
android:layout_height="match_parent"
android:layout_width="240dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="20dp"
android:layout_marginLeft="10dp"
- android:layout_marginRight="10dp"
- android:layout_alignParentRight="true">
+ android:layout_marginRight="10dp">
<ListView android:id="@+id/thumbnail_list"
android:layout_width="96dp"
android:layout_height="match_parent"
- android:layout_alignParentTop="true"
- android:layout_alignParentBottom="true"
- android:layout_marginLeft="10dp"
- android:layout_marginRight="10dp"
android:dividerHeight="6dp"
android:orientation="vertical"
android:gravity="center">
</ListView>
- <ViewStub android:id="@+id/zoom_stub"
- android:inflatedId="@+id/zoom_picker"
- android:layout="@layout/zoom_picker"
- android:layout_alignParentTop="true"
- android:layout_alignParentRight="true"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="10dp"
- android:layout_centerInParent="true"/>
+ <RelativeLayout
+ android:layout_width="134dp"
+ android:layout_height="match_parent"
+ android:layout_marginLeft="10dp"
+ android:layout_alignParentRight="true">
- <com.android.camera.ui.IndicatorWheel android:id="@+id/indicator_wheel"
- android:layout_width="144dp"
- android:layout_height="wrap_content"
- android:layout_centerInParent="true"
- android:layout_alignParentRight="true">
- <com.android.camera.ShutterButton android:id="@+id/shutter_button"
+ <ViewStub android:id="@+id/zoom_stub"
+ android:inflatedId="@+id/zoom_picker"
+ android:layout="@layout/zoom_picker"
+ android:layout_alignParentTop="true"
+ android:layout_alignParentRight="true"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_marginTop="10dp" />
+
+ <TextView android:id="@+id/recording_time"
+ style="@style/RecordingTime"
android:layout_width="wrap_content"
- android:scaleType="center"
- android:clickable="true"
- android:focusable="true"
- android:src="@drawable/btn_ic_camera_shutter"
- android:background="@drawable/btn_shutter" />
- </com.android.camera.ui.IndicatorWheel>
+ android:layout_height="wrap_content"
+ android:layout_alignParentTop="true"
+ android:layout_alignParentRight="true"
+ android:layout_marginTop="20dp"
+ android:layout_marginRight="10dp"
+ android:drawablePadding="8dp"
+ android:drawableLeft="@drawable/ic_recording_indicator"
+ android:visibility="gone" />
- <LinearLayout android:id="@+id/camera_switch_set"
- android:orientation="vertical"
- android:gravity="center"
- android:layout_alignParentBottom="true"
- android:layout_alignParentRight="true"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:layout_marginRight="17dp">
- <com.android.camera.RotateImageView android:id="@+id/video_switch_icon"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:src="@drawable/btn_ic_mode_switch_video"/>
- <com.android.camera.Switcher android:id="@+id/camera_switch"
- android:layout_width="wrap_content"
- android:layout_height="70dp"
- android:src="@drawable/btn_mode_switch_knob"
- android:background="@drawable/btn_mode_switch_bg" />
- <com.android.camera.RotateImageView
- android:id="@+id/camera_switch_icon"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:src="@drawable/btn_ic_mode_switch_camera"/>
- </LinearLayout>
+ <TextView android:id="@+id/time_lapse_recording_time"
+ style="@style/RecordingTime"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/recording_time"
+ android:layout_alignParentRight="true"
+ android:visibility="gone" />
+
+ <com.android.camera.ui.IndicatorWheel android:id="@+id/indicator_wheel"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_centerInParent="true"
+ android:layout_alignParentRight="true">
+ <com.android.camera.ShutterButton android:id="@+id/shutter_button"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:scaleType="center"
+ android:clickable="true"
+ android:focusable="true"
+ android:src="@drawable/btn_ic_camera_shutter"
+ android:background="@drawable/btn_shutter" />
+ </com.android.camera.ui.IndicatorWheel>
+
+ <LinearLayout android:id="@+id/camera_switch_set"
+ android:orientation="vertical"
+ android:gravity="center"
+ android:layout_alignParentBottom="true"
+ android:layout_alignParentRight="true"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:layout_marginRight="17dp">
+ <com.android.camera.RotateImageView android:id="@+id/video_switch_icon"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:src="@drawable/btn_ic_mode_switch_video"/>
+ <com.android.camera.Switcher android:id="@+id/camera_switch"
+ android:layout_width="wrap_content"
+ android:layout_height="70dp"
+ android:src="@drawable/btn_mode_switch_knob"
+ android:background="@drawable/btn_mode_switch_bg" />
+ <com.android.camera.RotateImageView
+ android:id="@+id/camera_switch_icon"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:src="@drawable/btn_ic_mode_switch_camera"/>
+ </LinearLayout>
+ </RelativeLayout>
</com.android.camera.ui.ControlPanel>
diff --git a/res/layout-xlarge/video_camera.xml b/res/layout-xlarge/video_camera.xml
new file mode 100644
index 0000000..d20a9b3
--- /dev/null
+++ b/res/layout-xlarge/video_camera.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:camera="http://schemas.android.com/apk/res/com.android.camera"
+ android:id="@+id/video_camera"
+ android:orientation="horizontal"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+ <com.android.camera.PreviewFrameLayout android:id="@+id/frame_layout"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_marginLeft="2dip"
+ android:layout_weight="1">
+ <FrameLayout android:id="@+id/frame"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="@drawable/border_view_finder">
+ <SurfaceView android:id="@+id/camera_preview"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"/>
+ <ImageView android:id="@+id/video_frame"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:visibility="gone" />
+ </FrameLayout>
+ </com.android.camera.PreviewFrameLayout>
+</LinearLayout>
diff --git a/res/layout/video_camera.xml b/res/layout/video_camera.xml
index 1dae598..8130971 100644
--- a/res/layout/video_camera.xml
+++ b/res/layout/video_camera.xml
@@ -40,23 +40,16 @@
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"
android:layout_height="wrap_content"
android:layout_gravity="left|bottom"
android:layout_marginBottom="13dp"
android:layout_marginLeft="17dp"
android:paddingRight="2dp"
- android:drawablePadding="8dp"
- android:drawableLeft="@drawable/ic_recording_indicator"
- android:shadowColor="#c0000000"
- android:shadowDx="1"
- android:shadowDy="1"
- android:shadowRadius="1"
- android:gravity="left|center_vertical"
- android:textColor="@color/recording_time_elapsed_text"
- android:textSize="23dp"
- android:textStyle="bold"
- android:visibility="gone"/>
+ android:visibility="gone" />
</FrameLayout>
</com.android.camera.PreviewFrameLayout>
</LinearLayout>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index fba5f57..d10f6f0 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -60,4 +60,15 @@
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">match_parent</item>
</style>
+ <style name="RecordingTime">
+ <item name="android:layout_width">wrap_content</item>
+ <item name="android:layout_height">wrap_content</item>
+ <item name="android:shadowColor">#c0000000</item>
+ <item name="android:shadowDx">1</item>
+ <item name="android:shadowDy">1</item>
+ <item name="android:shadowRadius">1</item>
+ <item name="android:textColor">@color/recording_time_elapsed_text</item>
+ <item name="android:textSize">23dp</item>
+ <item name="android:textStyle">bold</item>
+ </style>
</resources>
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);