main.xml revision bc88c6ed6508927ad72eefba3f6f63c6436f06d3
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 android:layout_width="fill_parent" 19 android:layout_height="fill_parent" 20 android:orientation="horizontal" > 21 22 <LinearLayout 23 android:id="@+id/preview_column" 24 android:layout_width="0px" 25 android:layout_height="fill_parent" 26 android:layout_weight="6" 27 android:orientation="vertical" > 28 29 <SurfaceView 30 android:id="@+id/preview" 31 android:layout_width="fill_parent" 32 android:layout_height="0px" 33 android:layout_weight="6" 34 /> 35 <TextView 36 android:id="@+id/log" 37 android:layout_height="wrap_content" 38 android:layout_width="fill_parent" 39 android:layout_weight="1" 40 /> 41 </LinearLayout> 42 43 <ScrollView 44 android:id="@+id/control_bar" 45 android:layout_width="0px" 46 android:layout_height="match_parent" 47 android:layout_weight="2" 48 android:fadingEdgeLength="100dp" 49 android:requiresFadingEdge="vertical" 50 android:scrollbarAlwaysDrawVerticalTrack="true" > 51 52 <LinearLayout 53 android:id="@+id/control_bar_contents" 54 android:layout_width="match_parent" 55 android:layout_height="wrap_content" 56 android:layout_marginLeft="5dp" 57 android:orientation="vertical" > 58 59 <TextView 60 android:id="@+id/camera_spinner_label" 61 android:layout_width="wrap_content" 62 android:layout_height="wrap_content" 63 android:layout_marginTop="5dp" 64 android:layout_weight="1" 65 android:text="@string/camera_selection_prompt" 66 android:textAppearance="?android:attr/textAppearanceSmall" /> 67 68 <Spinner 69 android:id="@+id/camera_spinner" 70 android:layout_width="fill_parent" 71 android:layout_height="wrap_content" 72 android:layout_weight="1" 73 android:prompt="@string/camera_selection_prompt" /> 74 75 <Button 76 android:id="@+id/info_button" 77 android:layout_width="fill_parent" 78 android:layout_height="wrap_content" 79 android:layout_weight="1" 80 android:text="@string/show_info" /> 81 82 <View 83 android:id="@+id/horizontal_rule_1" 84 android:layout_width="fill_parent" 85 android:layout_height="1dip" 86 android:layout_marginBottom="@dimen/horiz_rule_btm_margin" 87 android:layout_marginTop="@dimen/horiz_rule_top_margin" 88 android:background="@color/horiz_rule_color" /> 89 90 <TextView 91 android:id="@+id/preview_size_spinner_label" 92 android:layout_width="wrap_content" 93 android:layout_height="wrap_content" 94 android:layout_weight="1" 95 android:text="@string/preview_resolution_prompt" 96 android:textAppearance="?android:attr/textAppearanceSmall" /> 97 98 <Spinner 99 android:id="@+id/preview_size_spinner" 100 android:layout_width="fill_parent" 101 android:layout_height="wrap_content" 102 android:layout_weight="1" 103 android:prompt="@string/preview_resolution_prompt" /> 104 105 <ToggleButton 106 android:id="@+id/start_preview" 107 android:layout_width="fill_parent" 108 android:layout_height="wrap_content" 109 android:layout_weight="1" 110 android:textColorLink="@android:color/holo_blue_light" 111 android:textOff="@string/preview_off_label" 112 android:textOn="@string/preview_on_label" /> 113 114 <View 115 android:id="@+id/horizontal_rule_2" 116 android:layout_width="fill_parent" 117 android:layout_height="1dip" 118 android:layout_marginBottom="@dimen/horiz_rule_btm_margin" 119 android:layout_marginTop="@dimen/horiz_rule_top_margin" 120 android:layout_weight="1" 121 android:background="@color/horiz_rule_color" /> 122 123 <TextView 124 android:id="@+id/textView1" 125 android:layout_width="wrap_content" 126 android:layout_height="wrap_content" 127 android:layout_weight="1" 128 android:text="@string/snapshot_size_spinner_label" 129 android:textAppearance="?android:attr/textAppearanceSmall" /> 130 131 <Spinner 132 android:id="@+id/snapshot_size_spinner" 133 android:layout_width="match_parent" 134 android:layout_height="wrap_content" 135 android:layout_weight="1" /> 136 137 <Button 138 android:id="@+id/take_picture" 139 android:layout_width="fill_parent" 140 android:layout_height="wrap_content" 141 android:layout_weight="1" 142 android:text="@string/take_picture_label" /> 143 144 <View 145 android:id="@+id/horizontal_rule_3" 146 android:layout_width="fill_parent" 147 android:layout_height="1dip" 148 android:layout_marginBottom="@dimen/horiz_rule_btm_margin" 149 android:layout_marginTop="@dimen/horiz_rule_top_margin" 150 android:layout_weight="1" 151 android:background="@color/horiz_rule_color" /> 152 153 <TextView 154 android:id="@+id/camcorder_profile_spinner_label" 155 android:layout_width="wrap_content" 156 android:layout_height="wrap_content" 157 android:layout_weight="1" 158 android:text="@string/camcorder_profile_prompt" 159 android:textAppearance="?android:attr/textAppearanceSmall" /> 160 161 <Spinner 162 android:id="@+id/camcorder_profile_spinner" 163 android:layout_width="match_parent" 164 android:layout_height="wrap_content" 165 android:layout_weight="1" /> 166 167 <ToggleButton 168 android:id="@+id/start_record" 169 android:layout_width="fill_parent" 170 android:layout_height="wrap_content" 171 android:layout_weight="1" 172 android:textColorLink="@android:color/holo_red_dark" 173 android:textOff="@string/record_off_label" 174 android:textOn="@string/record_on_label" /> 175 </LinearLayout> 176 </ScrollView> 177 178</LinearLayout> 179