trade_list_item.xml 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  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:layout_width="match_parent"
  6. android:layout_height="wrap_content"
  7. android:orientation="vertical"
  8. android:clickable="true"
  9. android:foreground="?android:attr/selectableItemBackground"
  10. android:id="@+id/trade_list_item_layout"
  11. android:background="@color/white">
  12. <LinearLayout
  13. android:layout_width="match_parent"
  14. android:layout_height="wrap_content"
  15. android:orientation="vertical">
  16. <RelativeLayout
  17. android:layout_width="match_parent"
  18. android:layout_height="wrap_content"
  19. android:orientation="horizontal"
  20. android:padding="10dp">
  21. <com.netease.nim.uikit.common.ui.imageview.HeadImageView
  22. android:id="@+id/trade_list_item_avatar"
  23. android:layout_width="48dp"
  24. android:layout_height="48dp"
  25. android:src="@drawable/logo" />
  26. <LinearLayout
  27. android:layout_width="wrap_content"
  28. android:layout_height="wrap_content"
  29. android:layout_gravity="left"
  30. android:layout_marginLeft="54dp"
  31. android:layout_marginTop="5dp"
  32. android:orientation="vertical">
  33. <TextView
  34. android:id="@+id/trade_list_item_name"
  35. android:layout_width="match_parent"
  36. android:layout_height="wrap_content"
  37. android:text="用户名"
  38. android:textColor="@color/blue"
  39. app:layout_constraintLeft_toRightOf="@+id/trade_list_item_avatar"
  40. app:layout_constraintTop_toTopOf="parent" />
  41. <TextView
  42. android:id="@+id/trade_list_item_date"
  43. android:layout_width="match_parent"
  44. android:layout_height="wrap_content"
  45. android:layout_marginTop="4dp"
  46. android:text="发布时间"
  47. app:layout_constraintLeft_toLeftOf="@+id/trade_list_item_name"
  48. app:layout_constraintTop_toBottomOf="@+id/trade_list_item_name" />
  49. </LinearLayout>
  50. <LinearLayout
  51. android:layout_width="match_parent"
  52. android:layout_height="wrap_content"
  53. android:gravity="right"
  54. android:orientation="horizontal">
  55. <LinearLayout
  56. android:layout_width="wrap_content"
  57. android:layout_height="wrap_content"
  58. android:gravity="center"
  59. android:orientation="vertical">
  60. <ImageView
  61. android:id="@+id/trade_list_item_follow_img"
  62. android:layout_width="24dp"
  63. android:layout_height="24dp"
  64. android:layout_weight="1"
  65. android:src="@drawable/trade_unfollowed"
  66. android:visibility="visible" />
  67. <TextView
  68. android:id="@+id/trade_list_item_follow_txt"
  69. android:layout_width="wrap_content"
  70. android:layout_height="wrap_content"
  71. android:layout_weight="1"
  72. android:text="关注"
  73. android:textSize="12sp"
  74. android:visibility="visible" />
  75. </LinearLayout>
  76. <TextView
  77. android:id="@+id/trade_list_item_modify"
  78. android:layout_width="wrap_content"
  79. android:layout_height="wrap_content"
  80. android:layout_marginRight="8dp"
  81. android:layout_marginTop="8dp"
  82. android:text="修改"/>
  83. </LinearLayout>
  84. </RelativeLayout>
  85. <com.sheishuo.app.common.views.PartlyHighLightTextView
  86. android:id="@+id/trade_list_item_content"
  87. android:layout_width="match_parent"
  88. android:layout_height="wrap_content"
  89. android:paddingLeft="10dp"
  90. android:paddingRight="10dp"
  91. android:text="这里是交易内容详情这里是交易内容详情这里是交易内容详情这里是交易内容详情
  92. 这里是交易内容详情这里是交易内容详情这里是交易内容详情这里是交易内容详情"
  93. app:highlight_color="@color/green_4DC0A4"
  94. app:hightlight_str=""
  95. app:layout_constraintHorizontal_bias="1.0"
  96. app:layout_constraintLeft_toLeftOf="parent"
  97. app:layout_constraintRight_toRightOf="parent"
  98. app:layout_constraintTop_toBottomOf="@+id/trade_list_item_avatar" />
  99. <com.sheishuo.app.common.views.ImgGridView
  100. android:id="@+id/trade_list_item_imgs_gridview"
  101. android:layout_width="match_parent"
  102. android:layout_height="wrap_content"
  103. android:numColumns="2"
  104. android:paddingBottom="5dp"
  105. android:paddingLeft="10dp"
  106. android:paddingRight="10dp"
  107. android:paddingTop="5dp"
  108. android:scrollbarDefaultDelayBeforeFade="0"
  109. app:layout_constraintHorizontal_bias="0.0"
  110. app:layout_constraintLeft_toLeftOf="@+id/trade_list_item_content"
  111. app:layout_constraintRight_toRightOf="@+id/trade_list_item_content"
  112. app:layout_constraintTop_toBottomOf="@+id/trade_list_item_content" />
  113. <RelativeLayout
  114. android:layout_width="match_parent"
  115. android:layout_height="wrap_content"
  116. android:paddingBottom="5dp"
  117. android:paddingLeft="10dp"
  118. android:paddingRight="10dp"
  119. android:paddingTop="5dp">
  120. <TextView
  121. android:id="@+id/trade_list_item_priority"
  122. android:layout_width="wrap_content"
  123. android:layout_height="wrap_content"
  124. android:background="@drawable/style_rounded_corner_editext"
  125. android:paddingBottom="4dp"
  126. android:paddingLeft="10dp"
  127. android:paddingRight="10dp"
  128. android:paddingTop="4dp"
  129. android:text="置顶101"
  130. android:textColor="@color/green_4DC0A4"
  131. app:layout_constraintLeft_toLeftOf="@+id/trade_list_item_imgs_gridview"
  132. app:layout_constraintTop_toBottomOf="@+id/trade_list_item_imgs_gridview" />
  133. <LinearLayout
  134. android:layout_width="match_parent"
  135. android:layout_height="wrap_content"
  136. android:layout_marginTop="5dp"
  137. android:gravity="right"
  138. android:orientation="horizontal">
  139. <TextView
  140. android:id="@+id/trade_list_item_delete"
  141. android:layout_width="wrap_content"
  142. android:layout_height="wrap_content"
  143. android:layout_marginRight="8dp"
  144. android:text="删除" />
  145. <TextView
  146. android:id="@+id/trade_list_item_views"
  147. android:layout_width="wrap_content"
  148. android:layout_height="wrap_content"
  149. android:layout_marginRight="0dp"
  150. android:layout_marginTop="8dp"
  151. android:padding="4dp"
  152. android:text="阅读103"
  153. android:visibility="gone"
  154. app:layout_constraintRight_toRightOf="@+id/trade_list_item_imgs_gridview"
  155. app:layout_constraintTop_toBottomOf="@+id/trade_list_item_imgs_gridview" />
  156. </LinearLayout>
  157. </RelativeLayout>
  158. </LinearLayout>
  159. <View
  160. android:layout_width="match_parent"
  161. android:layout_height="1dp"
  162. android:layout_marginTop="10dp"
  163. android:background="@color/grey_light" />
  164. </LinearLayout>