trade_list_item.xml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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. android:layout_width="match_parent"
  5. android:layout_height="wrap_content"
  6. android:orientation="vertical"
  7. android:layout_marginTop="16dp"
  8. android:clickable="true"
  9. android:foreground="?android:attr/selectableItemBackground"
  10. android:id="@+id/trade_list_item_layout"
  11. android:background="@color/white">
  12. <android.support.constraint.ConstraintLayout
  13. android:layout_width="match_parent"
  14. android:layout_height="wrap_content"
  15. android:padding="8dp">
  16. <com.netease.nim.uikit.common.ui.imageview.HeadImageView
  17. android:id="@+id/trade_list_item_avatar"
  18. android:layout_width="48dp"
  19. android:layout_height="48dp"
  20. app:layout_constraintTop_toTopOf="parent"
  21. android:layout_marginTop="16dp"
  22. android:layout_marginLeft="16dp"
  23. app:layout_constraintLeft_toLeftOf="parent"
  24. android:src="@drawable/logo"
  25. android:layout_marginStart="16dp" />
  26. <ImageView
  27. android:id="@+id/trade_list_item_follow_img"
  28. android:layout_width="32dp"
  29. android:layout_height="32dp"
  30. android:src="@drawable/trade_unfollowed"
  31. app:layout_constraintTop_toTopOf="parent"
  32. android:layout_marginTop="16dp"
  33. android:layout_marginRight="16dp"
  34. app:layout_constraintRight_toRightOf="parent" />
  35. <TextView
  36. android:id="@+id/trade_list_item_name"
  37. android:layout_width="wrap_content"
  38. android:layout_height="wrap_content"
  39. android:text="用户名"
  40. app:layout_constraintLeft_toRightOf="@+id/trade_list_item_avatar"
  41. android:layout_marginLeft="8dp"
  42. app:layout_constraintTop_toTopOf="parent"
  43. android:layout_marginTop="16dp"
  44. android:layout_marginStart="8dp" />
  45. <TextView
  46. android:id="@+id/trade_list_item_date"
  47. android:layout_width="wrap_content"
  48. android:layout_height="wrap_content"
  49. android:layout_marginTop="8dp"
  50. android:text="发布时间"
  51. app:layout_constraintLeft_toLeftOf="@+id/trade_list_item_name"
  52. app:layout_constraintTop_toBottomOf="@+id/trade_list_item_name" />
  53. <com.sheishuo.app.common.views.PartlyHighLightTextView
  54. android:id="@+id/trade_list_item_content"
  55. android:layout_width="0dp"
  56. android:layout_height="wrap_content"
  57. android:layout_marginLeft="16dp"
  58. android:layout_marginRight="16dp"
  59. android:layout_marginTop="16dp"
  60. android:layout_marginStart="16dp"
  61. android:layout_marginEnd="16dp"
  62. android:text="这里是交易内容详情这里是交易内容详情这里是交易内容详情这里是交易内容详情
  63. 这里是交易内容详情这里是交易内容详情这里是交易内容详情这里是交易内容详情"
  64. app:layout_constraintLeft_toLeftOf="parent"
  65. app:layout_constraintRight_toRightOf="parent"
  66. app:layout_constraintTop_toBottomOf="@+id/trade_list_item_avatar"
  67. app:layout_constraintHorizontal_bias="1.0"
  68. app:hightlight_str=""
  69. app:highlight_color="@color/green_4DC0A4"
  70. />
  71. <com.sheishuo.app.common.views.ImgGridView
  72. android:id="@+id/trade_list_item_imgs_gridview"
  73. android:layout_width="0dp"
  74. android:layout_height="wrap_content"
  75. android:numColumns="2"
  76. app:layout_constraintLeft_toLeftOf="@+id/trade_list_item_content"
  77. app:layout_constraintTop_toBottomOf="@+id/trade_list_item_content"
  78. app:layout_constraintRight_toRightOf="@+id/trade_list_item_content"
  79. app:layout_constraintHorizontal_bias="0.0"
  80. android:scrollbarDefaultDelayBeforeFade="0"
  81. android:padding="16dp"/>
  82. <TextView
  83. android:id="@+id/trade_list_item_priority"
  84. android:layout_width="wrap_content"
  85. android:layout_height="wrap_content"
  86. android:text="置顶101"
  87. android:textColor="@color/green_4DC0A4"
  88. android:background="@drawable/style_rounded_corner_editext"
  89. android:padding="4dp"
  90. android:layout_marginLeft="0dp"
  91. app:layout_constraintLeft_toLeftOf="@+id/trade_list_item_imgs_gridview"
  92. android:layout_marginTop="8dp"
  93. app:layout_constraintTop_toBottomOf="@+id/trade_list_item_imgs_gridview" />
  94. <TextView
  95. android:id="@+id/trade_list_item_views"
  96. android:layout_width="wrap_content"
  97. android:layout_height="wrap_content"
  98. android:text="阅读103"
  99. android:padding="4dp"
  100. android:layout_marginRight="0dp"
  101. app:layout_constraintRight_toRightOf="@+id/trade_list_item_imgs_gridview"
  102. android:layout_marginTop="8dp"
  103. app:layout_constraintTop_toBottomOf="@+id/trade_list_item_imgs_gridview" />
  104. </android.support.constraint.ConstraintLayout>
  105. <View
  106. android:layout_width="match_parent"
  107. android:layout_height="1dp"
  108. android:background="@color/grey_light"/>
  109. </LinearLayout>