reader_settings_sheet.xml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <android.support.constraint.ConstraintLayout
  3. xmlns:android="http://schemas.android.com/apk/res/android"
  4. xmlns:app="http://schemas.android.com/apk/res-auto"
  5. xmlns:tools="http://schemas.android.com/tools"
  6. android:layout_width="match_parent"
  7. android:layout_height="match_parent"
  8. android:background="?android:colorBackground"
  9. android:clipToPadding="false"
  10. android:orientation="vertical"
  11. android:padding="@dimen/material_component_dialogs_padding_around_content_area">
  12. <!-- General preferences -->
  13. <TextView
  14. android:id="@+id/general_prefs"
  15. android:layout_width="0dp"
  16. android:layout_height="wrap_content"
  17. android:text="@string/pref_category_general"
  18. android:textColor="?attr/colorAccent"
  19. android:textStyle="bold"
  20. app:layout_constraintLeft_toLeftOf="parent"
  21. app:layout_constraintTop_toTopOf="parent" />
  22. <TextView
  23. android:id="@+id/pull_up_for_more"
  24. android:layout_width="wrap_content"
  25. android:layout_height="wrap_content"
  26. android:layout_marginLeft="16dp"
  27. android:text="Pull up for more options"
  28. android:textColor="?android:attr/textColorHint"
  29. app:layout_constraintLeft_toRightOf="@id/general_prefs"
  30. app:layout_constraintTop_toTopOf="@id/general_prefs" />
  31. <android.support.v4.widget.Space
  32. android:id="@+id/spinner_end"
  33. android:layout_width="16dp"
  34. android:layout_height="0dp"
  35. app:layout_constraintLeft_toRightOf="parent" />
  36. <TextView
  37. android:id="@+id/viewer_text"
  38. android:layout_width="0dp"
  39. android:layout_height="wrap_content"
  40. android:text="@string/viewer_for_this_series"
  41. app:layout_constraintLeft_toLeftOf="parent"
  42. app:layout_constraintRight_toLeftOf="@id/verticalcenter"
  43. app:layout_constraintBaseline_toBaselineOf="@id/viewer" />
  44. <android.support.v7.widget.AppCompatSpinner
  45. android:id="@+id/viewer"
  46. android:layout_width="0dp"
  47. android:layout_height="24dp"
  48. android:layout_marginTop="16dp"
  49. android:entries="@array/viewers_selector"
  50. app:layout_constraintTop_toBottomOf="@id/pull_up_for_more"
  51. app:layout_constraintLeft_toRightOf="@id/verticalcenter"
  52. app:layout_constraintRight_toRightOf="@id/spinner_end" />
  53. <TextView
  54. android:id="@+id/rotation_mode_text"
  55. android:layout_width="0dp"
  56. android:layout_height="wrap_content"
  57. android:layout_marginTop="16dp"
  58. android:text="@string/pref_rotation_type"
  59. app:layout_constraintLeft_toLeftOf="parent"
  60. app:layout_constraintRight_toLeftOf="@id/verticalcenter"
  61. app:layout_constraintBaseline_toBaselineOf="@id/rotation_mode" />
  62. <android.support.v7.widget.AppCompatSpinner
  63. android:id="@+id/rotation_mode"
  64. android:layout_width="0dp"
  65. android:layout_height="wrap_content"
  66. android:layout_marginTop="16dp"
  67. android:entries="@array/rotation_type"
  68. app:layout_constraintTop_toBottomOf="@id/viewer"
  69. app:layout_constraintLeft_toRightOf="@id/verticalcenter"
  70. app:layout_constraintRight_toRightOf="@id/spinner_end" />
  71. <TextView
  72. android:id="@+id/background_color_text"
  73. android:layout_width="0dp"
  74. android:layout_height="wrap_content"
  75. android:text="@string/pref_reader_theme"
  76. app:layout_constraintLeft_toLeftOf="parent"
  77. app:layout_constraintRight_toLeftOf="@id/background_color"
  78. app:layout_constraintBaseline_toBaselineOf="@id/background_color"/>
  79. <android.support.v7.widget.AppCompatSpinner
  80. android:id="@+id/background_color"
  81. android:layout_width="0dp"
  82. android:layout_height="wrap_content"
  83. android:layout_marginTop="16dp"
  84. android:entries="@array/reader_themes"
  85. app:layout_constraintTop_toBottomOf="@id/rotation_mode"
  86. app:layout_constraintLeft_toRightOf="@id/verticalcenter"
  87. app:layout_constraintRight_toRightOf="@id/spinner_end" />
  88. <android.support.v7.widget.SwitchCompat
  89. android:id="@+id/show_page_number"
  90. android:layout_width="match_parent"
  91. android:layout_height="wrap_content"
  92. android:layout_marginTop="16dp"
  93. android:text="@string/pref_show_page_number"
  94. android:textColor="?android:attr/textColorSecondary"
  95. app:layout_constraintTop_toBottomOf="@id/background_color" />
  96. <android.support.v7.widget.SwitchCompat
  97. android:id="@+id/fullscreen"
  98. android:layout_width="match_parent"
  99. android:layout_height="wrap_content"
  100. android:layout_marginTop="16dp"
  101. android:text="@string/pref_fullscreen"
  102. android:textColor="?android:attr/textColorSecondary"
  103. app:layout_constraintTop_toBottomOf="@id/show_page_number" />
  104. <android.support.v7.widget.SwitchCompat
  105. android:id="@+id/keepscreen"
  106. android:layout_width="match_parent"
  107. android:layout_height="wrap_content"
  108. android:layout_marginTop="16dp"
  109. android:text="@string/pref_keep_screen_on"
  110. android:textColor="?android:attr/textColorSecondary"
  111. app:layout_constraintTop_toBottomOf="@id/fullscreen" />
  112. <android.support.v7.widget.SwitchCompat
  113. android:id="@+id/long_tap"
  114. android:layout_width="match_parent"
  115. android:layout_height="wrap_content"
  116. android:layout_marginTop="16dp"
  117. android:text="@string/pref_read_with_long_tap"
  118. android:textColor="?android:attr/textColorSecondary"
  119. app:layout_constraintTop_toBottomOf="@id/keepscreen" />
  120. <android.support.v4.widget.Space
  121. android:id="@+id/end_general_preferences"
  122. android:layout_width="0dp"
  123. android:layout_height="0dp"
  124. app:layout_constraintBottom_toBottomOf="@id/long_tap" />
  125. <!-- Pager preferences -->
  126. <TextView
  127. android:id="@+id/pager_prefs"
  128. android:layout_width="0dp"
  129. android:layout_height="wrap_content"
  130. android:layout_marginTop="16dp"
  131. android:text="@string/pager_viewer"
  132. android:textColor="?attr/colorAccent"
  133. android:textStyle="bold"
  134. app:layout_constraintLeft_toLeftOf="parent"
  135. app:layout_constraintTop_toBottomOf="@id/end_general_preferences" />
  136. <TextView
  137. android:id="@+id/scale_type_text"
  138. android:layout_width="0dp"
  139. android:layout_height="wrap_content"
  140. android:text="@string/pref_image_scale_type"
  141. app:layout_constraintLeft_toLeftOf="parent"
  142. app:layout_constraintRight_toLeftOf="@id/verticalcenter"
  143. app:layout_constraintBaseline_toBaselineOf="@id/scale_type"/>
  144. <android.support.v7.widget.AppCompatSpinner
  145. android:id="@+id/scale_type"
  146. android:layout_width="0dp"
  147. android:layout_height="wrap_content"
  148. android:layout_marginTop="16dp"
  149. android:entries="@array/image_scale_type"
  150. app:layout_constraintLeft_toRightOf="@id/verticalcenter"
  151. app:layout_constraintRight_toRightOf="@id/spinner_end"
  152. app:layout_constraintTop_toBottomOf="@id/pager_prefs"/>
  153. <TextView
  154. android:id="@+id/zoom_start_text"
  155. android:layout_width="0dp"
  156. android:layout_height="wrap_content"
  157. android:text="@string/pref_zoom_start"
  158. app:layout_constraintLeft_toLeftOf="parent"
  159. app:layout_constraintRight_toLeftOf="@id/verticalcenter"
  160. app:layout_constraintBaseline_toBaselineOf="@id/zoom_start"/>
  161. <android.support.v7.widget.AppCompatSpinner
  162. android:id="@+id/zoom_start"
  163. android:layout_width="0dp"
  164. android:layout_height="wrap_content"
  165. android:entries="@array/zoom_start"
  166. android:layout_marginTop="16dp"
  167. app:layout_constraintTop_toBottomOf="@id/scale_type"
  168. app:layout_constraintLeft_toRightOf="@id/verticalcenter"
  169. app:layout_constraintRight_toRightOf="@id/spinner_end" />
  170. <android.support.v7.widget.SwitchCompat
  171. android:id="@+id/crop_borders"
  172. android:layout_width="match_parent"
  173. android:layout_height="wrap_content"
  174. android:layout_marginTop="16dp"
  175. android:text="@string/pref_crop_borders"
  176. android:textColor="?android:attr/textColorSecondary"
  177. app:layout_constraintTop_toBottomOf="@id/zoom_start" />
  178. <android.support.v7.widget.SwitchCompat
  179. android:id="@+id/page_transitions"
  180. android:layout_width="match_parent"
  181. android:layout_height="wrap_content"
  182. android:layout_marginTop="16dp"
  183. android:text="@string/pref_page_transitions"
  184. android:textColor="?android:attr/textColorSecondary"
  185. app:layout_constraintTop_toBottomOf="@id/crop_borders" />
  186. <!-- Webtoon preferences -->
  187. <TextView
  188. android:id="@+id/webtoon_prefs"
  189. android:layout_width="0dp"
  190. android:layout_height="wrap_content"
  191. android:layout_marginTop="16dp"
  192. android:text="@string/webtoon_viewer"
  193. android:textColor="?attr/colorAccent"
  194. android:textStyle="bold"
  195. app:layout_constraintLeft_toLeftOf="parent"
  196. app:layout_constraintTop_toBottomOf="@id/end_general_preferences" />
  197. <android.support.v7.widget.SwitchCompat
  198. android:id="@+id/crop_borders_webtoon"
  199. android:layout_width="match_parent"
  200. android:layout_height="wrap_content"
  201. android:layout_marginTop="16dp"
  202. android:text="@string/pref_crop_borders"
  203. android:textColor="?android:attr/textColorSecondary"
  204. app:layout_constraintTop_toBottomOf="@id/webtoon_prefs" />
  205. <!-- Groups of preferences -->
  206. <android.support.constraint.Group
  207. android:id="@+id/pager_prefs_group"
  208. android:layout_width="wrap_content"
  209. android:layout_height="wrap_content"
  210. android:visibility="gone"
  211. app:constraint_referenced_ids="pager_prefs,scale_type_text,scale_type,zoom_start_text,zoom_start,crop_borders,page_transitions"
  212. tools:visibility="visible" />
  213. <android.support.constraint.Group
  214. android:id="@+id/webtoon_prefs_group"
  215. android:layout_width="wrap_content"
  216. android:layout_height="wrap_content"
  217. android:visibility="gone"
  218. app:constraint_referenced_ids="webtoon_prefs,crop_borders_webtoon" />
  219. <android.support.constraint.Guideline
  220. android:id="@+id/verticalcenter"
  221. android:layout_width="wrap_content"
  222. android:layout_height="wrap_content"
  223. android:orientation="vertical"
  224. app:layout_constraintGuide_percent="0.5" />
  225. </android.support.constraint.ConstraintLayout>