book.xml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:tools="http://schemas.android.com/tools"
  4. android:id="@+id/book_item_container"
  5. android:layout_width="match_parent"
  6. android:layout_height="72dp"
  7. android:foreground="?android:attr/selectableItemBackground">
  8. <ProgressBar
  9. android:id="@+id/book_progress"
  10. style="@style/Widget.AppCompat.ProgressBar.Horizontal"
  11. android:layout_width="match_parent"
  12. android:layout_height="2dp"
  13. android:layout_marginEnd="16dp"
  14. android:layout_marginStart="16dp"
  15. android:layout_marginTop="64dp"
  16. android:progressDrawable="@drawable/light_progress_bar_background"
  17. tools:progress="80" />
  18. <ImageView
  19. android:id="@+id/book_image"
  20. android:layout_width="40dp"
  21. android:layout_height="40dp"
  22. android:layout_gravity="center_vertical"
  23. android:layout_marginLeft="16dp"
  24. android:layout_marginStart="16dp"
  25. android:background="@drawable/rectangle_placeholder_background"
  26. tools:ignore="ContentDescription" />
  27. <LinearLayout
  28. android:layout_width="match_parent"
  29. android:layout_height="wrap_content"
  30. android:layout_gravity="center_vertical"
  31. android:orientation="vertical"
  32. android:paddingEnd="16dp"
  33. android:paddingLeft="72dp"
  34. android:paddingRight="16dp"
  35. android:paddingStart="72dp">
  36. <TextView
  37. android:id="@+id/book_title"
  38. android:layout_width="wrap_content"
  39. android:layout_height="wrap_content"
  40. android:ellipsize="end"
  41. android:maxLines="1"
  42. android:textColor="?android:attr/textColorPrimary"
  43. android:textSize="16sp"
  44. tools:text="Мастер и Маргарита" />
  45. <TextView
  46. android:id="@+id/book_author"
  47. android:layout_width="wrap_content"
  48. android:layout_height="wrap_content"
  49. android:ellipsize="end"
  50. android:maxLines="1"
  51. android:textColor="?android:attr/textColorSecondary"
  52. android:textSize="14sp"
  53. tools:text="Михаил Булгаков" />
  54. </LinearLayout>
  55. </FrameLayout>