fragment_main.xml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463
  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. <data>
  5. <variable
  6. name="viewModel"
  7. type="com.sjkj.appthreefloor_tsgz.fragment.MainViewModel" />
  8. </data>
  9. <!-- <androidx.core.widget.NestedScrollView-->
  10. <!-- android:layout_width="match_parent"-->
  11. <!-- android:layout_height="match_parent"-->
  12. <!-- android:orientation="vertical"-->
  13. <!-- android:overScrollMode="never"-->
  14. <!-- android:scrollbars="none">-->
  15. <ScrollView
  16. android:layout_width="match_parent"
  17. android:layout_height="match_parent"
  18. android:orientation="vertical">
  19. <LinearLayout
  20. android:layout_width="match_parent"
  21. android:layout_height="match_parent"
  22. android:background="#ECEDF4"
  23. android:orientation="vertical">
  24. <FrameLayout
  25. android:layout_width="match_parent"
  26. android:layout_height="490dp">
  27. <FrameLayout
  28. android:layout_width="match_parent"
  29. android:layout_height="320dp">
  30. <ImageView
  31. android:id="@+id/iv_banner"
  32. android:layout_width="match_parent"
  33. android:layout_height="320dp"
  34. android:layout_marginBottom="10dp"
  35. android:adjustViewBounds="true"
  36. android:background="@drawable/icon_bg"
  37. android:scaleType="fitXY" />
  38. <ImageView
  39. android:layout_width="match_parent"
  40. android:layout_height="wrap_content"
  41. android:layout_gravity="bottom"
  42. android:background="@drawable/icon_hu" />
  43. </FrameLayout>
  44. <LinearLayout
  45. android:layout_width="match_parent"
  46. android:layout_height="wrap_content"
  47. android:layout_gravity="bottom"
  48. android:layout_marginLeft="15dp"
  49. android:layout_marginRight="15dp"
  50. android:background="@drawable/round_corner_top_letf_right"
  51. android:orientation="vertical">
  52. <LinearLayout
  53. android:layout_width="match_parent"
  54. android:layout_height="wrap_content"
  55. android:layout_marginTop="10dp"
  56. android:orientation="horizontal"
  57. android:padding="12dp">
  58. <LinearLayout
  59. android:id="@+id/ll_camera"
  60. android:layout_width="0dp"
  61. android:layout_height="match_parent"
  62. android:layout_gravity="center_horizontal"
  63. android:layout_weight="1"
  64. android:gravity="center_horizontal"
  65. android:orientation="vertical">
  66. <ImageView
  67. android:layout_width="wrap_content"
  68. android:layout_height="wrap_content"
  69. android:background="@drawable/icon_camera"
  70. android:padding="10dp">
  71. </ImageView>
  72. <TextView
  73. android:layout_width="match_parent"
  74. android:layout_height="wrap_content"
  75. android:layout_gravity="center_horizontal"
  76. android:layout_marginTop="8dp"
  77. android:gravity="center"
  78. android:text="摄像头"
  79. android:textColor="@color/color_black_text"
  80. android:textSize="14dp" />
  81. </LinearLayout>
  82. <LinearLayout
  83. android:id="@+id/ll_sensor"
  84. android:layout_width="0dp"
  85. android:layout_height="match_parent"
  86. android:layout_gravity="center_horizontal"
  87. android:layout_weight="1"
  88. android:gravity="center_horizontal"
  89. android:orientation="vertical">
  90. <ImageView
  91. android:layout_width="wrap_content"
  92. android:layout_height="wrap_content"
  93. android:background="@drawable/icon_sensor"
  94. android:padding="10dp">
  95. </ImageView>
  96. <TextView
  97. android:layout_width="match_parent"
  98. android:layout_height="wrap_content"
  99. android:layout_gravity="center_horizontal"
  100. android:layout_marginTop="8dp"
  101. android:gravity="center"
  102. android:text="传感器"
  103. android:textColor="@color/color_black_text"
  104. android:textSize="14dp" />
  105. </LinearLayout>
  106. <LinearLayout
  107. android:id="@+id/ll_water_intake"
  108. android:layout_width="0dp"
  109. android:layout_height="match_parent"
  110. android:layout_gravity="center_horizontal"
  111. android:layout_weight="1"
  112. android:gravity="center_horizontal"
  113. android:orientation="vertical">
  114. <ImageView
  115. android:layout_width="wrap_content"
  116. android:layout_height="wrap_content"
  117. android:background="@drawable/icon_intake"
  118. android:padding="10dp">
  119. </ImageView>
  120. <TextView
  121. android:layout_width="match_parent"
  122. android:layout_height="wrap_content"
  123. android:layout_gravity="center_horizontal"
  124. android:layout_marginTop="8dp"
  125. android:gravity="center"
  126. android:text="取水口"
  127. android:textColor="@color/color_black_text"
  128. android:textSize="14dp" />
  129. </LinearLayout>
  130. <LinearLayout
  131. android:id="@+id/ll_water_crane"
  132. android:layout_width="0dp"
  133. android:layout_height="match_parent"
  134. android:layout_gravity="center_horizontal"
  135. android:layout_weight="1"
  136. android:gravity="center_horizontal"
  137. android:orientation="vertical">
  138. <ImageView
  139. android:layout_width="wrap_content"
  140. android:layout_height="wrap_content"
  141. android:background="@drawable/icon_water_crane"
  142. android:padding="10dp">
  143. </ImageView>
  144. <TextView
  145. android:layout_width="match_parent"
  146. android:layout_height="wrap_content"
  147. android:layout_gravity="center_horizontal"
  148. android:layout_marginTop="8dp"
  149. android:gravity="center"
  150. android:text="水鹤"
  151. android:textColor="@color/color_black_text"
  152. android:textSize="14dp" />
  153. </LinearLayout>
  154. </LinearLayout>
  155. <LinearLayout
  156. android:layout_width="match_parent"
  157. android:layout_height="wrap_content"
  158. android:layout_marginBottom="10dp"
  159. android:orientation="horizontal"
  160. android:padding="12dp">
  161. <LinearLayout
  162. android:id="@+id/ll_water_source"
  163. android:layout_width="0dp"
  164. android:layout_height="match_parent"
  165. android:layout_gravity="center_horizontal"
  166. android:layout_weight="1"
  167. android:gravity="center_horizontal"
  168. android:orientation="vertical">
  169. <ImageView
  170. android:layout_width="wrap_content"
  171. android:layout_height="wrap_content"
  172. android:background="@drawable/icon_water_source"
  173. android:padding="10dp">
  174. </ImageView>
  175. <TextView
  176. android:layout_width="match_parent"
  177. android:layout_height="wrap_content"
  178. android:layout_gravity="center_horizontal"
  179. android:layout_marginTop="8dp"
  180. android:gravity="center"
  181. android:text="水源"
  182. android:textColor="@color/color_black_text"
  183. android:textSize="14dp" />
  184. </LinearLayout>
  185. <LinearLayout
  186. android:layout_width="0dp"
  187. android:layout_height="match_parent"
  188. android:layout_gravity="center_horizontal"
  189. android:layout_weight="1"
  190. android:gravity="center_horizontal"
  191. android:orientation="vertical">
  192. <ImageView
  193. android:layout_width="wrap_content"
  194. android:layout_height="wrap_content"
  195. android:background="@drawable/icon_zanding01"
  196. android:padding="10dp">
  197. </ImageView>
  198. <TextView
  199. android:layout_width="match_parent"
  200. android:layout_height="wrap_content"
  201. android:layout_gravity="center_horizontal"
  202. android:layout_marginTop="8dp"
  203. android:gravity="center"
  204. android:text="标题"
  205. android:textColor="@color/color_black_text"
  206. android:textSize="14dp" />
  207. </LinearLayout>
  208. <LinearLayout
  209. android:layout_width="0dp"
  210. android:layout_height="match_parent"
  211. android:layout_gravity="center_horizontal"
  212. android:layout_weight="1"
  213. android:gravity="center_horizontal"
  214. android:orientation="vertical">
  215. <ImageView
  216. android:layout_width="wrap_content"
  217. android:layout_height="wrap_content"
  218. android:background="@drawable/icon_zanding02"
  219. android:padding="10dp">
  220. </ImageView>
  221. <TextView
  222. android:layout_width="match_parent"
  223. android:layout_height="wrap_content"
  224. android:layout_gravity="center_horizontal"
  225. android:layout_marginTop="8dp"
  226. android:gravity="center"
  227. android:text="标题"
  228. android:textColor="@color/color_black_text"
  229. android:textSize="14dp" />
  230. </LinearLayout>
  231. <LinearLayout
  232. android:layout_width="0dp"
  233. android:layout_height="match_parent"
  234. android:layout_gravity="center_horizontal"
  235. android:layout_weight="1"
  236. android:gravity="center_horizontal"
  237. android:orientation="vertical">
  238. <ImageView
  239. android:layout_width="wrap_content"
  240. android:layout_height="wrap_content"
  241. android:background="@drawable/icon_more"
  242. android:padding="10dp">
  243. </ImageView>
  244. <TextView
  245. android:layout_width="match_parent"
  246. android:layout_height="wrap_content"
  247. android:layout_gravity="center_horizontal"
  248. android:layout_marginTop="8dp"
  249. android:gravity="center"
  250. android:text="更多"
  251. android:textColor="@color/color_black_text"
  252. android:textSize="14dp" />
  253. </LinearLayout>
  254. </LinearLayout>
  255. </LinearLayout>
  256. </FrameLayout>
  257. <LinearLayout
  258. android:layout_width="match_parent"
  259. android:layout_height="70dp"
  260. android:layout_marginLeft="15dp"
  261. android:layout_marginTop="10dp"
  262. android:layout_marginRight="15dp"
  263. android:background="@drawable/icon_noticebg">
  264. <LinearLayout
  265. android:layout_width="match_parent"
  266. android:layout_height="match_parent"
  267. android:orientation="horizontal">
  268. <ImageView
  269. android:layout_width="wrap_content"
  270. android:layout_height="wrap_content"
  271. android:layout_gravity="center_vertical"
  272. android:layout_marginLeft="20dp"
  273. android:background="@drawable/icon_notice">
  274. </ImageView>
  275. <LinearLayout
  276. android:layout_width="match_parent"
  277. android:layout_height="match_parent"
  278. android:layout_marginLeft="15dp"
  279. android:layout_marginTop="15dp"
  280. android:layout_marginRight="30dp"
  281. android:layout_marginBottom="15dp"
  282. android:orientation="vertical">
  283. <TextView
  284. android:id="@+id/tv_one"
  285. android:layout_width="match_parent"
  286. android:layout_height="0dp"
  287. android:layout_weight="1"
  288. android:ellipsize="end"
  289. android:gravity="center_vertical"
  290. android:singleLine="true"
  291. android:textColor="@color/color_notice" />
  292. <TextView
  293. android:id="@+id/tv_two"
  294. android:layout_width="match_parent"
  295. android:layout_height="0dp"
  296. android:layout_weight="1"
  297. android:ellipsize="end"
  298. android:gravity="center_vertical"
  299. android:singleLine="true"
  300. android:textColor="@color/color_notice" />
  301. </LinearLayout>
  302. </LinearLayout>
  303. </LinearLayout>
  304. <com.youth.banner.Banner
  305. android:id="@+id/banner"
  306. android:layout_width="match_parent"
  307. android:layout_height="120dp"
  308. android:layout_marginLeft="15dp"
  309. android:layout_marginTop="15dp"
  310. android:layout_marginRight="15dp"
  311. app:banner_indicator_normal_color="@color/divider"
  312. app:banner_indicator_selected_color="@color/white"
  313. app:banner_radius="5dp" />
  314. <RelativeLayout
  315. android:layout_width="match_parent"
  316. android:layout_height="match_parent"
  317. android:layout_gravity="center_vertical"
  318. android:layout_marginTop="15dp">
  319. <TextView
  320. android:layout_width="match_parent"
  321. android:layout_height="wrap_content"
  322. android:layout_centerInParent="true"
  323. android:layout_marginLeft="15dp"
  324. android:layout_toLeftOf="@+id/tv_all"
  325. android:drawableLeft="@drawable/icon_title"
  326. android:drawablePadding="10dp"
  327. android:text="更多应用"
  328. android:textColor="@color/black"
  329. android:textSize="18dp" />
  330. <TextView
  331. android:id="@+id/tv_all"
  332. android:layout_width="wrap_content"
  333. android:layout_height="wrap_content"
  334. android:layout_alignParentRight="true"
  335. android:layout_centerVertical="true"
  336. android:layout_marginRight="15dp"
  337. android:drawableRight="@drawable/icon_arrow_right"
  338. android:text="全部"
  339. android:textColor="@color/text_gray3"
  340. android:textSize="14dp" />
  341. </RelativeLayout>
  342. <LinearLayout
  343. android:layout_width="match_parent"
  344. android:layout_height="match_parent"
  345. android:layout_marginTop="10dp"
  346. android:layout_marginBottom="45dp"
  347. android:orientation="horizontal">
  348. <LinearLayout
  349. android:layout_width="0dp"
  350. android:layout_height="220dp"
  351. android:layout_marginLeft="10dp"
  352. android:layout_marginRight="10dp"
  353. android:layout_weight="1"
  354. android:background="@drawable/icon_zanding03">
  355. </LinearLayout>
  356. <LinearLayout
  357. android:layout_width="0dp"
  358. android:layout_height="220dp"
  359. android:layout_marginRight="15dp"
  360. android:layout_weight="1"
  361. android:orientation="vertical">
  362. <TextView
  363. android:layout_width="match_parent"
  364. android:layout_height="0dp"
  365. android:layout_marginBottom="10dp"
  366. android:layout_weight="1"
  367. android:background="@drawable/icon_zanding04" />
  368. <TextView
  369. android:layout_width="match_parent"
  370. android:layout_height="0dp"
  371. android:layout_weight="1"
  372. android:background="@drawable/icon_zanding05" />
  373. </LinearLayout>
  374. </LinearLayout>
  375. <View
  376. android:layout_width="match_parent"
  377. android:layout_height="80dp"/>
  378. </LinearLayout>
  379. </ScrollView>
  380. <!-- </androidx.core.widget.NestedScrollView>-->
  381. </layout>