source_comfortable_grid_item.xml 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FrameLayout 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:layout_margin="2dp"
  8. android:background="@drawable/library_item_selector"
  9. android:foreground="@drawable/library_item_selector_overlay"
  10. android:padding="4dp">
  11. <androidx.constraintlayout.widget.ConstraintLayout
  12. android:layout_width="match_parent"
  13. android:layout_height="wrap_content">
  14. <FrameLayout
  15. android:id="@+id/card"
  16. android:layout_width="match_parent"
  17. android:layout_height="220dp"
  18. android:background="@drawable/rounded_rectangle"
  19. app:layout_constraintEnd_toEndOf="parent"
  20. app:layout_constraintStart_toStartOf="parent"
  21. app:layout_constraintTop_toTopOf="parent">
  22. <ImageView
  23. android:id="@+id/thumbnail"
  24. android:layout_width="match_parent"
  25. android:layout_height="match_parent"
  26. android:background="?attr/colorSurface"
  27. android:scaleType="centerCrop"
  28. tools:ignore="ContentDescription"
  29. tools:src="@mipmap/ic_launcher" />
  30. <include
  31. android:id="@+id/badges"
  32. layout="@layout/source_grid_item_badges" />
  33. <com.google.android.material.progressindicator.CircularProgressIndicator
  34. android:id="@+id/progress"
  35. style="@style/Widget.Tachiyomi.CircularProgressIndicator.Small"
  36. android:layout_width="wrap_content"
  37. android:layout_height="wrap_content"
  38. android:layout_gravity="center"
  39. android:indeterminate="true"
  40. android:visibility="gone" />
  41. </FrameLayout>
  42. <TextView
  43. android:id="@+id/title"
  44. android:layout_width="match_parent"
  45. android:layout_height="wrap_content"
  46. android:ellipsize="end"
  47. android:maxLines="2"
  48. android:padding="4dp"
  49. android:textAppearance="?attr/textAppearanceTitleSmall"
  50. android:textSize="12sp"
  51. android:textColor="@color/source_comfortable_item_title"
  52. app:layout_constraintStart_toStartOf="parent"
  53. app:layout_constraintTop_toBottomOf="@+id/card"
  54. tools:text="Sample name" />
  55. </androidx.constraintlayout.widget.ConstraintLayout>
  56. </FrameLayout>