Made a bunch of improvements to QVGA layouts.
[zxing.git] / android / res / layout / capture.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  Copyright (C) 2008 ZXing authors
4
5  Licensed under the Apache License, Version 2.0 (the "License");
6  you may not use this file except in compliance with the License.
7  You may obtain a copy of the License at
8
9       http://www.apache.org/licenses/LICENSE-2.0
10
11  Unless required by applicable law or agreed to in writing, software
12  distributed under the License is distributed on an "AS IS" BASIS,
13  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  See the License for the specific language governing permissions and
15  limitations under the License.
16  -->
17 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
18              android:layout_width="fill_parent"
19              android:layout_height="fill_parent">
20
21   <SurfaceView android:id="@+id/preview_view"
22                android:layout_width="fill_parent"
23                android:layout_height="fill_parent"
24                android:layout_centerInParent="true"/>
25
26   <com.google.zxing.client.android.ViewfinderView
27       android:id="@+id/viewfinder_view"
28       android:layout_width="fill_parent"
29       android:layout_height="fill_parent"
30       android:background="@color/transparent"/>
31
32   <LinearLayout android:id="@+id/result_view"
33                 android:orientation="vertical"
34                 android:layout_width="fill_parent"
35                 android:layout_height="fill_parent"
36                 android:background="@color/result_view"
37                 android:visibility="gone"
38                 android:padding="4dip">
39
40     <LinearLayout
41         android:orientation="horizontal"
42         android:layout_width="fill_parent"
43         android:layout_height="wrap_content"
44         android:layout_weight="1"
45         android:gravity="top"
46         android:padding="12dip">
47
48       <LinearLayout
49           android:orientation="vertical"
50           android:layout_width="wrap_content"
51           android:layout_height="wrap_content"
52           android:gravity="left|top">
53
54         <ImageView android:id="@+id/barcode_image_view"
55                    android:layout_width="wrap_content"
56                    android:layout_height="wrap_content"
57                    android:layout_marginBottom="4dip"
58                    android:adjustViewBounds="true"
59                    android:scaleType="centerInside"/>
60
61         <TextView android:id="@+id/format_text_view"
62                   android:layout_width="wrap_content"
63                   android:layout_height="wrap_content"
64                   android:layout_gravity="left"
65                   android:text="@string/msg_default_format"
66                   android:textColor="@color/result_minor_text"
67                   android:textSize="12sp"/>
68
69         <TextView android:id="@+id/type_text_view"
70                   android:layout_width="wrap_content"
71                   android:layout_height="wrap_content"
72                   android:layout_gravity="left"
73                   android:text="@string/msg_default_type"
74                   android:textColor="@color/result_minor_text"
75                   android:textSize="12sp"/>
76
77       </LinearLayout>
78
79       <ScrollView
80           android:layout_width="fill_parent"
81           android:layout_height="wrap_content"
82           android:layout_weight="1">
83
84         <TextView android:id="@+id/contents_text_view"
85                   android:layout_width="fill_parent"
86                   android:layout_height="fill_parent"
87                   android:gravity="left|top"
88                   android:text="@string/msg_default_contents"
89                   android:textColor="@color/result_text"
90                   android:textSize="22sp"
91                   android:paddingLeft="12dip"
92                   android:autoLink="web"/>
93
94       </ScrollView>
95
96     </LinearLayout>
97
98     <LinearLayout android:id="@+id/result_button_view"
99                   android:orientation="horizontal"
100                   android:layout_width="fill_parent"
101                   android:layout_height="wrap_content"
102                   android:gravity="center">
103
104       <Button android:layout_width="wrap_content"
105               android:layout_height="wrap_content"
106               android:visibility="gone"/>
107
108       <Button android:layout_width="wrap_content"
109               android:layout_height="wrap_content"
110               android:visibility="gone"/>
111
112       <Button android:layout_width="wrap_content"
113               android:layout_height="wrap_content"
114               android:visibility="gone"/>
115
116       <Button android:layout_width="wrap_content"
117               android:layout_height="wrap_content"
118               android:visibility="gone"/>
119
120     </LinearLayout>
121
122   </LinearLayout>
123
124   <LinearLayout
125       android:orientation="vertical"
126       android:layout_width="fill_parent"
127       android:layout_height="fill_parent"
128       android:background="@color/transparent">
129
130     <FrameLayout
131         android:layout_width="fill_parent"
132         android:layout_height="fill_parent"
133         android:layout_weight="1"
134         android:background="@color/transparent"/>
135
136     <LinearLayout android:id="@+id/status_view"
137                   android:orientation="horizontal"
138                   android:layout_width="fill_parent"
139                   android:layout_height="wrap_content"
140                   android:layout_weight="0"
141                   android:background="@color/status_view"
142                   android:baselineAligned="false"
143                   android:padding="4dip">
144
145       <TextView android:id="@+id/status_text_view"
146                 android:layout_width="wrap_content"
147                 android:layout_height="wrap_content"
148                 android:layout_gravity="left|center_vertical"
149                 android:layout_weight="1"
150                 android:text="@string/msg_default_status"
151                 android:textColor="@color/status_text"
152                 android.textSize="14sp"/>
153
154     </LinearLayout>
155
156   </LinearLayout>
157
158 </FrameLayout>