trade_list_item.xml 5.1 KB

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