summaryrefslogtreecommitdiffstats
path: root/res/layout
diff options
context:
space:
mode:
authorAngus Kong <shkong@google.com>2011-10-05 13:01:44 +0800
committerAngus Kong <shkong@google.com>2011-10-05 18:06:36 +0800
commite4d0a72cbc4633497c393019ff2c57e63b1039b9 (patch)
tree7f0c3fe67d4ea794bcfaa46e7b7f0c91cf7b0b03 /res/layout
parentff1c641693cf537703fef3949ccf15898c3ad5d0 (diff)
downloadLegacyCamera-e4d0a72cbc4633497c393019ff2c57e63b1039b9.zip
LegacyCamera-e4d0a72cbc4633497c393019ff2c57e63b1039b9.tar.gz
LegacyCamera-e4d0a72cbc4633497c393019ff2c57e63b1039b9.tar.bz2
Add time lapse label for Phone UI.
1. The behavior on tablet UI and phone UI now is the same. 2. The recording time and time lapse label now always stay on the top-left corner (even when in portrait). bug:5394916 Change-Id: Ifa5013748dbdda3a6c0083569ec3c565b4c687eb
Diffstat (limited to 'res/layout')
-rw-r--r--res/layout/indicator_bar.xml2
-rw-r--r--res/layout/preview_frame_video.xml21
-rw-r--r--res/layout/viewfinder_labels_video.xml31
3 files changed, 35 insertions, 19 deletions
diff --git a/res/layout/indicator_bar.xml b/res/layout/indicator_bar.xml
index cbbfcef..4fe6d45 100644
--- a/res/layout/indicator_bar.xml
+++ b/res/layout/indicator_bar.xml
@@ -23,7 +23,7 @@
<RelativeLayout
android:id="@+id/control_bars"
android:layout_toRightOf="@+id/zoom_index_bar"
- android:layout_width="48dp"
+ android:layout_width="@dimen/indicator_bar_width"
android:layout_height="match_parent">
<com.android.camera.ui.IndicatorControlBar
android:id="@+id/indicator_bar"
diff --git a/res/layout/preview_frame_video.xml b/res/layout/preview_frame_video.xml
index f80ffe3..6f7c1e4 100644
--- a/res/layout/preview_frame_video.xml
+++ b/res/layout/preview_frame_video.xml
@@ -26,26 +26,11 @@
android:background="@drawable/border_preview">
<SurfaceView android:id="@+id/camera_preview"
android:layout_width="match_parent"
- android:layout_height="match_parent"/>
+ android:layout_height="match_parent" />
<com.android.camera.ui.RotateLayout android:id="@+id/recording_time_rect"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="13dp"
- android:layout_marginLeft="17dp"
- android:layout_alignParentTop="true"
- android:layout_alignParentLeft="true">
+ style="@style/ViewfinderLableLayout">
- <!-- 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"/>
+ <include layout="@layout/viewfinder_labels_video" android:id="@+id/labels" />
</com.android.camera.ui.RotateLayout>
<ImageView android:id="@+id/review_image"
android:layout_width="match_parent"
diff --git a/res/layout/viewfinder_labels_video.xml b/res/layout/viewfinder_labels_video.xml
new file mode 100644
index 0000000..9e9c892
--- /dev/null
+++ b/res/layout/viewfinder_labels_video.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 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"
+ android:orientation="horizontal"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+ <TextView android:id="@+id/recording_time"
+ style="@style/OnViewfinderLabel"
+ android:gravity="center"
+ android:drawableLeft="@drawable/ic_recording_indicator"
+ android:drawablePadding="5dp"
+ android:visibility="gone" />
+ <TextView android:id="@+id/time_lapse_label"
+ android:text="@string/time_lapse_title"
+ style="@style/OnViewfinderLabel"
+ android:visibility="gone" />
+</LinearLayout>