track_item.xml 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <LinearLayout 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/track"
  6. android:layout_width="match_parent"
  7. android:layout_height="wrap_content"
  8. android:clipToPadding="false"
  9. android:orientation="vertical"
  10. android:paddingHorizontal="16dp"
  11. android:paddingVertical="8dp">
  12. <LinearLayout
  13. android:layout_width="match_parent"
  14. android:layout_height="wrap_content"
  15. android:gravity="center_vertical"
  16. android:orientation="horizontal">
  17. <com.google.android.material.card.MaterialCardView
  18. android:id="@+id/logo_container"
  19. android:layout_width="48dp"
  20. android:layout_height="48dp"
  21. app:cardBackgroundColor="#2E51A2"
  22. app:cardElevation="0dp"
  23. app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.MaterialCardView.Tracker">
  24. <ImageView
  25. android:id="@+id/track_logo"
  26. android:layout_width="match_parent"
  27. android:layout_height="match_parent"
  28. android:importantForAccessibility="no"
  29. android:padding="4dp"
  30. tools:src="@drawable/ic_tracker_mal" />
  31. </com.google.android.material.card.MaterialCardView>
  32. <LinearLayout
  33. android:layout_width="match_parent"
  34. android:layout_height="wrap_content"
  35. android:orientation="horizontal">
  36. <Button
  37. android:id="@+id/track_set"
  38. style="?attr/borderlessButtonStyle"
  39. android:layout_width="match_parent"
  40. android:layout_height="wrap_content"
  41. android:layout_gravity="center"
  42. android:layout_marginStart="16dp"
  43. android:text="@string/add_tracking"
  44. android:visibility="gone" />
  45. <TextView
  46. android:id="@+id/track_title"
  47. android:layout_width="0dp"
  48. android:layout_height="48dp"
  49. android:layout_weight="1"
  50. android:ellipsize="end"
  51. android:foreground="?attr/selectableItemBackgroundBorderless"
  52. android:gravity="center_vertical"
  53. android:maxLines="1"
  54. android:paddingHorizontal="16dp"
  55. android:textAppearance="?attr/textAppearanceSubtitle1"
  56. tools:text="Title" />
  57. <ImageButton
  58. android:id="@+id/more"
  59. android:layout_width="wrap_content"
  60. android:layout_height="wrap_content"
  61. android:layout_gravity="center_vertical"
  62. android:background="?selectableItemBackgroundBorderless"
  63. android:contentDescription="@string/label_more"
  64. android:padding="8dp"
  65. android:src="@drawable/ic_more_vert_24" />
  66. </LinearLayout>
  67. </LinearLayout>
  68. <com.google.android.material.card.MaterialCardView
  69. android:id="@+id/card"
  70. android:layout_width="match_parent"
  71. android:layout_height="wrap_content"
  72. android:layout_marginTop="8dp"
  73. app:shapeAppearanceOverlay="@style/ShapeAppearanceOverlay.MaterialCardView.Tracker">
  74. <LinearLayout
  75. android:layout_width="match_parent"
  76. android:layout_height="wrap_content"
  77. android:orientation="vertical"
  78. android:paddingHorizontal="12dp"
  79. android:paddingVertical="8dp">
  80. <LinearLayout
  81. android:id="@+id/middle_row"
  82. android:layout_width="match_parent"
  83. android:layout_height="wrap_content">
  84. <TextView
  85. android:id="@+id/track_status"
  86. android:layout_width="0dp"
  87. android:layout_height="wrap_content"
  88. android:layout_weight="1"
  89. android:ellipsize="end"
  90. android:foreground="?attr/selectableItemBackgroundBorderless"
  91. android:gravity="center"
  92. android:maxLines="1"
  93. android:padding="12dp"
  94. android:textAppearance="?attr/textAppearanceBody2"
  95. tools:text="Reading" />
  96. <View
  97. android:id="@+id/vert_divider_1"
  98. android:layout_width="1dp"
  99. android:layout_height="match_parent"
  100. android:background="?android:divider" />
  101. <TextView
  102. android:id="@+id/track_chapters"
  103. android:layout_width="0dp"
  104. android:layout_height="wrap_content"
  105. android:layout_weight="1"
  106. android:ellipsize="end"
  107. android:foreground="?attr/selectableItemBackgroundBorderless"
  108. android:gravity="center"
  109. android:maxLines="1"
  110. android:padding="12dp"
  111. android:textAppearance="?attr/textAppearanceBody2"
  112. tools:text="12/24" />
  113. <View
  114. android:id="@+id/vert_divider_2"
  115. android:layout_width="1dp"
  116. android:layout_height="match_parent"
  117. android:background="?android:divider" />
  118. <TextView
  119. android:id="@+id/track_score"
  120. android:layout_width="0dp"
  121. android:layout_height="wrap_content"
  122. android:layout_weight="1"
  123. android:ellipsize="end"
  124. android:foreground="?attr/selectableItemBackgroundBorderless"
  125. android:gravity="center"
  126. android:maxLines="1"
  127. android:padding="12dp"
  128. android:textAppearance="?attr/textAppearanceBody2"
  129. tools:text="10" />
  130. </LinearLayout>
  131. <View
  132. android:id="@+id/bottom_divider"
  133. android:layout_width="match_parent"
  134. android:layout_height="1dp"
  135. android:background="?android:divider" />
  136. <LinearLayout
  137. android:id="@+id/bottom_row"
  138. android:layout_width="match_parent"
  139. android:layout_height="wrap_content">
  140. <TextView
  141. android:id="@+id/track_start_date"
  142. android:layout_width="0dp"
  143. android:layout_height="wrap_content"
  144. android:layout_weight="1"
  145. android:ellipsize="end"
  146. android:foreground="?attr/selectableItemBackgroundBorderless"
  147. android:gravity="center"
  148. android:maxLines="1"
  149. android:padding="12dp"
  150. android:textAppearance="?attr/textAppearanceBody2"
  151. tools:text="4/16/2020" />
  152. <View
  153. android:id="@+id/vert_divider_3"
  154. android:layout_width="1dp"
  155. android:layout_height="match_parent"
  156. android:background="?android:divider" />
  157. <TextView
  158. android:id="@+id/track_finish_date"
  159. android:layout_width="0dp"
  160. android:layout_height="wrap_content"
  161. android:layout_weight="1"
  162. android:ellipsize="end"
  163. android:foreground="?attr/selectableItemBackgroundBorderless"
  164. android:gravity="center"
  165. android:maxLines="1"
  166. android:padding="12dp"
  167. android:textAppearance="?attr/textAppearanceBody2"
  168. tools:text="4/16/2020" />
  169. </LinearLayout>
  170. </LinearLayout>
  171. </com.google.android.material.card.MaterialCardView>
  172. </LinearLayout>