print_activity_controls.xml 11 KB

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