item_goods.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  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. android:layout_width="match_parent"
  5. android:layout_height="wrap_content">
  6. <androidx.cardview.widget.CardView
  7. android:id="@+id/cv_goods"
  8. android:layout_width="match_parent"
  9. android:layout_height="wrap_content"
  10. android:clickable="true"
  11. android:focusable="true"
  12. android:foreground="?android:attr/selectableItemBackground"
  13. app:cardCornerRadius="@dimen/height_indicator"
  14. app:cardElevation="@dimen/margin_sss"
  15. app:cardUseCompatPadding="true">
  16. <!--app:cardUseCompatPadding="true"解决角边阴影问题-->
  17. <LinearLayout
  18. android:layout_width="match_parent"
  19. android:layout_height="wrap_content"
  20. android:gravity="center_vertical"
  21. android:orientation="horizontal"
  22. android:padding="@dimen/margin_s">
  23. <androidx.appcompat.widget.AppCompatImageView
  24. android:id="@+id/aciv_goods"
  25. android:layout_width="@dimen/size_image_list"
  26. android:layout_height="@dimen/size_image_list"
  27. android:scaleType="center"
  28. android:src="@mipmap/logo_gray"/>
  29. <LinearLayout
  30. android:layout_width="match_parent"
  31. android:layout_height="wrap_content"
  32. android:layout_marginStart="@dimen/margin_s"
  33. android:minHeight="@dimen/size_image_list"
  34. android:orientation="vertical">
  35. <!--标题-->
  36. <TextView
  37. android:id="@+id/tv_title"
  38. android:layout_width="match_parent"
  39. android:layout_height="wrap_content"
  40. android:layout_marginBottom="@dimen/margin_ss"
  41. android:ellipsize="end"
  42. android:maxLines="2"
  43. android:textColor="@color/black"
  44. android:textSize="@dimen/text_normal_s" />
  45. <Space
  46. android:layout_width="wrap_content"
  47. android:layout_height="0dp"
  48. android:layout_weight="1" />
  49. <!--一句话推荐-->
  50. <TextView
  51. android:id="@+id/tv_reason"
  52. android:layout_width="wrap_content"
  53. android:layout_height="wrap_content"
  54. android:layout_marginBottom="@dimen/margin_ss"
  55. android:background="@drawable/shape_gray_tag"
  56. android:ellipsize="end"
  57. android:paddingStart="@dimen/margin_s"
  58. android:paddingTop="@dimen/padding_tag"
  59. android:paddingEnd="@dimen/margin_s"
  60. android:paddingBottom="@dimen/padding_tag"
  61. android:singleLine="true"
  62. android:textColor="@color/jd_gray_bg_text"
  63. android:textSize="@dimen/text_ss" />
  64. <Space
  65. android:layout_width="wrap_content"
  66. android:layout_height="0dp"
  67. android:layout_weight="1" />
  68. <!--价格-->
  69. <LinearLayout
  70. android:layout_width="match_parent"
  71. android:layout_height="wrap_content"
  72. android:gravity="center_vertical"
  73. android:orientation="horizontal">
  74. <TextView
  75. android:id="@+id/tv_old_price"
  76. android:layout_width="wrap_content"
  77. android:layout_height="wrap_content"
  78. android:textColor="@color/jd_gray_text"
  79. android:textSize="@dimen/text_normal"
  80. android:textStyle="bold"/>
  81. <TextView
  82. android:layout_width="wrap_content"
  83. android:layout_height="wrap_content"
  84. android:textColor="@color/black_theme"
  85. android:textSize="@dimen/text_normal"
  86. android:textStyle="bold"
  87. android:text=" - "/>
  88. <TextView
  89. android:id="@+id/tv_now_price"
  90. android:layout_width="wrap_content"
  91. android:layout_height="wrap_content"
  92. android:textColor="@color/jd_red_price"
  93. android:textSize="@dimen/text_normal"
  94. android:textStyle="bold" />
  95. <TextView
  96. android:layout_width="wrap_content"
  97. android:layout_height="wrap_content"
  98. android:textColor="@color/jd_gray_text"
  99. android:textSize="@dimen/text_normal"
  100. android:textStyle="bold"
  101. android:text=" = "/>
  102. <TextView
  103. android:id="@+id/tv_rebate"
  104. android:layout_width="0dp"
  105. android:layout_weight="1"
  106. android:layout_height="wrap_content"
  107. android:textColor="@color/black_theme"
  108. android:textSize="@dimen/text_normal"
  109. android:singleLine="true"
  110. android:ellipsize="marquee"
  111. android:marqueeRepeatLimit="marquee_forever"
  112. android:scrollHorizontally="true"
  113. android:textStyle="bold"/>
  114. </LinearLayout>
  115. <Space
  116. android:layout_width="wrap_content"
  117. android:layout_height="0dp"
  118. android:layout_weight="1" />
  119. <LinearLayout
  120. android:layout_width="match_parent"
  121. android:layout_height="wrap_content"
  122. android:orientation="vertical">
  123. <!--自营-->
  124. <LinearLayout
  125. android:layout_width="wrap_content"
  126. android:layout_height="wrap_content"
  127. android:layout_marginBottom="@dimen/margin_ss"
  128. android:gravity="center_vertical"
  129. android:orientation="horizontal">
  130. <TextView
  131. android:id="@+id/tv_self"
  132. android:layout_width="wrap_content"
  133. android:layout_height="wrap_content"
  134. android:background="@drawable/shape_red_tag_gradient"
  135. android:paddingStart="@dimen/margin_tag"
  136. android:paddingTop="@dimen/padding_tag"
  137. android:paddingEnd="@dimen/margin_tag"
  138. android:paddingBottom="@dimen/padding_tag"
  139. android:text="自营"
  140. android:textColor="@color/white_slight"
  141. android:textSize="@dimen/text_sss" />
  142. <TextView
  143. android:id="@+id/tv_shop_name"
  144. android:layout_width="wrap_content"
  145. android:layout_height="wrap_content"
  146. android:layout_gravity="center_vertical"
  147. android:layout_marginStart="@dimen/margin_ss"
  148. android:ellipsize="end"
  149. android:singleLine="true"
  150. android:textColor="@color/gray_text_s"
  151. android:textSize="@dimen/text_shop_name" />
  152. </LinearLayout>
  153. <!--好评-->
  154. <LinearLayout
  155. android:layout_width="match_parent"
  156. android:layout_height="wrap_content"
  157. android:gravity="center_vertical"
  158. android:orientation="horizontal">
  159. <TextView
  160. android:layout_width="wrap_content"
  161. android:layout_height="wrap_content"
  162. android:background="@drawable/shape_purple_tag_gradient"
  163. android:paddingStart="@dimen/margin_tag"
  164. android:paddingTop="@dimen/padding_tag"
  165. android:paddingEnd="@dimen/margin_tag"
  166. android:paddingBottom="@dimen/padding_tag"
  167. android:text="好评"
  168. android:textColor="@color/white_slight"
  169. android:textSize="@dimen/text_sss" />
  170. <TextView
  171. android:id="@+id/tv_good_comment"
  172. android:layout_width="wrap_content"
  173. android:layout_height="wrap_content"
  174. android:background="@drawable/shape_purple_stroke_right"
  175. android:ellipsize="end"
  176. android:paddingStart="@dimen/margin_tag"
  177. android:paddingTop="@dimen/padding_tag"
  178. android:paddingEnd="@dimen/margin_tag"
  179. android:paddingBottom="@dimen/padding_tag"
  180. android:singleLine="true"
  181. android:textColor="@color/black_text"
  182. android:textSize="@dimen/text_sss"
  183. android:textStyle="bold" />
  184. <TextView
  185. android:id="@+id/tv_sales_per_month"
  186. android:layout_width="match_parent"
  187. android:layout_height="wrap_content"
  188. android:gravity="end"
  189. android:layout_marginStart="@dimen/margin_ss"
  190. android:paddingStart="@dimen/margin_sss"
  191. android:paddingEnd="@dimen/margin_sss"
  192. android:ellipsize="end"
  193. android:singleLine="true"
  194. android:textColor="@color/gray_text_s"
  195. android:textSize="@dimen/text_shop_name" />
  196. </LinearLayout>
  197. </LinearLayout>
  198. <!--<LinearLayout
  199. android:layout_width="match_parent"
  200. android:layout_height="wrap_content"
  201. android:orientation="horizontal"
  202. android:gravity="bottom">
  203. <LinearLayout
  204. android:layout_width="wrap_content"
  205. android:layout_height="wrap_content"
  206. android:background="@drawable/shape_black_radius_transparent"
  207. android:gravity="center"
  208. android:orientation="vertical"
  209. android:padding="@dimen/margin_ss"
  210. android:layout_marginStart="@dimen/margin_ss"
  211. android:visibility="gone">
  212. <TextView
  213. android:layout_width="wrap_content"
  214. android:layout_height="wrap_content"
  215. android:text="购买返现"
  216. android:textColor="@color/white_slight"
  217. android:textSize="@dimen/text_rebate_tips" />
  218. <TextView
  219. android:layout_width="wrap_content"
  220. android:layout_height="wrap_content"
  221. android:textColor="@color/jd_yellow_bg_tag_select_from"
  222. android:textSize="@dimen/text_s" />
  223. </LinearLayout>
  224. </LinearLayout>-->
  225. </LinearLayout>
  226. </LinearLayout>
  227. </androidx.cardview.widget.CardView>
  228. </FrameLayout>