manga_info_header.xml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  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="wrap_content"
  7. android:orientation="vertical"
  8. tools:context=".ui.browse.source.browse.BrowseSourceController">
  9. <ImageView
  10. android:id="@+id/backdrop"
  11. android:layout_width="0dp"
  12. android:layout_height="0dp"
  13. android:layout_marginBottom="-32dp"
  14. android:alpha="0.2"
  15. android:scaleType="centerCrop"
  16. app:layout_constraintBottom_toBottomOf="@+id/manga_cover"
  17. app:layout_constraintEnd_toEndOf="parent"
  18. app:layout_constraintStart_toStartOf="parent"
  19. app:layout_constraintTop_toTopOf="parent"
  20. tools:background="@mipmap/ic_launcher"
  21. tools:ignore="ContentDescription" />
  22. <View
  23. android:id="@+id/backdrop_overlay"
  24. android:layout_width="match_parent"
  25. android:layout_height="0dp"
  26. android:background="@drawable/manga_backdrop_gradient"
  27. android:backgroundTint="?android:attr/colorBackground"
  28. app:layout_constraintBottom_toBottomOf="@+id/backdrop"
  29. app:layout_constraintTop_toTopOf="parent" />
  30. <androidx.constraintlayout.widget.Barrier
  31. android:id="@+id/manga_cover_barrier"
  32. android:layout_width="wrap_content"
  33. android:layout_height="wrap_content"
  34. app:barrierDirection="top"
  35. app:barrierMargin="16dp"
  36. app:constraint_referenced_ids="manga_cover"
  37. app:layout_constraintTop_toTopOf="@id/manga_cover" />
  38. <ImageView
  39. android:id="@+id/manga_cover"
  40. android:layout_width="100dp"
  41. android:layout_height="0dp"
  42. android:layout_marginStart="16dp"
  43. android:layout_marginTop="16dp"
  44. android:background="@drawable/rounded_rectangle"
  45. android:contentDescription="@string/description_cover"
  46. android:maxWidth="100dp"
  47. android:scaleType="centerCrop"
  48. app:layout_constraintDimensionRatio="w,3:2"
  49. app:layout_constraintStart_toStartOf="parent"
  50. app:layout_constraintTop_toTopOf="parent"
  51. tools:layout_height="133dp"
  52. tools:src="@mipmap/ic_launcher" />
  53. <LinearLayout
  54. android:id="@+id/manga_detail"
  55. android:layout_width="0dp"
  56. android:layout_height="wrap_content"
  57. android:layout_marginStart="16dp"
  58. android:layout_marginEnd="16dp"
  59. android:gravity="center_vertical"
  60. android:orientation="vertical"
  61. app:layout_constraintTop_toTopOf="@id/manga_cover_barrier"
  62. app:layout_constraintBottom_toBottomOf="@id/manga_info_barrier"
  63. app:layout_constraintEnd_toEndOf="parent"
  64. app:layout_constraintStart_toEndOf="@+id/manga_cover">
  65. <TextView
  66. android:id="@+id/manga_full_title"
  67. style="@style/TextAppearance.Medium.Title"
  68. android:layout_width="match_parent"
  69. android:layout_height="wrap_content"
  70. android:textIsSelectable="false"
  71. android:text="@string/manga_info_full_title_label"
  72. app:autoSizeMaxTextSize="20sp"
  73. app:autoSizeMinTextSize="12sp"
  74. app:autoSizeStepGranularity="2sp"
  75. app:autoSizeTextType="uniform" />
  76. <TextView
  77. android:id="@+id/manga_author"
  78. style="@style/TextAppearance.Regular.Body1.Secondary.Bold"
  79. android:layout_width="wrap_content"
  80. android:layout_height="wrap_content"
  81. android:layout_marginTop="4dp"
  82. android:textIsSelectable="false"
  83. tools:text="Author" />
  84. <TextView
  85. android:id="@+id/manga_artist"
  86. style="@style/TextAppearance.Regular.Body1.Secondary.Bold"
  87. android:layout_width="wrap_content"
  88. android:layout_height="wrap_content"
  89. android:layout_marginTop="2dp"
  90. android:textIsSelectable="false"
  91. tools:text="Artist" />
  92. <LinearLayout
  93. android:id="@+id/manga_status_row"
  94. android:layout_width="wrap_content"
  95. android:layout_height="wrap_content"
  96. android:layout_marginTop="4dp">
  97. <TextView
  98. android:id="@+id/manga_status"
  99. style="@style/TextAppearance.Regular.Body1.Secondary"
  100. android:layout_width="wrap_content"
  101. android:layout_height="match_parent"
  102. android:ellipsize="end"
  103. android:maxLines="1"
  104. android:textIsSelectable="false"
  105. tools:text="Status" />
  106. <TextView
  107. style="@style/TextAppearance.Regular.Body1.Secondary"
  108. android:layout_width="wrap_content"
  109. android:layout_height="wrap_content"
  110. android:layout_marginStart="4dp"
  111. android:layout_marginEnd="4dp"
  112. android:text="•"
  113. android:textIsSelectable="false"
  114. tools:ignore="HardcodedText" />
  115. <TextView
  116. android:id="@+id/manga_source"
  117. style="@style/TextAppearance.Regular.Body1.Secondary"
  118. android:layout_width="wrap_content"
  119. android:layout_height="wrap_content"
  120. android:ellipsize="end"
  121. android:maxLines="1"
  122. android:textIsSelectable="false"
  123. tools:text="Source" />
  124. </LinearLayout>
  125. </LinearLayout>
  126. <androidx.constraintlayout.widget.Barrier
  127. android:id="@+id/manga_info_barrier"
  128. android:layout_width="wrap_content"
  129. android:layout_height="wrap_content"
  130. app:barrierDirection="bottom"
  131. app:constraint_referenced_ids="manga_cover,manga_detail" />
  132. <LinearLayout
  133. android:id="@+id/manga_actions"
  134. android:layout_width="0dp"
  135. android:layout_height="wrap_content"
  136. android:layout_marginStart="16dp"
  137. android:layout_marginEnd="16dp"
  138. android:layout_marginTop="4dp"
  139. android:orientation="horizontal"
  140. app:layout_constraintEnd_toEndOf="parent"
  141. app:layout_constraintStart_toStartOf="parent"
  142. app:layout_constraintTop_toBottomOf="@id/manga_info_barrier">
  143. <com.google.android.material.button.MaterialButton
  144. android:id="@+id/btn_favorite"
  145. style="@style/Widget.Tachiyomi.Button.ActionButton"
  146. android:layout_width="0dp"
  147. android:layout_height="wrap_content"
  148. android:layout_weight="1"
  149. android:text="@string/add_to_library"
  150. app:icon="@drawable/ic_favorite_border_24dp" />
  151. <com.google.android.material.button.MaterialButton
  152. android:id="@+id/btn_tracking"
  153. style="@style/Widget.Tachiyomi.Button.ActionButton"
  154. android:layout_width="0dp"
  155. android:layout_height="wrap_content"
  156. android:layout_weight="1"
  157. android:text="@string/manga_tracking_tab"
  158. android:visibility="gone"
  159. app:icon="@drawable/ic_sync_24dp"
  160. tools:visibility="visible" />
  161. <com.google.android.material.button.MaterialButton
  162. android:id="@+id/btn_webview"
  163. style="@style/Widget.Tachiyomi.Button.ActionButton"
  164. android:layout_width="0dp"
  165. android:layout_height="wrap_content"
  166. android:layout_weight="1"
  167. android:text="@string/action_web_view"
  168. android:visibility="gone"
  169. app:icon="@drawable/ic_public_24dp"
  170. tools:visibility="visible" />
  171. </LinearLayout>
  172. <androidx.constraintlayout.motion.widget.MotionLayout
  173. android:id="@+id/manga_summary_section"
  174. android:layout_width="match_parent"
  175. android:layout_height="wrap_content"
  176. app:layout_constraintEnd_toEndOf="parent"
  177. app:layout_constraintStart_toStartOf="parent"
  178. app:layout_constraintTop_toBottomOf="@id/manga_actions"
  179. app:layoutDescription="@xml/manga_summary_section_scene">
  180. <TextView
  181. android:id="@+id/manga_summary_text"
  182. style="@style/TextAppearance.Regular.Body1.Secondary"
  183. android:layout_width="0dp"
  184. android:layout_height="wrap_content"
  185. android:layout_marginTop="8dp"
  186. android:layout_marginEnd="16dp"
  187. android:layout_marginStart="16dp"
  188. android:clickable="true"
  189. android:focusable="true"
  190. android:maxLines="3"
  191. android:ellipsize="end"
  192. android:textIsSelectable="false"
  193. app:layout_constraintStart_toStartOf="parent"
  194. app:layout_constraintTop_toBottomOf="@+id/manga_cover"
  195. tools:text="Collapsed summary content Collapsed summary content Collapsed summary content Collapsed summary content Collapsed summary content Collapsed summary content" />
  196. <View
  197. android:id="@+id/manga_info_scrim"
  198. android:layout_width="0dp"
  199. android:layout_height="32sp"
  200. android:background="@drawable/manga_info_gradient"
  201. android:backgroundTint="?android:attr/colorBackground"
  202. app:layout_constraintBottom_toBottomOf="@+id/manga_summary_text"
  203. app:layout_constraintEnd_toEndOf="@+id/manga_summary_text"
  204. app:layout_constraintStart_toStartOf="@+id/manga_summary_text" />
  205. <View
  206. android:id="@+id/manga_info_toggle_more_scrim"
  207. android:layout_width="36sp"
  208. android:layout_height="18sp"
  209. android:background="@drawable/manga_info_more_gradient"
  210. android:backgroundTint="?android:attr/colorBackground"
  211. app:layout_constraintBottom_toBottomOf="@+id/manga_summary_text"
  212. app:layout_constraintEnd_toEndOf="@+id/manga_info_toggle_more"
  213. app:layout_constraintStart_toStartOf="@+id/manga_info_toggle_more" />
  214. <com.google.android.material.button.MaterialButton
  215. android:id="@+id/manga_info_toggle_more"
  216. style="@style/Widget.Tachiyomi.Button.InlineButton"
  217. android:layout_width="wrap_content"
  218. android:layout_height="wrap_content"
  219. android:background="@drawable/ic_expand_more_24dp"
  220. android:backgroundTint="?android:attr/textColorPrimary"
  221. app:layout_constraintBottom_toBottomOf="@+id/manga_info_toggle_more"
  222. app:layout_constraintEnd_toEndOf="@+id/manga_info_toggle_more"
  223. app:layout_constraintStart_toStartOf="@+id/manga_info_toggle_more" />
  224. <com.google.android.material.button.MaterialButton
  225. android:id="@+id/manga_info_toggle_less"
  226. style="@style/Widget.Tachiyomi.Button.InlineButton"
  227. android:layout_width="wrap_content"
  228. android:layout_height="wrap_content"
  229. android:background="@drawable/ic_expand_less_24dp"
  230. android:backgroundTint="?android:attr/textColorPrimary"
  231. android:paddingStart="8dp"
  232. android:paddingEnd="8dp"
  233. android:visibility="gone"
  234. app:layout_constraintEnd_toEndOf="parent"
  235. app:layout_constraintStart_toStartOf="parent"
  236. app:layout_constraintTop_toBottomOf="@+id/manga_summary_text"
  237. tools:visibility="gone" />
  238. <HorizontalScrollView
  239. android:id="@+id/manga_genres_tags_compact"
  240. android:layout_width="match_parent"
  241. android:layout_height="wrap_content"
  242. android:requiresFadingEdge="horizontal"
  243. android:scrollbars="none"
  244. app:layout_constraintEnd_toEndOf="parent"
  245. app:layout_constraintStart_toStartOf="parent"
  246. app:layout_constraintTop_toBottomOf="@+id/manga_info_toggle_more">
  247. <com.google.android.material.chip.ChipGroup
  248. android:id="@+id/manga_genres_tags_compact_chips"
  249. android:layout_width="wrap_content"
  250. android:layout_height="wrap_content"
  251. android:paddingStart="16dp"
  252. android:paddingTop="8dp"
  253. android:paddingEnd="16dp"
  254. android:paddingBottom="8dp"
  255. app:chipSpacingHorizontal="4dp"
  256. app:singleLine="true" />
  257. </HorizontalScrollView>
  258. <com.google.android.material.chip.ChipGroup
  259. android:id="@+id/manga_genres_tags_full_chips"
  260. android:layout_width="match_parent"
  261. android:layout_height="wrap_content"
  262. android:layout_marginStart="16dp"
  263. android:layout_marginEnd="16dp"
  264. android:paddingTop="8dp"
  265. android:paddingBottom="8dp"
  266. android:visibility="gone"
  267. app:chipSpacingHorizontal="4dp"
  268. app:layout_constraintEnd_toEndOf="parent"
  269. app:layout_constraintStart_toStartOf="parent"
  270. app:layout_constraintTop_toBottomOf="@+id/manga_info_toggle_less"
  271. tools:visibility="gone" />
  272. </androidx.constraintlayout.motion.widget.MotionLayout>
  273. </androidx.constraintlayout.widget.ConstraintLayout>