manga_info_header.xml 12 KB

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