diff options
Diffstat (limited to 'res')
-rw-r--r-- | res/drawable/border_preview.xml | 21 | ||||
-rw-r--r-- | res/layout-w1024dp/preview_frame.xml | 10 | ||||
-rw-r--r-- | res/layout-w1024dp/preview_frame_video.xml | 19 | ||||
-rw-r--r-- | res/layout/preview_frame.xml | 15 | ||||
-rw-r--r-- | res/layout/preview_frame_video.xml | 42 |
5 files changed, 62 insertions, 45 deletions
diff --git a/res/drawable/border_preview.xml b/res/drawable/border_preview.xml new file mode 100644 index 0000000..8cac1fc --- /dev/null +++ b/res/drawable/border_preview.xml @@ -0,0 +1,21 @@ +<?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. +--> + +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:state_activated="true" android:drawable="@drawable/ic_snapshot_border" /> + <item android:drawable="@android:color/transparent" /> +</selector> + diff --git a/res/layout-w1024dp/preview_frame.xml b/res/layout-w1024dp/preview_frame.xml index 762fef5..961a407 100644 --- a/res/layout-w1024dp/preview_frame.xml +++ b/res/layout-w1024dp/preview_frame.xml @@ -13,13 +13,13 @@ See the License for the specific language governing permissions and limitations under the License. --> - -<com.android.camera.PreviewFrameLayout xmlns:android="http://schemas.android.com/apk/res/android" +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/frame_layout" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1"> - <RelativeLayout android:id="@+id/frame" + <com.android.camera.PreviewFrameLayout android:id="@+id/frame" + android:layout_centerInParent="true" android:layout_width="match_parent" android:layout_height="match_parent"> <SurfaceView android:id="@+id/camera_preview" @@ -32,5 +32,5 @@ <include layout="@layout/focus_indicator"/> <include layout="@layout/priority_indicators"/> <include layout="@layout/tap_to_focus_toast"/> - </RelativeLayout> -</com.android.camera.PreviewFrameLayout> + </com.android.camera.PreviewFrameLayout> +</RelativeLayout> diff --git a/res/layout-w1024dp/preview_frame_video.xml b/res/layout-w1024dp/preview_frame_video.xml index 8a5ecd5..8099d89 100644 --- a/res/layout-w1024dp/preview_frame_video.xml +++ b/res/layout-w1024dp/preview_frame_video.xml @@ -14,14 +14,16 @@ limitations under the License. --> -<com.android.camera.PreviewFrameLayout xmlns:android="http://schemas.android.com/apk/res/android" +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/frame_layout" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1"> - <RelativeLayout android:id="@+id/frame" + <com.android.camera.PreviewFrameLayout android:id="@+id/frame" android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_height="match_parent" + android:layout_centerInParent="true" + android:background="@drawable/border_preview"> <SurfaceView android:id="@+id/camera_preview" android:layout_width="match_parent" android:layout_height="match_parent" /> @@ -59,11 +61,6 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:visibility="gone" - android:background="@android:color/black" /> - </RelativeLayout> - <!-- Border for video snapshot. --> - <View android:id="@+id/preview_border" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:visibility="gone" /> -</com.android.camera.PreviewFrameLayout> + android:background="@android:color/black"/> + </com.android.camera.PreviewFrameLayout> +</RelativeLayout> diff --git a/res/layout/preview_frame.xml b/res/layout/preview_frame.xml index a8b4d99..c225a58 100644 --- a/res/layout/preview_frame.xml +++ b/res/layout/preview_frame.xml @@ -14,13 +14,13 @@ limitations under the License. --> -<com.android.camera.PreviewFrameLayout xmlns:android="http://schemas.android.com/apk/res/android" +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/frame_layout" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_weight="1" - android:layout_marginLeft="2dp"> - <RelativeLayout android:id="@+id/frame" + android:layout_weight="1"> + <com.android.camera.PreviewFrameLayout android:id="@+id/frame" + android:layout_centerInParent="true" android:layout_width="match_parent" android:layout_height="match_parent"> <SurfaceView android:id="@+id/camera_preview" @@ -33,6 +33,7 @@ <include layout="@layout/focus_indicator"/> <include layout="@layout/priority_indicators"/> <include layout="@layout/tap_to_focus_toast"/> - <include layout="@layout/indicator_bar" /> - </RelativeLayout> -</com.android.camera.PreviewFrameLayout> + </com.android.camera.PreviewFrameLayout> + <include layout="@layout/indicator_bar" /> +</RelativeLayout> + diff --git a/res/layout/preview_frame_video.xml b/res/layout/preview_frame_video.xml index a922c6a..e07de71 100644 --- a/res/layout/preview_frame_video.xml +++ b/res/layout/preview_frame_video.xml @@ -14,15 +14,16 @@ limitations under the License. --> -<com.android.camera.PreviewFrameLayout xmlns:android="http://schemas.android.com/apk/res/android" +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/frame_layout" android:layout_width="match_parent" android:layout_height="match_parent" - android:layout_weight="1" - android:layout_marginLeft="2dip"> - <RelativeLayout android:id="@+id/frame" + android:layout_weight="1"> + <com.android.camera.PreviewFrameLayout android:id="@+id/frame" android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_height="match_parent" + android:layout_centerInParent="true" + android:background="@drawable/border_preview"> <SurfaceView android:id="@+id/camera_preview" android:layout_width="match_parent" android:layout_height="match_parent"/> @@ -49,21 +50,18 @@ android:layout_height="match_parent" android:visibility="gone" android:background="@android:color/black"/> - <include layout="@layout/indicator_bar"/> <TextView android:id="@+id/bg_replace_message" - android:layout_width="300dp" - android:layout_height="wrap_content" - android:layout_centerInParent="true" - android:padding="32dp" - android:layout_margin="24dp" - android:textAppearance="?android:attr/textAppearanceMedium" - android:background="@drawable/bg_text_on_preview" - android:visibility="gone" - android:text="@string/bg_replacement_message" /> - </RelativeLayout> - <!-- Border for video snapshot. --> - <View android:id="@+id/preview_border" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:visibility="gone"/> -</com.android.camera.PreviewFrameLayout> + android:layout_width="300dp" + android:layout_height="wrap_content" + android:layout_centerInParent="true" + android:padding="32dp" + android:layout_margin="24dp" + android:textAppearance="?android:attr/textAppearanceMedium" + android:background="@drawable/bg_text_on_preview" + android:visibility="gone" + android:text="@string/bg_replacement_message" /> + </com.android.camera.PreviewFrameLayout> + <!-- Indicator control and popup window frame. --> + <include layout="@layout/indicator_bar" /> +</RelativeLayout> + |