main.xml revision 8bf3e54287366cf790c25577568334b92f67d178
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 <TextView 161 android:id="@+id/flash_mode_spinner_label" 162 android:layout_width="wrap_content" 163 android:layout_height="wrap_content" 164 android:layout_weight="1" 165 android:text="@string/flash_mode_label" 166 android:textAppearance="?android:attr/textAppearanceSmall" /> 167 168 <Spinner 169 android:id="@+id/flash_mode_spinner" 170 android:layout_width="match_parent" 171 android:layout_height="wrap_content" 172 android:layout_weight="1" /> 173 174 <View 175 android:id="@+id/horizontal_rule_3" 176 android:layout_width="fill_parent" 177 android:layout_height="1dip" 178 android:layout_marginBottom="@dimen/horiz_rule_btm_margin" 179 android:layout_marginTop="@dimen/horiz_rule_top_margin" 180 android:layout_weight="1" 181 android:background="@color/horiz_rule_color" /> 182 183 <TextView 184 android:id="@+id/textView1" 185 android:layout_width="wrap_content" 186 android:layout_height="wrap_content" 187 android:layout_weight="1" 188 android:text="@string/snapshot_size_spinner_label" 189 android:textAppearance="?android:attr/textAppearanceSmall" /> 190 191 <Spinner 192 android:id="@+id/snapshot_size_spinner" 193 android:layout_width="match_parent" 194 android:layout_height="wrap_content" 195 android:layout_weight="1" /> 196 197 <Button 198 android:id="@+id/take_picture" 199 style="?android:attr/buttonStyleSmall" 200 android:layout_width="fill_parent" 201 android:layout_height="wrap_content" 202 android:layout_weight="1" 203 android:text="@string/take_picture_label" /> 204 205 <View 206 android:id="@+id/horizontal_rule_4" 207 android:layout_width="fill_parent" 208 android:layout_height="1dip" 209 android:layout_marginBottom="@dimen/horiz_rule_btm_margin" 210 android:layout_marginTop="@dimen/horiz_rule_top_margin" 211 android:layout_weight="1" 212 android:background="@color/horiz_rule_color" /> 213 214 <TextView 215 android:id="@+id/camcorder_profile_spinner_label" 216 android:layout_width="wrap_content" 217 android:layout_height="wrap_content" 218 android:layout_weight="1" 219 android:text="@string/camcorder_profile_prompt" 220 android:textAppearance="?android:attr/textAppearanceSmall" /> 221 222 <Spinner 223 android:id="@+id/camcorder_profile_spinner" 224 android:layout_width="match_parent" 225 android:layout_height="wrap_content" 226 android:layout_weight="1" /> 227 228 <TextView 229 android:id="@+id/video_record_size_spinner_label" 230 android:layout_width="wrap_content" 231 android:layout_height="wrap_content" 232 android:layout_weight="1" 233 android:text="@string/video_record_size_prompt" 234 android:textAppearance="?android:attr/textAppearanceSmall" /> 235 236 <Spinner 237 android:id="@+id/video_record_size_spinner" 238 android:layout_width="match_parent" 239 android:layout_height="wrap_content" 240 android:layout_weight="1" /> 241 242 <ToggleButton 243 android:id="@+id/start_record" 244 android:layout_width="fill_parent" 245 android:layout_height="wrap_content" 246 android:layout_weight="1" 247 android:textColorLink="@android:color/holo_red_dark" 248 android:textOff="@string/record_off_label" 249 android:textOn="@string/record_on_label" /> 250 </LinearLayout> 251 </ScrollView> 252 253</LinearLayout> 254