reader_settings_sheet.xml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:app="http://schemas.android.com/apk/res-auto"
  4. xmlns:tools="http://schemas.android.com/tools"
  5. android:layout_width="match_parent"
  6. android:layout_height="match_parent"
  7. android:clipToPadding="false"
  8. android:orientation="vertical"
  9. android:paddingStart="24dp"
  10. android:paddingTop="0dp"
  11. android:paddingEnd="24dp"
  12. android:paddingBottom="24dp">
  13. <ImageView
  14. android:id="@id/pull_up_bar"
  15. android:layout_width="wrap_content"
  16. android:layout_height="24dp"
  17. android:alpha="0.5"
  18. android:scaleType="fitCenter"
  19. android:src="@drawable/ic_drag_pill_24dp"
  20. android:tint="?attr/colorOnBackground"
  21. app:layout_constraintEnd_toEndOf="parent"
  22. app:layout_constraintStart_toStartOf="parent"
  23. app:layout_constraintTop_toTopOf="parent" />
  24. <android.widget.Space
  25. android:id="@+id/spinner_end"
  26. android:layout_width="16dp"
  27. android:layout_height="0dp"
  28. app:layout_constraintStart_toEndOf="parent" />
  29. <!-- Series-specific preferences -->
  30. <TextView
  31. android:id="@+id/series_prefs"
  32. android:layout_width="0dp"
  33. android:layout_height="wrap_content"
  34. android:text="@string/pref_category_for_this_series"
  35. android:textColor="?attr/colorAccent"
  36. android:textStyle="bold"
  37. app:layout_constraintStart_toStartOf="parent"
  38. app:layout_constraintTop_toBottomOf="@+id/pull_up_bar" />
  39. <TextView
  40. android:id="@+id/viewer_text"
  41. android:layout_width="0dp"
  42. android:layout_height="wrap_content"
  43. android:text="@string/viewer"
  44. app:layout_constraintBaseline_toBaselineOf="@id/viewer"
  45. app:layout_constraintEnd_toStartOf="@id/verticalcenter"
  46. app:layout_constraintStart_toStartOf="parent" />
  47. <androidx.appcompat.widget.AppCompatSpinner
  48. android:id="@+id/viewer"
  49. android:layout_width="0dp"
  50. android:layout_height="24dp"
  51. android:layout_marginTop="20dp"
  52. android:entries="@array/viewers_selector"
  53. app:layout_constraintEnd_toEndOf="@id/spinner_end"
  54. app:layout_constraintStart_toEndOf="@id/verticalcenter"
  55. app:layout_constraintTop_toBottomOf="@id/series_prefs" />
  56. <!-- General preferences -->
  57. <TextView
  58. android:id="@+id/general_prefs"
  59. android:layout_width="0dp"
  60. android:layout_height="wrap_content"
  61. android:layout_marginTop="32dp"
  62. android:text="@string/pref_category_general"
  63. android:textColor="?attr/colorAccent"
  64. android:textStyle="bold"
  65. app:layout_constraintStart_toStartOf="parent"
  66. app:layout_constraintTop_toBottomOf="@+id/viewer" />
  67. <TextView
  68. android:id="@+id/rotation_mode_text"
  69. android:layout_width="0dp"
  70. android:layout_height="wrap_content"
  71. android:layout_marginTop="20dp"
  72. android:text="@string/pref_rotation_type"
  73. app:layout_constraintBaseline_toBaselineOf="@id/rotation_mode"
  74. app:layout_constraintEnd_toStartOf="@id/verticalcenter"
  75. app:layout_constraintStart_toStartOf="parent" />
  76. <androidx.appcompat.widget.AppCompatSpinner
  77. android:id="@+id/rotation_mode"
  78. android:layout_width="0dp"
  79. android:layout_height="wrap_content"
  80. android:layout_marginTop="20dp"
  81. android:entries="@array/rotation_type"
  82. app:layout_constraintEnd_toEndOf="@id/spinner_end"
  83. app:layout_constraintStart_toEndOf="@id/verticalcenter"
  84. app:layout_constraintTop_toBottomOf="@id/general_prefs" />
  85. <TextView
  86. android:id="@+id/background_color_text"
  87. android:layout_width="0dp"
  88. android:layout_height="wrap_content"
  89. android:text="@string/pref_reader_theme"
  90. app:layout_constraintBaseline_toBaselineOf="@id/background_color"
  91. app:layout_constraintEnd_toStartOf="@id/background_color"
  92. app:layout_constraintStart_toStartOf="parent" />
  93. <androidx.appcompat.widget.AppCompatSpinner
  94. android:id="@+id/background_color"
  95. android:layout_width="0dp"
  96. android:layout_height="wrap_content"
  97. android:layout_marginTop="20dp"
  98. android:entries="@array/reader_themes"
  99. app:layout_constraintEnd_toEndOf="@id/spinner_end"
  100. app:layout_constraintStart_toEndOf="@id/verticalcenter"
  101. app:layout_constraintTop_toBottomOf="@id/rotation_mode" />
  102. <com.google.android.material.switchmaterial.SwitchMaterial
  103. android:id="@+id/show_page_number"
  104. android:layout_width="match_parent"
  105. android:layout_height="wrap_content"
  106. android:layout_marginTop="10dp"
  107. android:text="@string/pref_show_page_number"
  108. android:textColor="?android:attr/textColorSecondary"
  109. app:layout_constraintTop_toBottomOf="@id/background_color" />
  110. <com.google.android.material.switchmaterial.SwitchMaterial
  111. android:id="@+id/fullscreen"
  112. android:layout_width="match_parent"
  113. android:layout_height="wrap_content"
  114. android:text="@string/pref_fullscreen"
  115. android:textColor="?android:attr/textColorSecondary"
  116. app:layout_constraintTop_toBottomOf="@id/show_page_number" />
  117. <com.google.android.material.switchmaterial.SwitchMaterial
  118. android:id="@+id/cutout_short"
  119. android:layout_width="match_parent"
  120. android:layout_height="wrap_content"
  121. android:text="@string/pref_cutout_short"
  122. android:textColor="?android:attr/textColorSecondary"
  123. app:layout_constraintTop_toBottomOf="@id/fullscreen" />
  124. <com.google.android.material.switchmaterial.SwitchMaterial
  125. android:id="@+id/keepscreen"
  126. android:layout_width="match_parent"
  127. android:layout_height="wrap_content"
  128. android:text="@string/pref_keep_screen_on"
  129. android:textColor="?android:attr/textColorSecondary"
  130. app:layout_constraintTop_toBottomOf="@id/cutout_short" />
  131. <com.google.android.material.switchmaterial.SwitchMaterial
  132. android:id="@+id/long_tap"
  133. android:layout_width="match_parent"
  134. android:layout_height="wrap_content"
  135. android:text="@string/pref_read_with_long_tap"
  136. android:textColor="?android:attr/textColorSecondary"
  137. app:layout_constraintTop_toBottomOf="@id/keepscreen" />
  138. <com.google.android.material.switchmaterial.SwitchMaterial
  139. android:id="@+id/true_color"
  140. android:layout_width="match_parent"
  141. android:layout_height="wrap_content"
  142. android:text="@string/pref_true_color"
  143. android:textColor="?android:attr/textColorSecondary"
  144. android:visibility="gone"
  145. app:layout_constraintTop_toBottomOf="@id/long_tap"
  146. tools:visibility="visible" />
  147. <com.google.android.material.switchmaterial.SwitchMaterial
  148. android:id="@+id/always_show_chapter_transition"
  149. android:layout_width="match_parent"
  150. android:layout_height="wrap_content"
  151. android:text="@string/pref_always_show_chapter_transition"
  152. android:textColor="?android:attr/textColorSecondary"
  153. app:layout_constraintTop_toBottomOf="@id/true_color" />
  154. <android.widget.Space
  155. android:id="@+id/end_general_preferences"
  156. android:layout_width="0dp"
  157. android:layout_height="0dp"
  158. app:layout_constraintBottom_toBottomOf="@id/always_show_chapter_transition" />
  159. <!-- Pager preferences -->
  160. <TextView
  161. android:id="@+id/pager_prefs"
  162. android:layout_width="0dp"
  163. android:layout_height="wrap_content"
  164. android:layout_marginTop="24dp"
  165. android:text="@string/pager_viewer"
  166. android:textColor="?attr/colorAccent"
  167. android:textStyle="bold"
  168. app:layout_constraintStart_toStartOf="parent"
  169. app:layout_constraintTop_toBottomOf="@id/end_general_preferences" />
  170. <TextView
  171. android:id="@+id/scale_type_text"
  172. android:layout_width="0dp"
  173. android:layout_height="wrap_content"
  174. android:text="@string/pref_image_scale_type"
  175. app:layout_constraintBaseline_toBaselineOf="@id/scale_type"
  176. app:layout_constraintEnd_toStartOf="@id/verticalcenter"
  177. app:layout_constraintStart_toStartOf="parent" />
  178. <androidx.appcompat.widget.AppCompatSpinner
  179. android:id="@+id/scale_type"
  180. android:layout_width="0dp"
  181. android:layout_height="wrap_content"
  182. android:layout_marginTop="20dp"
  183. android:entries="@array/image_scale_type"
  184. app:layout_constraintEnd_toEndOf="@id/spinner_end"
  185. app:layout_constraintStart_toEndOf="@id/verticalcenter"
  186. app:layout_constraintTop_toBottomOf="@id/pager_prefs" />
  187. <TextView
  188. android:id="@+id/zoom_start_text"
  189. android:layout_width="0dp"
  190. android:layout_height="wrap_content"
  191. android:text="@string/pref_zoom_start"
  192. app:layout_constraintBaseline_toBaselineOf="@id/zoom_start"
  193. app:layout_constraintEnd_toStartOf="@id/verticalcenter"
  194. app:layout_constraintStart_toStartOf="parent" />
  195. <androidx.appcompat.widget.AppCompatSpinner
  196. android:id="@+id/zoom_start"
  197. android:layout_width="0dp"
  198. android:layout_height="wrap_content"
  199. android:layout_marginTop="20dp"
  200. android:entries="@array/zoom_start"
  201. app:layout_constraintEnd_toEndOf="@id/spinner_end"
  202. app:layout_constraintStart_toEndOf="@id/verticalcenter"
  203. app:layout_constraintTop_toBottomOf="@id/scale_type" />
  204. <com.google.android.material.switchmaterial.SwitchMaterial
  205. android:id="@+id/crop_borders"
  206. android:layout_width="match_parent"
  207. android:layout_height="wrap_content"
  208. android:layout_marginTop="10dp"
  209. android:text="@string/pref_crop_borders"
  210. android:textColor="?android:attr/textColorSecondary"
  211. app:layout_constraintTop_toBottomOf="@id/zoom_start" />
  212. <com.google.android.material.switchmaterial.SwitchMaterial
  213. android:id="@+id/page_transitions"
  214. android:layout_width="match_parent"
  215. android:layout_height="wrap_content"
  216. android:text="@string/pref_page_transitions"
  217. android:textColor="?android:attr/textColorSecondary"
  218. app:layout_constraintTop_toBottomOf="@id/crop_borders" />
  219. <!-- Webtoon preferences -->
  220. <TextView
  221. android:id="@+id/webtoon_prefs"
  222. android:layout_width="0dp"
  223. android:layout_height="wrap_content"
  224. android:layout_marginTop="24dp"
  225. android:text="@string/webtoon_viewer"
  226. android:textColor="?attr/colorAccent"
  227. android:textStyle="bold"
  228. app:layout_constraintStart_toStartOf="parent"
  229. app:layout_constraintTop_toBottomOf="@id/end_general_preferences" />
  230. <com.google.android.material.switchmaterial.SwitchMaterial
  231. android:id="@+id/crop_borders_webtoon"
  232. android:layout_width="match_parent"
  233. android:layout_height="wrap_content"
  234. android:layout_marginTop="8dp"
  235. android:text="@string/pref_crop_borders"
  236. android:textColor="?android:attr/textColorSecondary"
  237. app:layout_constraintTop_toBottomOf="@id/webtoon_prefs" />
  238. <TextView
  239. android:id="@+id/webtoon_side_padding_text"
  240. android:layout_width="0dp"
  241. android:layout_height="wrap_content"
  242. android:text="@string/pref_webtoon_side_padding"
  243. app:layout_constraintBaseline_toBaselineOf="@id/webtoon_side_padding"
  244. app:layout_constraintLeft_toLeftOf="parent"
  245. app:layout_constraintRight_toLeftOf="@id/verticalcenter" />
  246. <androidx.appcompat.widget.AppCompatSpinner
  247. android:id="@+id/webtoon_side_padding"
  248. android:layout_width="0dp"
  249. android:layout_height="wrap_content"
  250. android:layout_marginTop="16dp"
  251. android:entries="@array/webtoon_side_padding"
  252. app:layout_constraintLeft_toRightOf="@id/verticalcenter"
  253. app:layout_constraintRight_toRightOf="@id/spinner_end"
  254. app:layout_constraintTop_toBottomOf="@id/crop_borders_webtoon" />
  255. <!-- Groups of preferences -->
  256. <androidx.constraintlayout.widget.Group
  257. android:id="@+id/pager_prefs_group"
  258. android:layout_width="wrap_content"
  259. android:layout_height="wrap_content"
  260. android:visibility="gone"
  261. app:constraint_referenced_ids="pager_prefs,scale_type_text,scale_type,zoom_start_text,zoom_start,crop_borders,page_transitions"
  262. tools:visibility="visible" />
  263. <androidx.constraintlayout.widget.Group
  264. android:id="@+id/webtoon_prefs_group"
  265. android:layout_width="wrap_content"
  266. android:layout_height="wrap_content"
  267. android:visibility="gone"
  268. app:constraint_referenced_ids="webtoon_prefs,crop_borders_webtoon,webtoon_side_padding_text,webtoon_side_padding" />
  269. <androidx.constraintlayout.widget.Guideline
  270. android:id="@+id/verticalcenter"
  271. android:layout_width="wrap_content"
  272. android:layout_height="wrap_content"
  273. android:orientation="vertical"
  274. app:layout_constraintGuide_percent="0.5" />
  275. </androidx.constraintlayout.widget.ConstraintLayout>