fragment_home.xml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <layout xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:app="http://schemas.android.com/apk/res-auto"
  4. xmlns:binding="http://schemas.android.com/apk/res-auto"
  5. xmlns:tools="http://schemas.android.com/tools"
  6. tools:ignore="RtlHardcoded">
  7. <data>
  8. <variable
  9. name="viewModel"
  10. type="com.hongyegroup.cpt_main.mvvm.HomeViewModel" />
  11. <variable
  12. name="click"
  13. type="com.hongyegroup.cpt_main.ui.HomeFragment.ClickProxy" />
  14. </data>
  15. <LinearLayout
  16. android:layout_width="match_parent"
  17. android:layout_height="wrap_content"
  18. android:background="@color/white"
  19. android:orientation="vertical">
  20. <com.guadou.lib_baselib.view.titlebar.StatusbarGrayView
  21. android:layout_width="match_parent"
  22. android:layout_height="wrap_content" />
  23. <androidx.constraintlayout.widget.ConstraintLayout
  24. android:layout_width="match_parent"
  25. android:layout_height="@dimen/d_46dp">
  26. <com.guadou.lib_baselib.font_text_view.TextViewMedium
  27. android:id="@+id/tv_title"
  28. android:layout_width="wrap_content"
  29. android:layout_height="wrap_content"
  30. android:layout_gravity="center"
  31. android:text="首页"
  32. android:textColor="@color/black"
  33. android:textSize="@dimen/d_18sp"
  34. app:layout_constraintBottom_toBottomOf="parent"
  35. app:layout_constraintLeft_toLeftOf="parent"
  36. app:layout_constraintRight_toRightOf="parent"
  37. app:layout_constraintTop_toTopOf="parent" />
  38. <ImageView
  39. android:id="@+id/iv_notify_icon"
  40. android:layout_width="wrap_content"
  41. android:layout_height="wrap_content"
  42. android:layout_gravity="center"
  43. android:layout_marginRight="@dimen/d_15dp"
  44. android:contentDescription="通知列表"
  45. android:src="@drawable/main_title_notification_icon"
  46. android:visibility="visible"
  47. app:layout_constraintBottom_toBottomOf="parent"
  48. app:layout_constraintRight_toRightOf="parent"
  49. app:layout_constraintTop_toTopOf="parent" />
  50. <TextView
  51. android:id="@+id/tv_badge_num"
  52. android:layout_width="wrap_content"
  53. android:layout_height="wrap_content"
  54. android:layout_gravity="start"
  55. android:layout_marginTop="@dimen/d_5dp"
  56. android:background="@drawable/badge_red"
  57. android:maxLength="2"
  58. android:paddingLeft="@dimen/d_4dp"
  59. android:paddingTop="@dimen/d_1dp"
  60. android:paddingRight="@dimen/d_4dp"
  61. android:paddingBottom="@dimen/d_1dp"
  62. android:textColor="@color/white"
  63. android:textSize="@dimen/d_10sp"
  64. android:visibility="gone"
  65. app:layout_constraintLeft_toLeftOf="@id/iv_notify_icon"
  66. app:layout_constraintRight_toLeftOf="@id/iv_notify_icon"
  67. app:layout_constraintTop_toTopOf="parent"
  68. tools:text="99"
  69. tools:visibility="visible" />
  70. </androidx.constraintlayout.widget.ConstraintLayout>
  71. <View
  72. android:layout_width="match_parent"
  73. android:layout_height="@dimen/d_0.7dp"
  74. android:background="@color/divider_color_ee" />
  75. <com.scwang.smart.refresh.layout.SmartRefreshLayout
  76. android:id="@+id/refresh_layout"
  77. android:layout_width="match_parent"
  78. android:layout_height="match_parent"
  79. android:focusable="true"
  80. android:focusableInTouchMode="true"
  81. app:srlEnablePreviewInEditMode="true"
  82. app:srlPrimaryColor="@color/white">
  83. <com.scwang.smart.refresh.header.ClassicsHeader
  84. android:layout_width="match_parent"
  85. android:layout_height="wrap_content" />
  86. <androidx.core.widget.NestedScrollView
  87. android:id="@+id/scrollView"
  88. android:layout_width="match_parent"
  89. android:layout_height="match_parent"
  90. android:fillViewport="true"
  91. android:scrollbars="vertical">
  92. <LinearLayout
  93. android:layout_width="match_parent"
  94. android:layout_height="match_parent"
  95. android:orientation="vertical">
  96. <!--金额和Point显示-->
  97. <LinearLayout
  98. android:layout_width="match_parent"
  99. android:layout_height="56dp"
  100. android:orientation="horizontal">
  101. <androidx.constraintlayout.widget.ConstraintLayout
  102. android:layout_width="0dp"
  103. android:layout_height="match_parent"
  104. android:layout_weight="1"
  105. android:gravity="center_vertical"
  106. android:orientation="horizontal"
  107. binding:clicks="@{click.gotoWalletPage}">
  108. <ImageView
  109. android:id="@+id/icon_wallet"
  110. android:layout_width="@dimen/d_28dp"
  111. android:layout_height="@dimen/d_28dp"
  112. android:layout_marginLeft="@dimen/d_16dp"
  113. android:src="@drawable/home_top_wallet"
  114. app:layout_constraintBottom_toBottomOf="parent"
  115. app:layout_constraintLeft_toLeftOf="parent"
  116. app:layout_constraintTop_toTopOf="parent" />
  117. <View
  118. android:layout_width="21dp"
  119. android:layout_height="10dp"
  120. android:layout_marginBottom="@dimen/d_20dp"
  121. android:background="@drawable/chat_new_icon"
  122. app:layout_constraintBottom_toBottomOf="@id/icon_wallet"
  123. app:layout_constraintLeft_toRightOf="@id/icon_wallet"
  124. app:layout_constraintRight_toRightOf="@id/icon_wallet" />
  125. <TextView
  126. android:id="@+id/tv_wallet_money"
  127. android:layout_width="wrap_content"
  128. android:layout_height="wrap_content"
  129. android:layout_marginLeft="@dimen/d_14dp"
  130. android:text="¥ 0"
  131. android:textColor="@color/black"
  132. android:textSize="@dimen/d_14sp"
  133. app:layout_constraintBottom_toBottomOf="parent"
  134. app:layout_constraintLeft_toRightOf="@id/icon_wallet"
  135. app:layout_constraintTop_toTopOf="parent" />
  136. <ImageView
  137. android:layout_width="5dp"
  138. android:layout_height="9dp"
  139. android:layout_marginLeft="@dimen/d_7dp"
  140. android:src="@drawable/home_top_more"
  141. app:layout_constraintBottom_toBottomOf="parent"
  142. app:layout_constraintLeft_toRightOf="@id/tv_wallet_money"
  143. app:layout_constraintTop_toTopOf="parent" />
  144. </androidx.constraintlayout.widget.ConstraintLayout>
  145. <View
  146. android:layout_width="@dimen/d_0.7dp"
  147. android:layout_height="match_parent"
  148. android:background="@color/divider_color_f0" />
  149. <LinearLayout
  150. android:layout_width="0dp"
  151. android:layout_height="match_parent"
  152. android:layout_weight="1"
  153. android:gravity="center_vertical"
  154. android:orientation="horizontal"
  155. binding:clicks="@{click.gotoRewardsPage}">
  156. <ImageView
  157. android:id="@+id/icon_rewards"
  158. android:layout_width="wrap_content"
  159. android:layout_height="wrap_content"
  160. android:layout_marginLeft="@dimen/d_19dp"
  161. android:src="@drawable/home_top_point"
  162. app:layout_constraintBottom_toBottomOf="parent"
  163. app:layout_constraintLeft_toLeftOf="parent"
  164. app:layout_constraintTop_toTopOf="parent" />
  165. <TextView
  166. android:layout_width="wrap_content"
  167. android:layout_height="wrap_content"
  168. android:layout_marginLeft="@dimen/d_10dp"
  169. android:text="0 积分"
  170. android:textColor="@color/black"
  171. android:textColorHint="@color/black"
  172. android:textSize="@dimen/d_14sp" />
  173. <ImageView
  174. android:layout_width="@dimen/d_5dp"
  175. android:layout_height="@dimen/d_9dp"
  176. android:layout_marginLeft="@dimen/d_7dp"
  177. android:src="@drawable/home_top_more" />
  178. </LinearLayout>
  179. </LinearLayout>
  180. <View
  181. android:layout_width="match_parent"
  182. android:layout_height="@dimen/d_10dp"
  183. android:background="@color/divider_color_f689" />
  184. <!--轮播-->
  185. <com.minminaya.widget.GeneralRoundConstraintLayout
  186. android:layout_width="match_parent"
  187. android:layout_height="wrap_content"
  188. android:layout_marginLeft="@dimen/d_15dp"
  189. android:layout_marginTop="@dimen/d_16dp"
  190. android:layout_marginRight="@dimen/d_15dp"
  191. app:corner_radius="@dimen/d_5dp">
  192. <com.youth.banner.Banner
  193. android:id="@+id/banner"
  194. android:layout_width="match_parent"
  195. android:layout_height="0dp"
  196. android:background="@drawable/placeholder_img_banner"
  197. app:banner_auto_loop="true"
  198. app:banner_indicator_height="@dimen/d_5dp"
  199. app:banner_indicator_marginBottom="-3dp"
  200. app:banner_indicator_normal_color="@color/white"
  201. app:banner_indicator_normal_width="@dimen/d_7dp"
  202. app:banner_indicator_radius="@dimen/d_15dp"
  203. app:banner_indicator_selected_color="@color/page_bg"
  204. app:banner_indicator_selected_width="@dimen/d_17dp"
  205. app:banner_loop_time="5000"
  206. app:layout_constraintDimensionRatio="690:305"
  207. tools:ignore="MissingConstraints" />
  208. </com.minminaya.widget.GeneralRoundConstraintLayout>
  209. <!-- 热门 -->
  210. <TextView
  211. android:layout_width="wrap_content"
  212. android:layout_height="wrap_content"
  213. android:layout_marginLeft="@dimen/d_15dp"
  214. android:layout_marginTop="@dimen/d_18dp"
  215. android:layout_weight="1"
  216. android:drawableRight="@drawable/home_part_job_more"
  217. android:drawablePadding="@dimen/d_11dp"
  218. android:text="热门兼职工作"
  219. android:textColor="@color/black"
  220. android:textSize="@dimen/d_17sp"
  221. binding:clicks="@{click.gotoParttimePage}" />
  222. <androidx.recyclerview.widget.RecyclerView
  223. android:id="@+id/rv_hot_job"
  224. android:layout_width="match_parent"
  225. android:layout_height="wrap_content"
  226. android:layout_marginLeft="@dimen/d_12dp"
  227. android:layout_marginTop="@dimen/d_15dp"
  228. android:overScrollMode="never" />
  229. <!-- 当地市的工作 -->
  230. <TextView
  231. android:layout_width="wrap_content"
  232. android:layout_height="wrap_content"
  233. android:layout_marginLeft="@dimen/d_15dp"
  234. android:layout_marginTop="@dimen/d_18dp"
  235. android:layout_weight="1"
  236. android:drawableRight="@drawable/home_part_job_more"
  237. android:drawablePadding="@dimen/d_11dp"
  238. android:text="在武汉的工作"
  239. android:textColor="@color/black"
  240. android:textSize="@dimen/d_17sp"
  241. binding:clicks="@{click.gotoParttimePage}" />
  242. <androidx.recyclerview.widget.RecyclerView
  243. android:id="@+id/rv_city_job"
  244. android:layout_width="match_parent"
  245. android:layout_height="wrap_content"
  246. android:layout_marginLeft="@dimen/d_12dp"
  247. android:layout_marginTop="@dimen/d_15dp"
  248. android:overScrollMode="never" />
  249. <!-- 当地区域的工作 -->
  250. <TextView
  251. android:layout_width="wrap_content"
  252. android:layout_height="wrap_content"
  253. android:layout_marginLeft="@dimen/d_15dp"
  254. android:layout_marginTop="@dimen/d_18dp"
  255. android:layout_weight="1"
  256. android:drawableRight="@drawable/home_part_job_more"
  257. android:drawablePadding="@dimen/d_11dp"
  258. android:text="在东西湖区的工作"
  259. android:textColor="@color/black"
  260. android:textSize="@dimen/d_17sp"
  261. binding:clicks="@{click.gotoParttimePage}" />
  262. <androidx.recyclerview.widget.RecyclerView
  263. android:id="@+id/rv_area_job"
  264. android:layout_width="match_parent"
  265. android:layout_height="wrap_content"
  266. android:layout_marginLeft="@dimen/d_12dp"
  267. android:layout_marginTop="@dimen/d_15dp"
  268. android:overScrollMode="never" />
  269. <!--Job Tips-->
  270. <LinearLayout
  271. android:layout_width="match_parent"
  272. android:layout_height="wrap_content"
  273. android:layout_marginTop="@dimen/d_18dp"
  274. android:gravity="center_vertical"
  275. android:orientation="horizontal"
  276. binding:clicks="@{click.gotoBulletinBoardPage}">
  277. <TextView
  278. android:layout_width="0dp"
  279. android:layout_height="wrap_content"
  280. android:layout_marginLeft="@dimen/d_15dp"
  281. android:layout_weight="1"
  282. android:text="YY 公告栏"
  283. android:textColor="@color/black"
  284. android:textSize="@dimen/d_17sp" />
  285. <TextView
  286. android:layout_width="wrap_content"
  287. android:layout_height="wrap_content"
  288. android:layout_marginRight="@dimen/d_15dp"
  289. android:text="查看全部"
  290. android:textColor="@color/text_blue_3779ff"
  291. android:textSize="@dimen/d_14sp" />
  292. </LinearLayout>
  293. <androidx.recyclerview.widget.RecyclerView
  294. android:id="@+id/rv_job_tips"
  295. android:layout_width="match_parent"
  296. android:layout_height="wrap_content"
  297. android:layout_marginLeft="@dimen/d_12dp"
  298. android:layout_marginTop="@dimen/d_13dp"
  299. android:overScrollMode="never" />
  300. <View
  301. android:layout_width="match_parent"
  302. android:layout_height="@dimen/d_10dp" />
  303. </LinearLayout>
  304. </androidx.core.widget.NestedScrollView>
  305. </com.scwang.smart.refresh.layout.SmartRefreshLayout>
  306. </LinearLayout>
  307. </layout>