1<?xml version="1.0" encoding="utf-8"?> 2<!-- Copyright (C) 2014 The Android Open Source Project 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15--> 16 17<LinearLayout 18 xmlns:android="http://schemas.android.com/apk/res/android" 19 xmlns:printspooler="http://schemas.android.com/apk/res/com.android.printspooler" 20 android:id="@+id/dynamic_content" 21 android:layout_width="fill_parent" 22 android:layout_height="wrap_content" 23 android:orientation="vertical" 24 android:elevation="@dimen/preview_controls_elevation" 25 android:background="?android:attr/colorPrimary"> 26 27 <LinearLayout 28 android:id="@+id/draggable_content" 29 android:layout_width="fill_parent" 30 android:layout_height="wrap_content" 31 android:orientation="vertical"> 32 33 <com.android.printspooler.widget.PrintOptionsLayout 34 android:id="@+id/options_container" 35 android:layout_width="fill_parent" 36 android:layout_height="wrap_content" 37 printspooler:columnCount="@integer/print_option_column_count"> 38 39 <LinearLayout 40 android:layout_width="wrap_content" 41 android:layout_height="wrap_content" 42 android:layout_marginStart="16dip" 43 android:layout_marginEnd="16dip" 44 android:orientation="vertical"> 45 46 <!-- Copies --> 47 48 <TextView 49 android:layout_width="wrap_content" 50 android:layout_height="wrap_content" 51 android:layout_marginTop="8dip" 52 android:layout_marginStart="12dip" 53 android:textAppearance="?android:attr/textAppearanceSmall" 54 android:labelFor="@+id/copies_edittext" 55 android:text="@string/label_copies"> 56 </TextView> 57 58 <com.android.printspooler.widget.CustomErrorEditText 59 android:id="@+id/copies_edittext" 60 android:layout_width="fill_parent" 61 android:layout_height="wrap_content" 62 android:layout_marginStart="8dip" 63 style="?android:attr/editTextStyle" 64 android:singleLine="true" 65 android:ellipsize="end" 66 android:inputType="numberDecimal"> 67 </com.android.printspooler.widget.CustomErrorEditText> 68 69 </LinearLayout> 70 71 <LinearLayout 72 android:layout_width="wrap_content" 73 android:layout_height="wrap_content" 74 android:layout_marginStart="16dip" 75 android:layout_marginEnd="16dip" 76 android:orientation="vertical"> 77 78 <!-- Paper size --> 79 80 <TextView 81 android:layout_width="wrap_content" 82 android:layout_height="wrap_content" 83 android:layout_marginTop="8dip" 84 android:layout_marginStart="12dip" 85 android:textAppearance="?android:attr/textAppearanceSmall" 86 android:labelFor="@+id/paper_size_spinner" 87 android:text="@string/label_paper_size"> 88 </TextView> 89 90 <Spinner 91 android:id="@+id/paper_size_spinner" 92 android:layout_width="fill_parent" 93 android:layout_height="wrap_content" 94 android:layout_marginStart="4dip"> 95 </Spinner> 96 97 </LinearLayout> 98 99 <LinearLayout 100 android:layout_width="wrap_content" 101 android:layout_height="wrap_content" 102 android:layout_marginStart="16dip" 103 android:layout_marginEnd="16dip" 104 android:orientation="vertical"> 105 106 <!-- Color --> 107 108 <TextView 109 android:layout_width="wrap_content" 110 android:layout_height="wrap_content" 111 android:layout_marginTop="8dip" 112 android:layout_marginStart="12dip" 113 android:textAppearance="?android:attr/textAppearanceSmall" 114 android:labelFor="@+id/color_spinner" 115 android:text="@string/label_color"> 116 </TextView> 117 118 <Spinner 119 android:id="@+id/color_spinner" 120 android:layout_width="fill_parent" 121 android:layout_height="wrap_content" 122 android:layout_marginStart="4dip"> 123 </Spinner> 124 125 </LinearLayout> 126 127 <LinearLayout 128 android:layout_width="wrap_content" 129 android:layout_height="wrap_content" 130 android:layout_marginStart="16dip" 131 android:layout_marginEnd="16dip" 132 android:orientation="vertical"> 133 134 <!-- Orientation --> 135 136 <TextView 137 android:layout_width="wrap_content" 138 android:layout_height="wrap_content" 139 android:layout_marginTop="8dip" 140 android:layout_marginStart="12dip" 141 android:textAppearance="?android:attr/textAppearanceSmall" 142 android:labelFor="@+id/orientation_spinner" 143 android:text="@string/label_orientation"> 144 </TextView> 145 146 <Spinner 147 android:id="@+id/orientation_spinner" 148 android:layout_width="fill_parent" 149 android:layout_height="wrap_content" 150 android:layout_marginStart="4dip"> 151 </Spinner> 152 153 </LinearLayout> 154 155 <LinearLayout 156 android:layout_width="wrap_content" 157 android:layout_height="wrap_content" 158 android:layout_marginStart="16dip" 159 android:layout_marginEnd="16dip" 160 android:orientation="vertical"> 161 162 <!-- Duplex --> 163 164 <TextView 165 android:layout_width="wrap_content" 166 android:layout_height="wrap_content" 167 android:layout_marginTop="8dip" 168 android:layout_marginStart="12dip" 169 android:textAppearance="?android:attr/textAppearanceSmall" 170 android:labelFor="@+id/duplex_spinner" 171 android:text="@string/label_duplex"> 172 </TextView> 173 174 <Spinner 175 android:id="@+id/duplex_spinner" 176 android:layout_width="fill_parent" 177 android:layout_height="wrap_content" 178 android:layout_marginStart="4dip"> 179 </Spinner> 180 181 </LinearLayout> 182 183 <LinearLayout 184 android:layout_width="wrap_content" 185 android:layout_height="wrap_content" 186 android:layout_marginStart="16dip" 187 android:layout_marginEnd="16dip" 188 android:orientation="vertical"> 189 190 <!-- Range options --> 191 192 <TextView 193 android:layout_width="wrap_content" 194 android:layout_height="wrap_content" 195 android:layout_marginTop="8dip" 196 android:layout_marginStart="12dip" 197 android:textAppearance="?android:attr/textAppearanceSmall" 198 android:labelFor="@+id/range_options_spinner" 199 android:text="@string/label_pages"> 200 </TextView> 201 202 <Spinner 203 android:id="@+id/range_options_spinner" 204 android:layout_width="fill_parent" 205 android:layout_height="wrap_content" 206 android:layout_marginStart="4dip"> 207 </Spinner> 208 209 </LinearLayout> 210 211 <LinearLayout 212 android:layout_width="wrap_content" 213 android:layout_height="wrap_content" 214 android:layout_marginStart="16dip" 215 android:layout_marginEnd="16dip" 216 android:orientation="vertical"> 217 218 <!-- Pages --> 219 220 <TextView 221 android:id="@+id/page_range_title" 222 android:layout_width="wrap_content" 223 android:layout_height="wrap_content" 224 android:layout_marginTop="8dip" 225 android:layout_marginStart="12dip" 226 android:textAppearance="?android:attr/textAppearanceSmall" 227 android:text="@string/pages_range_example" 228 android:labelFor="@+id/page_range_edittext" 229 android:textAllCaps="false" 230 android:visibility="visible"> 231 </TextView> 232 233 <com.android.printspooler.widget.CustomErrorEditText 234 android:id="@+id/page_range_edittext" 235 android:layout_width="fill_parent" 236 android:layout_height="wrap_content" 237 android:layout_gravity="bottom|fill_horizontal" 238 android:layout_marginStart="8dip" 239 android:singleLine="true" 240 android:ellipsize="end" 241 android:visibility="visible" 242 android:inputType="textNoSuggestions" 243 android:digits="0123456789 ,-"> 244 </com.android.printspooler.widget.CustomErrorEditText> 245 246 </LinearLayout> 247 248 </com.android.printspooler.widget.PrintOptionsLayout> 249 250 <!-- More options --> 251 252 <Button 253 android:id="@+id/more_options_button" 254 style="?android:attr/borderlessButtonStyle" 255 android:textColor="?android:attr/textColorPrimary" 256 android:layout_width="wrap_content" 257 android:layout_height="wrap_content" 258 android:layout_marginStart="16dip" 259 android:layout_marginEnd="16dip" 260 android:text="@string/more_options_button" 261 android:gravity="start|center_vertical"> 262 </Button> 263 264 </LinearLayout> 265 266 <!-- Expand/collapse handle --> 267 268 <FrameLayout 269 android:id="@+id/expand_collapse_handle" 270 android:layout_width="fill_parent" 271 android:layout_height="wrap_content"> 272 273 <ImageView 274 android:id="@+id/expand_collapse_icon" 275 android:layout_width="wrap_content" 276 android:layout_height="wrap_content" 277 android:layout_marginTop="0dip" 278 android:layout_marginBottom="4dip" 279 android:layout_gravity="center" 280 android:background="@drawable/ic_expand_more"> 281 </ImageView> 282 283 </FrameLayout> 284 285</LinearLayout> 286 287