main.xml revision b8dc64f657e9b8aac496379b460c584d958e6919
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3     Copyright (C) 2012 The Android Open Source Project
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<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
18    xmlns:tools="http://schemas.android.com/tools"
19    android:layout_width="fill_parent"
20    android:layout_height="fill_parent"
21    android:orientation="horizontal" >
22
23    <LinearLayout
24        android:id="@+id/preview_column"
25        android:layout_width="0dp"
26        android:layout_height="fill_parent"
27        android:layout_weight="6"
28        android:orientation="vertical" >
29
30        <SurfaceView
31            android:id="@+id/preview"
32            android:layout_width="fill_parent"
33            android:layout_height="0dp"
34            android:layout_weight="6"
35            tools:ignore="NestedWeights" />
36
37        <TextView
38            android:id="@+id/log"
39            android:layout_width="fill_parent"
40            android:layout_height="0dp"
41            android:layout_weight="1.5"
42            android:freezesText="true" />
43    </LinearLayout>
44
45    <ScrollView
46        android:id="@+id/control_bar"
47        android:layout_width="0dp"
48        android:layout_height="match_parent"
49        android:layout_weight="2"
50        android:fadingEdgeLength="100dp"
51        android:requiresFadingEdge="vertical"
52        android:scrollbarAlwaysDrawVerticalTrack="true" >
53
54        <LinearLayout
55            android:id="@+id/control_bar_contents"
56            android:layout_width="match_parent"
57            android:layout_height="wrap_content"
58            android:layout_marginLeft="5dp"
59            android:orientation="vertical" >
60
61            <TextView
62                android:id="@+id/camera_spinner_label"
63                android:layout_width="wrap_content"
64                android:layout_height="wrap_content"
65                android:layout_marginTop="5dp"
66                android:layout_weight="1"
67                android:text="@string/camera_selection_prompt"
68                android:textAppearance="?android:attr/textAppearanceSmall" />
69
70            <Spinner
71                android:id="@+id/camera_spinner"
72                android:layout_width="fill_parent"
73                android:layout_height="wrap_content"
74                android:layout_weight="1"
75                android:prompt="@string/camera_selection_prompt" />
76
77            <Button
78                android:id="@+id/info_button"
79                style="?android:attr/buttonStyleSmall"
80                android:layout_width="fill_parent"
81                android:layout_height="wrap_content"
82                android:layout_gravity="center"
83                android:layout_weight="1"
84                android:text="@string/show_info" />
85
86            <View
87                android:id="@+id/horizontal_rule_1"
88                android:layout_width="fill_parent"
89                android:layout_height="1dip"
90                android:layout_marginBottom="@dimen/horiz_rule_btm_margin"
91                android:layout_marginTop="@dimen/horiz_rule_top_margin"
92                android:background="@color/horiz_rule_color" />
93
94            <TextView
95                android:id="@+id/preview_size_spinner_label"
96                android:layout_width="wrap_content"
97                android:layout_height="wrap_content"
98                android:layout_weight="1"
99                android:text="@string/preview_resolution_prompt"
100                android:textAppearance="?android:attr/textAppearanceSmall" />
101
102            <Spinner
103                android:id="@+id/preview_size_spinner"
104                android:layout_width="fill_parent"
105                android:layout_height="wrap_content"
106                android:layout_weight="1"
107                android:prompt="@string/preview_resolution_prompt" />
108
109            <ToggleButton
110                android:id="@+id/start_preview"
111                android:layout_width="fill_parent"
112                android:layout_height="wrap_content"
113                android:layout_gravity="center"
114                android:layout_weight="1"
115                android:textColorLink="@android:color/holo_blue_light"
116                android:textOff="@string/preview_off_label"
117                android:textOn="@string/preview_on_label" />
118
119            <View
120                android:id="@+id/horizontal_rule_2"
121                android:layout_width="fill_parent"
122                android:layout_height="1dip"
123                android:layout_marginBottom="@dimen/horiz_rule_btm_margin"
124                android:layout_marginTop="@dimen/horiz_rule_top_margin"
125                android:layout_weight="1"
126                android:background="@color/horiz_rule_color" />
127
128            <TextView
129                android:id="@+id/af_mode_spinner_label"
130                android:layout_width="wrap_content"
131                android:layout_height="wrap_content"
132                android:layout_weight="1"
133                android:text="@string/af_mode_prompt"
134                android:textAppearance="?android:attr/textAppearanceSmall" />
135
136            <Spinner
137                android:id="@+id/af_mode_spinner"
138                android:layout_width="match_parent"
139                android:layout_height="wrap_content"
140                android:layout_weight="1" />
141
142            <Button
143                android:id="@+id/af_button"
144                style="?android:attr/buttonStyleSmall"
145                android:layout_width="wrap_content"
146                android:layout_height="wrap_content"
147                android:layout_gravity="center"
148                android:layout_weight="1"
149                android:text="@string/trigger_autofocus" />
150
151            <Button
152                android:id="@+id/af_cancel_button"
153                style="?android:attr/buttonStyleSmall"
154                android:layout_width="wrap_content"
155                android:layout_height="wrap_content"
156                android:layout_gravity="center"
157                android:layout_weight="1"
158                android:text="@string/cancel_autofocus" />
159
160            <View
161                android:id="@+id/horizontal_rule_3"
162                android:layout_width="fill_parent"
163                android:layout_height="1dip"
164                android:layout_marginBottom="@dimen/horiz_rule_btm_margin"
165                android:layout_marginTop="@dimen/horiz_rule_top_margin"
166                android:layout_weight="1"
167                android:background="@color/horiz_rule_color" />
168
169            <TextView
170                android:id="@+id/textView1"
171                android:layout_width="wrap_content"
172                android:layout_height="wrap_content"
173                android:layout_weight="1"
174                android:text="@string/snapshot_size_spinner_label"
175                android:textAppearance="?android:attr/textAppearanceSmall" />
176
177            <Spinner
178                android:id="@+id/snapshot_size_spinner"
179                android:layout_width="match_parent"
180                android:layout_height="wrap_content"
181                android:layout_weight="1" />
182
183            <Button
184                android:id="@+id/take_picture"
185                style="?android:attr/buttonStyleSmall"
186                android:layout_width="fill_parent"
187                android:layout_height="wrap_content"
188                android:layout_weight="1"
189                android:text="@string/take_picture_label" />
190
191            <View
192                android:id="@+id/horizontal_rule_4"
193                android:layout_width="fill_parent"
194                android:layout_height="1dip"
195                android:layout_marginBottom="@dimen/horiz_rule_btm_margin"
196                android:layout_marginTop="@dimen/horiz_rule_top_margin"
197                android:layout_weight="1"
198                android:background="@color/horiz_rule_color" />
199
200            <TextView
201                android:id="@+id/camcorder_profile_spinner_label"
202                android:layout_width="wrap_content"
203                android:layout_height="wrap_content"
204                android:layout_weight="1"
205                android:text="@string/camcorder_profile_prompt"
206                android:textAppearance="?android:attr/textAppearanceSmall" />
207
208            <Spinner
209                android:id="@+id/camcorder_profile_spinner"
210                android:layout_width="match_parent"
211                android:layout_height="wrap_content"
212                android:layout_weight="1" />
213
214            <ToggleButton
215                android:id="@+id/start_record"
216                android:layout_width="fill_parent"
217                android:layout_height="wrap_content"
218                android:layout_weight="1"
219                android:textColorLink="@android:color/holo_red_dark"
220                android:textOff="@string/record_off_label"
221                android:textOn="@string/record_on_label" />
222        </LinearLayout>
223    </ScrollView>
224
225</LinearLayout>
226