download_item.xml 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <com.google.android.material.card.MaterialCardView 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:id="@+id/container"
  6. android:layout_width="match_parent"
  7. android:layout_height="wrap_content"
  8. android:layout_marginTop="8dp"
  9. app:cardBackgroundColor="?android:attr/colorBackground"
  10. app:cardElevation="0dp"
  11. app:cardForegroundColor="@color/draggable_card_foreground">
  12. <androidx.constraintlayout.widget.ConstraintLayout
  13. android:layout_width="match_parent"
  14. android:layout_height="wrap_content">
  15. <ImageView
  16. android:id="@+id/reorder"
  17. android:layout_width="wrap_content"
  18. android:layout_height="wrap_content"
  19. android:layout_alignParentStart="true"
  20. android:layout_gravity="start"
  21. android:padding="16dp"
  22. android:scaleType="center"
  23. app:layout_constraintBottom_toBottomOf="parent"
  24. app:layout_constraintStart_toStartOf="parent"
  25. app:layout_constraintTop_toTopOf="parent"
  26. app:srcCompat="@drawable/ic_drag_handle_24dp"
  27. app:tint="?android:attr/textColorHint"
  28. tools:ignore="ContentDescription" />
  29. <TextView
  30. android:id="@+id/manga_full_title"
  31. android:layout_width="0dp"
  32. android:layout_height="wrap_content"
  33. android:layout_marginEnd="8dp"
  34. android:layout_toEndOf="@id/reorder"
  35. android:ellipsize="end"
  36. android:maxLines="1"
  37. android:textAppearance="@style/TextAppearance.Regular.Body1"
  38. app:layout_constraintEnd_toStartOf="@+id/download_progress_text"
  39. app:layout_constraintStart_toEndOf="@+id/reorder"
  40. app:layout_constraintTop_toTopOf="parent"
  41. tools:text="Manga title" />
  42. <TextView
  43. android:id="@+id/chapter_title"
  44. android:layout_width="0dp"
  45. android:layout_height="wrap_content"
  46. android:layout_marginTop="2dp"
  47. android:layout_marginEnd="8dp"
  48. android:layout_toEndOf="@id/reorder"
  49. android:ellipsize="end"
  50. android:maxLines="1"
  51. android:textAppearance="@style/TextAppearance.Regular.Caption"
  52. app:layout_constraintEnd_toStartOf="@+id/manga_source"
  53. app:layout_constraintStart_toStartOf="@+id/manga_full_title"
  54. app:layout_constraintTop_toBottomOf="@+id/manga_full_title"
  55. tools:text="Chapter Title" />
  56. <com.google.android.material.progressindicator.LinearProgressIndicator
  57. android:id="@+id/download_progress"
  58. android:layout_width="0dp"
  59. android:layout_height="wrap_content"
  60. android:layout_marginTop="8dp"
  61. android:layout_marginBottom="4dp"
  62. app:layout_constraintBottom_toBottomOf="parent"
  63. app:layout_constraintEnd_toStartOf="@+id/menu"
  64. app:layout_constraintStart_toEndOf="@+id/reorder"
  65. app:layout_constraintTop_toBottomOf="@+id/chapter_title" />
  66. <TextView
  67. android:id="@+id/download_progress_text"
  68. android:layout_width="wrap_content"
  69. android:layout_height="wrap_content"
  70. android:layout_toEndOf="@id/manga_full_title"
  71. android:maxLines="1"
  72. android:textAppearance="@style/TextAppearance.Regular.Caption.Hint"
  73. app:layout_constraintBottom_toBottomOf="@+id/manga_full_title"
  74. app:layout_constraintEnd_toStartOf="@+id/menu"
  75. app:layout_constraintTop_toTopOf="@+id/manga_full_title"
  76. tools:text="0/10" />
  77. <TextView
  78. android:id="@+id/manga_source"
  79. android:layout_width="wrap_content"
  80. android:layout_height="wrap_content"
  81. android:layout_toEndOf="@id/chapter_title"
  82. android:maxLines="1"
  83. android:textAppearance="@style/TextAppearance.Regular.Caption.Hint"
  84. app:layout_constraintBottom_toBottomOf="@+id/chapter_title"
  85. app:layout_constraintEnd_toStartOf="@+id/menu"
  86. app:layout_constraintTop_toTopOf="@+id/chapter_title"
  87. tools:text="Manga Source" />
  88. <ImageButton
  89. android:id="@+id/menu"
  90. android:layout_width="wrap_content"
  91. android:layout_height="wrap_content"
  92. android:layout_toEndOf="@id/download_progress_text"
  93. android:background="?attr/selectableItemBackgroundBorderless"
  94. android:contentDescription="@string/action_menu"
  95. android:paddingHorizontal="10dp"
  96. android:paddingVertical="16dp"
  97. app:layout_constraintBottom_toBottomOf="parent"
  98. app:layout_constraintEnd_toEndOf="parent"
  99. app:layout_constraintTop_toTopOf="parent"
  100. app:srcCompat="@drawable/ic_overflow_24dp"
  101. app:tint="?attr/colorOnBackground" />
  102. </androidx.constraintlayout.widget.ConstraintLayout>
  103. </com.google.android.material.card.MaterialCardView>