item_goods.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  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" />
  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. android:visibility="gone"/>
  82. <TextView
  83. android:layout_width="wrap_content"
  84. android:layout_height="wrap_content"
  85. android:textColor="@color/black_theme"
  86. android:textSize="@dimen/text_normal"
  87. android:textStyle="bold"
  88. android:text=" - "
  89. android:visibility="gone"/>
  90. <TextView
  91. android:id="@+id/tv_now_price"
  92. android:layout_width="wrap_content"
  93. android:layout_height="wrap_content"
  94. android:textColor="@color/jd_red_price"
  95. android:textSize="@dimen/text_normal"
  96. android:textStyle="bold" />
  97. <TextView
  98. android:layout_width="wrap_content"
  99. android:layout_height="wrap_content"
  100. android:textColor="@color/jd_gray_text"
  101. android:textSize="@dimen/text_normal"
  102. android:textStyle="bold"
  103. android:text=" = "
  104. android:visibility="gone"/>
  105. <TextView
  106. android:id="@+id/tv_rebate"
  107. android:layout_width="0dp"
  108. android:layout_weight="1"
  109. android:layout_height="wrap_content"
  110. android:textColor="@color/black_theme"
  111. android:textSize="@dimen/text_normal"
  112. android:singleLine="true"
  113. android:ellipsize="marquee"
  114. android:marqueeRepeatLimit="marquee_forever"
  115. android:scrollHorizontally="true"
  116. android:textStyle="bold"
  117. android:visibility="gone"/>
  118. </LinearLayout>
  119. <Space
  120. android:layout_width="wrap_content"
  121. android:layout_height="0dp"
  122. android:layout_weight="1" />
  123. <LinearLayout
  124. android:layout_width="match_parent"
  125. android:layout_height="wrap_content"
  126. android:orientation="vertical">
  127. <!--自营-->
  128. <LinearLayout
  129. android:layout_width="wrap_content"
  130. android:layout_height="wrap_content"
  131. android:layout_marginBottom="@dimen/margin_ss"
  132. android:gravity="center_vertical"
  133. android:orientation="horizontal">
  134. <TextView
  135. android:id="@+id/tv_self"
  136. android:layout_width="wrap_content"
  137. android:layout_height="wrap_content"
  138. android:background="@drawable/shape_red_tag_gradient"
  139. android:paddingStart="@dimen/margin_tag"
  140. android:paddingTop="@dimen/padding_tag"
  141. android:paddingEnd="@dimen/margin_tag"
  142. android:paddingBottom="@dimen/padding_tag"
  143. android:text="自营"
  144. android:textColor="@color/white_slight"
  145. android:textSize="@dimen/text_sss" />
  146. <TextView
  147. android:id="@+id/tv_shop_name"
  148. android:layout_width="wrap_content"
  149. android:layout_height="wrap_content"
  150. android:layout_gravity="center_vertical"
  151. android:layout_marginStart="@dimen/margin_ss"
  152. android:ellipsize="end"
  153. android:singleLine="true"
  154. android:textColor="@color/gray_text_s"
  155. android:textSize="@dimen/text_shop_name" />
  156. </LinearLayout>
  157. <!--好评-->
  158. <LinearLayout
  159. android:layout_width="match_parent"
  160. android:layout_height="wrap_content"
  161. android:gravity="center_vertical"
  162. android:orientation="horizontal">
  163. <TextView
  164. android:layout_width="wrap_content"
  165. android:layout_height="wrap_content"
  166. android:background="@drawable/shape_purple_tag_gradient"
  167. android:paddingStart="@dimen/margin_tag"
  168. android:paddingTop="@dimen/padding_tag"
  169. android:paddingEnd="@dimen/margin_tag"
  170. android:paddingBottom="@dimen/padding_tag"
  171. android:text="好评"
  172. android:textColor="@color/white_slight"
  173. android:textSize="@dimen/text_sss" />
  174. <TextView
  175. android:id="@+id/tv_good_comment"
  176. android:layout_width="wrap_content"
  177. android:layout_height="wrap_content"
  178. android:background="@drawable/shape_purple_stroke_right"
  179. android:ellipsize="end"
  180. android:paddingStart="@dimen/margin_tag"
  181. android:paddingTop="@dimen/padding_tag"
  182. android:paddingEnd="@dimen/margin_tag"
  183. android:paddingBottom="@dimen/padding_tag"
  184. android:singleLine="true"
  185. android:textColor="@color/black_text"
  186. android:textSize="@dimen/text_sss"
  187. android:textStyle="bold" />
  188. <TextView
  189. android:id="@+id/tv_sales_per_month"
  190. android:layout_width="match_parent"
  191. android:layout_height="wrap_content"
  192. android:gravity="end"
  193. android:layout_marginStart="@dimen/margin_ss"
  194. android:paddingStart="@dimen/margin_sss"
  195. android:paddingEnd="@dimen/margin_sss"
  196. android:ellipsize="end"
  197. android:singleLine="true"
  198. android:textColor="@color/gray_text_s"
  199. android:textSize="@dimen/text_shop_name" />
  200. </LinearLayout>
  201. </LinearLayout>
  202. <!--<LinearLayout
  203. android:layout_width="match_parent"
  204. android:layout_height="wrap_content"
  205. android:orientation="horizontal"
  206. android:gravity="bottom">
  207. <LinearLayout
  208. android:layout_width="wrap_content"
  209. android:layout_height="wrap_content"
  210. android:background="@drawable/shape_black_radius_transparent"
  211. android:gravity="center"
  212. android:orientation="vertical"
  213. android:padding="@dimen/margin_ss"
  214. android:layout_marginStart="@dimen/margin_ss"
  215. android:visibility="gone">
  216. <TextView
  217. android:layout_width="wrap_content"
  218. android:layout_height="wrap_content"
  219. android:text="购买返现"
  220. android:textColor="@color/white_slight"
  221. android:textSize="@dimen/text_rebate_tips" />
  222. <TextView
  223. android:layout_width="wrap_content"
  224. android:layout_height="wrap_content"
  225. android:textColor="@color/jd_yellow_bg_tag_select_from"
  226. android:textSize="@dimen/text_s" />
  227. </LinearLayout>
  228. </LinearLayout>-->
  229. </LinearLayout>
  230. </LinearLayout>
  231. </androidx.cardview.widget.CardView>
  232. </FrameLayout>