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:animateLayoutChanges="false" 29 android:orientation="vertical" 30 android:visibility="visible" > 31 32 <SurfaceView 33 android:id="@+id/preview" 34 android:layout_width="fill_parent" 35 android:layout_height="0dp" 36 android:layout_weight="@integer/preview_only_weight" 37 tools:ignore="NestedWeights" /> 38 39 <SurfaceView 40 android:id="@+id/callback_view" 41 android:layout_width="fill_parent" 42 android:layout_height="0dp" 43 android:layout_weight="@integer/preview_with_callback_weight" 44 android:visibility="gone" /> 45 46 <TextView 47 android:id="@+id/log" 48 android:layout_width="fill_parent" 49 android:layout_height="10dp" 50 android:layout_weight="1" 51 android:freezesText="true" 52 android:minLines="3" 53 android:typeface="normal" /> 54 55 </LinearLayout> 56 57 <ScrollView 58 android:id="@+id/control_bar" 59 android:layout_width="0dp" 60 android:layout_height="match_parent" 61 android:layout_weight="2" 62 android:fadingEdgeLength="100dp" 63 android:requiresFadingEdge="vertical" 64 android:scrollbarAlwaysDrawVerticalTrack="true" > 65 66 <LinearLayout 67 android:id="@+id/control_bar_contents" 68 android:layout_width="match_parent" 69 android:layout_height="wrap_content" 70 android:layout_marginLeft="5dp" 71 android:orientation="vertical" > 72 73 <TextView 74 android:id="@+id/camera_spinner_label" 75 android:layout_width="wrap_content" 76 android:layout_height="wrap_content" 77 android:layout_marginTop="5dp" 78 android:layout_weight="1" 79 android:text="@string/camera_selection_prompt" 80 android:textAppearance="?android:attr/textAppearanceSmall" /> 81 82 <Spinner 83 android:id="@+id/camera_spinner" 84 android:layout_width="fill_parent" 85 android:layout_height="wrap_content" 86 android:layout_weight="1" 87 android:prompt="@string/camera_selection_prompt" /> 88 89 <CheckBox 90 android:id="@+id/keep_open_checkbox" 91 android:layout_width="wrap_content" 92 android:layout_height="wrap_content" 93 android:layout_weight="1" 94 android:text="@string/keep_open_prompt" /> 95 96 <Button 97 android:id="@+id/info_button" 98 style="?android:attr/buttonStyleSmall" 99 android:layout_width="fill_parent" 100 android:layout_height="wrap_content" 101 android:layout_gravity="center" 102 android:layout_weight="1" 103 android:text="@string/show_info" /> 104 105 <View 106 android:id="@+id/horizontal_rule_1" 107 android:layout_width="fill_parent" 108 android:layout_height="1dip" 109 android:layout_marginBottom="@dimen/horiz_rule_btm_margin" 110 android:layout_marginTop="@dimen/horiz_rule_top_margin" 111 android:background="@color/horiz_rule_color" /> 112 113 <TextView 114 android:id="@+id/preview_size_spinner_label" 115 android:layout_width="wrap_content" 116 android:layout_height="wrap_content" 117 android:layout_weight="1" 118 android:text="@string/preview_resolution_prompt" 119 android:textAppearance="?android:attr/textAppearanceSmall" /> 120 121 <Spinner 122 android:id="@+id/preview_size_spinner" 123 android:layout_width="fill_parent" 124 android:layout_height="wrap_content" 125 android:layout_weight="1" 126 android:prompt="@string/preview_resolution_prompt" /> 127 128 <TextView 129 android:id="@+id/preview_frame_rate_label" 130 android:layout_width="wrap_content" 131 android:layout_height="wrap_content" 132 android:layout_weight="1" 133 android:text="@string/preview_frame_rate_prompt" 134 android:textAppearance="?android:attr/textAppearanceSmall" /> 135 136 <Spinner 137 android:id="@+id/preview_frame_rate_spinner" 138 android:layout_width="match_parent" 139 android:layout_height="wrap_content" 140 android:layout_weight="1" /> 141 142 <ToggleButton 143 android:id="@+id/start_preview" 144 android:layout_width="fill_parent" 145 android:layout_height="wrap_content" 146 android:layout_gravity="center" 147 android:layout_weight="1" 148 android:textColorLink="@android:color/holo_blue_light" 149 android:textOff="@string/preview_off_label" 150 android:textOn="@string/preview_on_label" /> 151 152 <View 153 android:id="@+id/horizontal_rule_2" 154 android:layout_width="fill_parent" 155 android:layout_height="1dip" 156 android:layout_marginBottom="@dimen/horiz_rule_btm_margin" 157 android:layout_marginTop="@dimen/horiz_rule_top_margin" 158 android:layout_weight="1" 159 android:background="@color/horiz_rule_color" /> 160 161 <TextView 162 android:id="@+id/af_mode_spinner_label" 163 android:layout_width="wrap_content" 164 android:layout_height="wrap_content" 165 android:layout_weight="1" 166 android:text="@string/af_mode_prompt" 167 android:textAppearance="?android:attr/textAppearanceSmall" /> 168 169 <Spinner 170 android:id="@+id/af_mode_spinner" 171 android:layout_width="match_parent" 172 android:layout_height="wrap_content" 173 android:layout_weight="1" /> 174 175 <Button 176 android:id="@+id/af_button" 177 style="?android:attr/buttonStyleSmall" 178 android:layout_width="wrap_content" 179 android:layout_height="wrap_content" 180 android:layout_gravity="center" 181 android:layout_weight="1" 182 android:text="@string/trigger_autofocus" /> 183 184 <Button 185 android:id="@+id/af_cancel_button" 186 style="?android:attr/buttonStyleSmall" 187 android:layout_width="wrap_content" 188 android:layout_height="wrap_content" 189 android:layout_gravity="center" 190 android:layout_weight="1" 191 android:text="@string/cancel_autofocus" /> 192 193 <TextView 194 android:id="@+id/flash_mode_spinner_label" 195 android:layout_width="wrap_content" 196 android:layout_height="wrap_content" 197 android:layout_weight="1" 198 android:text="@string/flash_mode_label" 199 android:textAppearance="?android:attr/textAppearanceSmall" /> 200 201 <Spinner 202 android:id="@+id/flash_mode_spinner" 203 android:layout_width="match_parent" 204 android:layout_height="wrap_content" 205 android:layout_weight="1" /> 206 207 <TextView 208 android:id="@+id/exposure_label" 209 android:layout_width="wrap_content" 210 android:layout_height="wrap_content" 211 android:layout_weight="1" 212 android:text="@string/exposure_label" 213 android:textAppearance="?android:attr/textAppearanceSmall" /> 214 215 <ToggleButton 216 android:id="@+id/exposure_lock" 217 android:layout_width="fill_parent" 218 android:layout_height="wrap_content" 219 android:layout_weight="1" 220 android:textColorLink="@android:color/holo_blue_light" 221 android:textOff="@string/exposure_lock_off_label" 222 android:textOn="@string/exposure_lock_on_label" /> 223 224 <TextView 225 android:id="@+id/zoom_label" 226 android:layout_width="wrap_content" 227 android:layout_height="wrap_content" 228 android:layout_weight="1" 229 android:text="@string/zoom_label" 230 android:textAppearance="?android:attr/textAppearanceSmall" /> 231 232 <SeekBar 233 android:id="@+id/zoom_seekbar" 234 android:layout_width="fill_parent" 235 android:layout_height="wrap_content" 236 android:layout_weight="1" 237 android:progress="0" 238 style="?android:attr/progressBarStyleHorizontal" /> 239 240 <View 241 android:id="@+id/horizontal_rule_3" 242 android:layout_width="fill_parent" 243 android:layout_height="1dip" 244 android:layout_marginBottom="@dimen/horiz_rule_btm_margin" 245 android:layout_marginTop="@dimen/horiz_rule_top_margin" 246 android:layout_weight="1" 247 android:background="@color/horiz_rule_color" /> 248 249 <TextView 250 android:id="@+id/snapshot_size_spinner_label" 251 android:layout_width="wrap_content" 252 android:layout_height="wrap_content" 253 android:layout_weight="1" 254 android:text="@string/snapshot_size_prompt" 255 android:textAppearance="?android:attr/textAppearanceSmall" /> 256 257 <Spinner 258 android:id="@+id/snapshot_size_spinner" 259 android:layout_width="match_parent" 260 android:layout_height="wrap_content" 261 android:layout_weight="1" /> 262 263 <Button 264 android:id="@+id/take_picture" 265 style="?android:attr/buttonStyleSmall" 266 android:layout_width="fill_parent" 267 android:layout_height="wrap_content" 268 android:layout_weight="1" 269 android:text="@string/take_picture_label" /> 270 271 <View 272 android:id="@+id/horizontal_rule_4" 273 android:layout_width="fill_parent" 274 android:layout_height="1dip" 275 android:layout_marginBottom="@dimen/horiz_rule_btm_margin" 276 android:layout_marginTop="@dimen/horiz_rule_top_margin" 277 android:layout_weight="1" 278 android:background="@color/horiz_rule_color" /> 279 280 <TextView 281 android:id="@+id/camcorder_profile_spinner_label" 282 android:layout_width="wrap_content" 283 android:layout_height="wrap_content" 284 android:layout_weight="1" 285 android:text="@string/camcorder_profile_prompt" 286 android:textAppearance="?android:attr/textAppearanceSmall" /> 287 288 <Spinner 289 android:id="@+id/camcorder_profile_spinner" 290 android:layout_width="match_parent" 291 android:layout_height="wrap_content" 292 android:layout_weight="1" /> 293 294 <TextView 295 android:id="@+id/video_record_size_spinner_label" 296 android:layout_width="wrap_content" 297 android:layout_height="wrap_content" 298 android:layout_weight="1" 299 android:text="@string/video_record_size_prompt" 300 android:textAppearance="?android:attr/textAppearanceSmall" /> 301 302 <Spinner 303 android:id="@+id/video_record_size_spinner" 304 android:layout_width="match_parent" 305 android:layout_height="wrap_content" 306 android:layout_weight="1" /> 307 308 <TextView 309 android:id="@+id/video_frame_rate_label" 310 android:layout_width="wrap_content" 311 android:layout_height="wrap_content" 312 android:layout_weight="1" 313 android:text="@string/video_frame_rate_prompt" 314 android:textAppearance="?android:attr/textAppearanceSmall" /> 315 316 <Spinner 317 android:id="@+id/video_frame_rate_spinner" 318 android:layout_width="match_parent" 319 android:layout_height="wrap_content" 320 android:layout_weight="1" /> 321 322 <ToggleButton 323 android:id="@+id/start_record" 324 android:layout_width="fill_parent" 325 android:layout_height="wrap_content" 326 android:layout_weight="1" 327 android:textColorLink="@android:color/holo_red_dark" 328 android:textOff="@string/record_off_label" 329 android:textOn="@string/record_on_label" /> 330 331 <CheckBox 332 android:id="@+id/record_handoff_checkbox" 333 android:layout_width="wrap_content" 334 android:layout_height="wrap_content" 335 android:layout_weight="1" 336 android:text="@string/record_handoff_prompt" /> 337 338 <ToggleButton 339 android:id="@+id/record_stabilization" 340 android:layout_width="fill_parent" 341 android:layout_height="wrap_content" 342 android:layout_weight="1" 343 android:textColorLink="@android:color/holo_blue_dark" 344 android:textOff="@string/record_stabilization_off_label" 345 android:textOn="@string/record_stabilization_on_label" /> 346 347 <ToggleButton 348 android:id="@+id/record_hint" 349 android:layout_width="fill_parent" 350 android:layout_height="wrap_content" 351 android:layout_weight="1" 352 android:textColorLink="@android:color/holo_blue_dark" 353 android:textOff="@string/record_hint_off_label" 354 android:textOn="@string/record_hint_on_label" /> 355 356 <ToggleButton 357 android:id="@+id/lock_camera" 358 android:layout_width="fill_parent" 359 android:layout_height="wrap_content" 360 android:layout_weight="1" 361 android:textColorLink="@android:color/holo_blue_dark" 362 android:textOff="@string/lock_camera_off_label" 363 android:textOn="@string/lock_camera_on_label" /> 364 365 <View 366 android:id="@+id/horizontal_rule_5" 367 android:layout_width="fill_parent" 368 android:layout_height="1dip" 369 android:layout_marginBottom="@dimen/horiz_rule_btm_margin" 370 android:layout_marginTop="@dimen/horiz_rule_top_margin" 371 android:layout_weight="1" 372 android:background="@color/horiz_rule_color" /> 373 374 <TextView 375 android:id="@+id/callback_format_spinner_label" 376 android:layout_width="wrap_content" 377 android:layout_height="wrap_content" 378 android:layout_weight="1" 379 android:text="@string/callback_format_prompt" 380 android:textAppearance="?android:attr/textAppearanceSmall" /> 381 382 <Spinner 383 android:id="@+id/callback_format_spinner" 384 android:layout_width="match_parent" 385 android:layout_height="wrap_content" 386 android:layout_weight="1" /> 387 388 <ToggleButton 389 android:id="@+id/enable_callbacks" 390 android:layout_width="wrap_content" 391 android:layout_height="wrap_content" 392 android:layout_weight="1" 393 android:textOff="@string/callbacks_off_label" 394 android:textOn="@string/callbacks_on_label" /> 395 396 <View 397 android:id="@+id/horizontal_rule_6" 398 android:layout_width="fill_parent" 399 android:layout_height="1dip" 400 android:layout_marginBottom="@dimen/horiz_rule_btm_margin" 401 android:layout_marginTop="@dimen/horiz_rule_top_margin" 402 android:layout_weight="1" 403 android:background="@color/horiz_rule_color" /> 404 405 <TextView 406 android:id="@+id/color_effect_spinner_label" 407 android:layout_width="wrap_content" 408 android:layout_height="wrap_content" 409 android:layout_weight="1" 410 android:text="@string/color_effect_prompt" 411 android:textAppearance="?android:attr/textAppearanceSmall" /> 412 413 <Spinner 414 android:id="@+id/color_effect_spinner" 415 android:layout_width="match_parent" 416 android:layout_height="wrap_content" 417 android:layout_weight="1" /> 418 419 420 </LinearLayout> 421 </ScrollView> 422 423 </LinearLayout> 424