summaryrefslogtreecommitdiffstats
path: root/res/layout
diff options
context:
space:
mode:
authorWu-cheng Li <wuchengli@google.com>2011-08-30 15:29:15 +0800
committerWu-cheng Li <wuchengli@google.com>2011-08-30 17:02:16 +0800
commitd4832351874aa6eb2cd5e312c21bd4ec607ff3a4 (patch)
tree756a0b706fe396f003175164d1edec3cbf43e3ac /res/layout
parent2a1e44382f6a4fc70e4a89e3d183503a2255826f (diff)
downloadLegacyCamera-d4832351874aa6eb2cd5e312c21bd4ec607ff3a4.zip
LegacyCamera-d4832351874aa6eb2cd5e312c21bd4ec607ff3a4.tar.gz
LegacyCamera-d4832351874aa6eb2cd5e312c21bd4ec607ff3a4.tar.bz2
Rotate the focus rectangle in different orientations.
The new focus assets look different in portrait and landscape. Rotate the drawable so the orientation looks correct. bug:5223866 Change-Id: I5e5ebbcbaca95b118e051fbf6131c1a12584b2f2
Diffstat (limited to 'res/layout')
-rw-r--r--res/layout/basic_setting_popup.xml7
-rw-r--r--res/layout/focus_rect.xml25
-rw-r--r--res/layout/other_setting_popup.xml7
-rw-r--r--res/layout/preview_frame.xml5
4 files changed, 28 insertions, 16 deletions
diff --git a/res/layout/basic_setting_popup.xml b/res/layout/basic_setting_popup.xml
index 33bff04..9f579de 100644
--- a/res/layout/basic_setting_popup.xml
+++ b/res/layout/basic_setting_popup.xml
@@ -22,12 +22,7 @@
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toLeftOf="@+id/indicator_control"
- android:visibility="gone"
- android:background="@android:color/transparent">
- <!-- the transparent background here is a workaround of the render issue
- happened when the popup window is rotated as the device's orientation
- changed. The view looks fine in landscape. After rotation, only center
- part of the view is visible. -->
+ android:visibility="gone">
<LinearLayout android:orientation="vertical"
android:layout_height="wrap_content"
diff --git a/res/layout/focus_rect.xml b/res/layout/focus_rect.xml
new file mode 100644
index 0000000..f8aef7c
--- /dev/null
+++ b/res/layout/focus_rect.xml
@@ -0,0 +1,25 @@
+<?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.
+-->
+
+<com.android.camera.ui.RotateLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/focus_rect_rotate_layout"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_centerInParent="true">
+ <com.android.camera.ui.FocusRectangle android:id="@+id/focus_rect"
+ android:layout_width="120dp"
+ android:layout_height="120dp"/>
+</com.android.camera.ui.RotateLayout>
diff --git a/res/layout/other_setting_popup.xml b/res/layout/other_setting_popup.xml
index 3c7cfcb..263c938 100644
--- a/res/layout/other_setting_popup.xml
+++ b/res/layout/other_setting_popup.xml
@@ -23,12 +23,7 @@
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toLeftOf="@+id/indicator_control"
- android:visibility="gone"
- android:background="@android:color/transparent">
- <!-- the transparent background here is a workaround of the render issue
- happened when the popup window is rotated as the device's orientation
- changed. The view looks fine in landscape. After rotation, only center
- part of the view is visible. -->
+ android:visibility="gone">
<LinearLayout android:orientation="vertical"
android:layout_width="320dp"
diff --git a/res/layout/preview_frame.xml b/res/layout/preview_frame.xml
index b7685bf..b1deb86 100644
--- a/res/layout/preview_frame.xml
+++ b/res/layout/preview_frame.xml
@@ -35,10 +35,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"/>
- <com.android.camera.ui.FocusRectangle android:id="@+id/focus_rectangle"
- android:layout_width="120dp"
- android:layout_height="120dp"
- android:layout_centerInParent="true"/>
+ <include layout="@layout/focus_rect"/>
<include layout="@layout/priority_indicators"/>
<include layout="@layout/tap_to_focus_toast"/>
<include layout="@layout/indicator_bar" />