summaryrefslogtreecommitdiffstats
path: root/res/layout
diff options
context:
space:
mode:
authorCheng-Ru Lin <owenlin@google.com>2009-09-28 03:21:25 +0800
committerCheng-Ru Lin <owenlin@google.com>2009-09-29 02:46:29 +0800
commitffcca7403c9a364403357d3c76a3ff256c63c786 (patch)
treef76aaecf3228111063384b975eb50ce1d956c94b /res/layout
parent2901711af18340c8cd255adb0aabbcd319b2dd95 (diff)
downloadLegacyCamera-ffcca7403c9a364403357d3c76a3ff256c63c786.zip
LegacyCamera-ffcca7403c9a364403357d3c76a3ff256c63c786.tar.gz
LegacyCamera-ffcca7403c9a364403357d3c76a3ff256c63c786.tar.bz2
Resize the preview frame as large as possible.
Now, we will calculate the layout by ourselves in PreviewFrameLayout. Change-Id: I90f91f9df6d2f75fbd31fc930af624a84820bc95
Diffstat (limited to 'res/layout')
-rw-r--r--res/layout/camera.xml92
-rw-r--r--res/layout/review_image.xml30
-rw-r--r--res/layout/video_camera.xml91
3 files changed, 93 insertions, 120 deletions
diff --git a/res/layout/camera.xml b/res/layout/camera.xml
index a07b6c4..f36f61d 100644
--- a/res/layout/camera.xml
+++ b/res/layout/camera.xml
@@ -21,59 +21,49 @@
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
- <RelativeLayout android:layout_width="0px"
+ <com.android.camera.PreviewFrameLayout android:id="@+id/frame_layout"
+ android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1">
- <LinearLayout android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerInParent="true"
- android:gravity="center_vertical"
- android:orientation="horizontal">
- <ImageView android:id="@+id/btn_gripper"
- android:layout_marginRight="1dp"
- android:background="@drawable/btn_gripper"
+ <ImageView android:id="@+id/btn_gripper"
+ android:background="@drawable/btn_gripper"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"/>
+ <FrameLayout android:id="@+id/frame"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:background="@drawable/border_view_finder">
+ <SurfaceView android:id="@+id/camera_preview"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"/>
+ <com.android.camera.FocusRectangle
+ android:id="@+id/focus_rectangle"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"/>
+ <com.android.camera.EvenlySpacedLayout
+ camera:orientation="vertical"
+ android:visibility="visible"
+ android:layout_gravity="left|fill_vertical"
+ android:id="@+id/action_icon_panel"
+ android:layout_marginTop="20dp"
+ android:layout_marginLeft="10dp"
android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_centerVertical="true"/>
- <FrameLayout android:id="@+id/frame"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerVertical="true"
- android:background="@drawable/border_view_finder">
- <com.android.camera.VideoPreview
- android:id="@+id/camera_preview"
- android:layout_width="384dp"
- android:layout_height="288dp"/>
- <com.android.camera.FocusRectangle
- android:id="@+id/focus_rectangle"
- android:layout_width="384dp"
- android:layout_height="288dp"/>
- <com.android.camera.EvenlySpacedLayout
- camera:orientation="vertical"
- android:visibility="visible"
- android:layout_gravity="left|fill_vertical"
- android:id="@+id/action_icon_panel"
- android:layout_marginTop="20dp"
- android:layout_marginLeft="10dp"
+ android:layout_height="fill_parent">
+ <com.android.camera.IconIndicator
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:id="@+id/gps_icon"
+ camera:modes="@array/gps_modes"
+ camera:icons="@array/gps_icons"
+ android:visibility="visible"/>
+ <com.android.camera.IconIndicator
android:layout_width="wrap_content"
- android:layout_height="288dp">
- <com.android.camera.IconIndicator
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:id="@+id/gps_icon"
- camera:modes="@array/gps_modes"
- camera:icons="@array/gps_icons"
- android:visibility="visible"/>
- <com.android.camera.IconIndicator
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:id="@+id/flash_icon"
- camera:modes="@array/pref_camera_flashmode_entryvalues"
- camera:icons="@array/flash_icons"
- android:visibility="visible"/>
- </com.android.camera.EvenlySpacedLayout>
- </FrameLayout>
- </LinearLayout>
- </RelativeLayout>
+ android:layout_height="wrap_content"
+ android:id="@+id/flash_icon"
+ camera:modes="@array/pref_camera_flashmode_entryvalues"
+ camera:icons="@array/flash_icons"
+ android:visibility="visible"/>
+ </com.android.camera.EvenlySpacedLayout>
+ </FrameLayout>
+ </com.android.camera.PreviewFrameLayout>
</LinearLayout>
diff --git a/res/layout/review_image.xml b/res/layout/review_image.xml
index b025499..b5639e6 100644
--- a/res/layout/review_image.xml
+++ b/res/layout/review_image.xml
@@ -20,31 +20,29 @@
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
-
- <RelativeLayout android:layout_width="0px"
+ <com.android.camera.PreviewFrameLayout android:id="@+id/frame_layout"
+ android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1">
- <FrameLayout android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerInParent="true"
+ <FrameLayout android:id="@+id/frame"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
android:background="@drawable/border_view_finder">
<RelativeLayout android:id="@+id/mainPanel"
android:layout_toLeftOf="@id/button_bar"
- android:layout_width="384dp"
- android:layout_height="288dp">
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent">
<AbsoluteLayout android:id="@+id/slideShowContainer"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<com.android.camera.ImageViewTouch2 android:id="@+id/image1_slideShow"
android:background="#00000000"
android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- />
+ android:layout_height="fill_parent" />
<com.android.camera.ImageViewTouch2 android:id="@+id/image2_slideShow"
android:background="#00000000"
android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- />
+ android:layout_height="fill_parent" />
</AbsoluteLayout>
<AbsoluteLayout android:id="@+id/abs"
android:layout_width="fill_parent"
@@ -63,8 +61,7 @@
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:visibility="invisible"
- android:src="@drawable/btn_camera_arrow_left"
- />
+ android:src="@drawable/btn_camera_arrow_left" />
<ImageView android:id="@+id/next_image"
android:clickable="true"
android:focusable="false"
@@ -73,15 +70,12 @@
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:visibility="invisible"
- android:src="@drawable/btn_camera_arrow_right"
- />
+ android:src="@drawable/btn_camera_arrow_right" />
</RelativeLayout>
</FrameLayout>
- </RelativeLayout>
-
+ </com.android.camera.PreviewFrameLayout>
<include android:id="@+id/control_bar"
layout="@layout/review_control" />
-
</LinearLayout>
diff --git a/res/layout/video_camera.xml b/res/layout/video_camera.xml
index 678869e..b165d90 100644
--- a/res/layout/video_camera.xml
+++ b/res/layout/video_camera.xml
@@ -20,58 +20,47 @@
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
-
- <RelativeLayout android:layout_width="0px"
+ <com.android.camera.PreviewFrameLayout android:id="@+id/frame_layout"
+ android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1">
- <LinearLayout android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerInParent="true"
- android:gravity="center_vertical"
- android:orientation="horizontal">
- <ImageView android:id="@+id/btn_gripper"
- android:layout_marginRight="1dp"
- android:background="@drawable/btn_gripper"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_centerVertical="true"/>
- <FrameLayout android:layout_width="wrap_content"
+ <ImageView android:id="@+id/btn_gripper"
+ android:background="@drawable/btn_gripper"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"/>
+ <FrameLayout android:id="@+id/frame"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:background="@drawable/border_view_finder">
+ <SurfaceView android:id="@+id/camera_preview"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"/>
+ <ImageView
+ android:id="@+id/video_frame"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:visibility="gone" />
+ <!-- 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"
+ android:layout_width="180dp"
android:layout_height="wrap_content"
- android:layout_centerInParent="true"
- android:background="@drawable/border_view_finder">
- <com.android.camera.VideoPreview
- android:id="@+id/camera_preview"
- android:layout_width="352dp"
- android:layout_height="288dp"/>
- <ImageView
- android:id="@+id/video_frame"
- android:layout_width="352dp"
- android:layout_height="288dp"
- android:visibility="gone" />
- <!-- 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"
- android:layout_width="180dp"
- 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"/>
- </FrameLayout>
- </LinearLayout>
- </RelativeLayout>
+ 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"/>
+ </FrameLayout>
+ </com.android.camera.PreviewFrameLayout>
</LinearLayout>