item_remote_book.xml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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. <io.legado.app.ui.widget.image.CoverImageView
  8. android:id="@+id/iv_cover"
  9. android:layout_width="80dp"
  10. android:layout_height="110dp"
  11. android:layout_margin="8dp"
  12. android:contentDescription="@string/img_cover"
  13. android:scaleType="centerCrop"
  14. android:src="@drawable/image_cover_default"
  15. android:transitionName="img_cover"
  16. app:layout_constraintBottom_toBottomOf="parent"
  17. app:layout_constraintLeft_toLeftOf="parent"
  18. app:layout_constraintTop_toTopOf="parent"
  19. tools:ignore="UnusedAttribute" />
  20. <TextView
  21. android:id="@+id/tv_name"
  22. android:layout_width="0dp"
  23. android:layout_height="wrap_content"
  24. android:layout_margin="8dp"
  25. android:text="@string/app_name"
  26. android:textColor="@color/primaryText"
  27. android:textSize="16sp"
  28. app:layout_constraintStart_toEndOf="@+id/iv_cover"
  29. app:layout_constraintTop_toTopOf="parent" />
  30. <LinearLayout
  31. android:id="@+id/ll_info"
  32. android:layout_width="wrap_content"
  33. android:layout_height="0dp"
  34. android:layout_marginTop="8dp"
  35. android:gravity="top"
  36. android:orientation="horizontal"
  37. app:layout_constraintLeft_toLeftOf="@+id/tv_name"
  38. app:layout_constraintTop_toBottomOf="@+id/tv_name">
  39. <TextView
  40. android:id="@+id/tv_size"
  41. android:layout_width="match_parent"
  42. android:layout_height="wrap_content"
  43. android:ellipsize="end"
  44. android:lines="1"
  45. android:textColor="@color/tv_text_summary"
  46. android:textSize="13sp"
  47. tools:text="128kb" />
  48. <TextView
  49. android:layout_width="match_parent"
  50. android:layout_height="wrap_content"
  51. android:ellipsize="end"
  52. android:lines="1"
  53. android:text="@string/separator"
  54. android:textColor="@color/tv_text_summary"
  55. android:textSize="11sp" />
  56. <TextView
  57. android:id="@+id/tv_date"
  58. android:layout_width="match_parent"
  59. android:layout_height="wrap_content"
  60. android:ellipsize="end"
  61. android:lines="1"
  62. android:textColor="@color/tv_text_summary"
  63. android:textSize="13sp"
  64. tools:text="2022-12-7" />
  65. </LinearLayout>
  66. <io.legado.app.ui.widget.text.AccentBgTextView
  67. android:id="@+id/tv_content_type"
  68. android:layout_width="wrap_content"
  69. android:layout_height="wrap_content"
  70. android:layout_marginTop="8dp"
  71. android:layout_marginRight="15dp"
  72. android:maxWidth="50dp"
  73. android:maxLines="1"
  74. android:paddingStart="5dp"
  75. android:paddingEnd="5dp"
  76. android:text="TXT"
  77. app:layout_constraintLeft_toLeftOf="@+id/tv_name"
  78. app:layout_constraintTop_toBottomOf="@id/ll_info"
  79. app:radius="2dp"
  80. tools:ignore="HardcodedText,RtlHardcoded" />
  81. <LinearLayout
  82. android:layout_width="wrap_content"
  83. android:layout_height="match_parent"
  84. android:layout_margin="8dp"
  85. android:orientation="vertical"
  86. app:layout_constraintBottom_toBottomOf="parent"
  87. app:layout_constraintRight_toRightOf="parent"
  88. app:layout_constraintTop_toTopOf="parent">
  89. <io.legado.app.ui.widget.text.AccentStrokeTextView
  90. android:id="@+id/btn_download"
  91. android:layout_width="wrap_content"
  92. android:layout_height="wrap_content"
  93. android:layout_margin="8dp"
  94. android:padding="8dp"
  95. android:text="@string/nb_file_add_shelf"
  96. tools:text="加入书架" />
  97. </LinearLayout>
  98. </androidx.constraintlayout.widget.ConstraintLayout>