fragment_home_page.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  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:tools="http://schemas.android.com/tools">
  5. <data>
  6. <variable
  7. name="homePageViewModel"
  8. type="com.datarecovery.master.module.homepage.HomePageViewModel" />
  9. <import type="com.atmob.common.ui.SizeUtil" />
  10. </data>
  11. <androidx.constraintlayout.widget.ConstraintLayout
  12. android:layout_width="match_parent"
  13. android:layout_height="match_parent">
  14. <androidx.core.widget.NestedScrollView
  15. android:layout_width="match_parent"
  16. android:layout_height="match_parent"
  17. android:background="#F6F7F6"
  18. app:layout_constraintBottom_toBottomOf="parent">
  19. <androidx.constraintlayout.widget.ConstraintLayout
  20. android:layout_width="match_parent"
  21. android:layout_height="wrap_content">
  22. <ImageView
  23. android:id="@+id/iv_banner"
  24. android:layout_width="match_parent"
  25. android:layout_height="0dp"
  26. android:adjustViewBounds="true"
  27. android:onClick="@{()-> homePageViewModel.onBannerClick()}"
  28. android:src="@drawable/bg_home_banner"
  29. app:layout_constraintTop_toTopOf="parent" />
  30. <TextView
  31. android:id="@+id/tv_recover_btn"
  32. android:layout_width="0dp"
  33. android:layout_height="0dp"
  34. android:background="@drawable/bg_home_recover_btn"
  35. android:gravity="center"
  36. app:layout_constraintBottom_toBottomOf="@id/iv_banner"
  37. app:layout_constraintDimensionRatio="110:35.5"
  38. app:layout_constraintHorizontal_bias="0.129"
  39. app:layout_constraintLeft_toLeftOf="@id/iv_banner"
  40. app:layout_constraintRight_toRightOf="@id/iv_banner"
  41. app:layout_constraintTop_toTopOf="@id/iv_banner"
  42. app:layout_constraintVertical_bias="0.72"
  43. app:layout_constraintWidth_percent="0.3055555555555556" />
  44. <TextView
  45. android:layout_width="wrap_content"
  46. android:layout_height="wrap_content"
  47. android:drawablePadding="3dp"
  48. android:text="免费解锁"
  49. android:textColor="#1F49EB"
  50. android:textSize="12sp"
  51. android:textStyle="bold"
  52. app:drawableStartCompat="@drawable/icon_home_recover_btn"
  53. app:layout_constraintBottom_toBottomOf="@id/tv_recover_btn"
  54. app:layout_constraintLeft_toLeftOf="@id/tv_recover_btn"
  55. app:layout_constraintRight_toRightOf="@id/tv_recover_btn"
  56. app:layout_constraintTop_toTopOf="@id/tv_recover_btn" />
  57. <ImageView
  58. android:id="@+id/home_tab_indicator"
  59. android:layout_width="match_parent"
  60. android:layout_height="wrap_content"
  61. android:layout_marginTop="-21dp"
  62. android:adjustViewBounds="true"
  63. android:src="@drawable/selector_home_page_tab_indicator"
  64. app:Selected="@{homePageViewModel.isQQSelected}"
  65. app:layout_constraintTop_toBottomOf="@id/iv_banner" />
  66. <View
  67. android:id="@+id/wechat_click_area"
  68. android:layout_width="0dp"
  69. android:layout_height="0dp"
  70. android:onClick="@{()-> homePageViewModel.onWeChatAreaClick()}"
  71. app:layout_constraintBottom_toBottomOf="@id/home_tab_indicator"
  72. app:layout_constraintLeft_toLeftOf="@id/home_tab_indicator"
  73. app:layout_constraintRight_toLeftOf="@id/qq_click_area"
  74. app:layout_constraintTop_toTopOf="@id/home_tab_indicator" />
  75. <View
  76. android:id="@+id/qq_click_area"
  77. android:layout_width="0dp"
  78. android:layout_height="0dp"
  79. android:onClick="@{()-> homePageViewModel.onQQAreaClick()}"
  80. app:layout_constraintBottom_toBottomOf="@id/home_tab_indicator"
  81. app:layout_constraintLeft_toRightOf="@id/wechat_click_area"
  82. app:layout_constraintRight_toRightOf="@id/home_tab_indicator"
  83. app:layout_constraintTop_toTopOf="@id/home_tab_indicator" />
  84. <Space
  85. android:id="@+id/space3"
  86. android:layout_width="match_parent"
  87. android:layout_height="0dp"
  88. app:layout_constraintDimensionRatio="360:11"
  89. app:layout_constraintTop_toBottomOf="@+id/home_tab_indicator" />
  90. <View
  91. android:id="@+id/v_information_bg"
  92. android:layout_width="match_parent"
  93. android:layout_height="0dp"
  94. android:layout_marginHorizontal="@dimen/app_common_page_horizontal_padding"
  95. android:background="@drawable/bg_home_page_scroll"
  96. app:layout_constraintDimensionRatio="328:32"
  97. app:layout_constraintLeft_toLeftOf="parent"
  98. app:layout_constraintRight_toRightOf="parent"
  99. app:layout_constraintTop_toBottomOf="@+id/space3" />
  100. <TextView
  101. android:id="@+id/tv_information"
  102. android:layout_width="0dp"
  103. android:layout_height="0dp"
  104. android:layout_marginStart="8dp"
  105. android:background="@drawable/selector_home_page_information"
  106. android:gravity="center"
  107. android:text="@string/home_page_information"
  108. android:textColor="@color/white"
  109. android:textSize="12dp"
  110. app:Selected="@{homePageViewModel.isQQSelected}"
  111. app:layout_constraintBottom_toBottomOf="@+id/v_information_bg"
  112. app:layout_constraintDimensionRatio="32:16"
  113. app:layout_constraintStart_toStartOf="@+id/v_information_bg"
  114. app:layout_constraintTop_toTopOf="@+id/v_information_bg"
  115. app:layout_constraintWidth_percent="0.0888888888888889" />
  116. <ViewSwitcher
  117. android:id="@+id/view_switcher"
  118. android:layout_width="0dp"
  119. android:layout_height="wrap_content"
  120. android:layout_marginHorizontal="8dp"
  121. app:layout_constraintBottom_toBottomOf="@+id/v_information_bg"
  122. app:layout_constraintLeft_toRightOf="@+id/tv_information"
  123. app:layout_constraintRight_toRightOf="@+id/v_information_bg"
  124. app:layout_constraintTop_toTopOf="@+id/v_information_bg" />
  125. <Space
  126. android:id="@+id/space5"
  127. android:layout_width="match_parent"
  128. android:layout_height="0dp"
  129. app:layout_constraintDimensionRatio="360:16"
  130. app:layout_constraintTop_toBottomOf="@+id/v_information_bg" />
  131. <View
  132. android:layout_width="0dp"
  133. android:layout_height="0dp"
  134. android:background="@drawable/selector_icon_hot_function_light"
  135. app:Selected="@{homePageViewModel.isQQSelected}"
  136. app:layout_constraintBottom_toBottomOf="@id/tv_hot_function"
  137. app:layout_constraintDimensionRatio="1:1"
  138. app:layout_constraintLeft_toRightOf="@id/tv_hot_function"
  139. app:layout_constraintRight_toRightOf="@id/tv_hot_function"
  140. app:layout_constraintWidth_percent="0.0361111111111111" />
  141. <TextView
  142. android:id="@+id/tv_hot_function"
  143. style="@style/Home_Page_Title_Text"
  144. android:layout_width="wrap_content"
  145. android:layout_height="wrap_content"
  146. android:layout_marginStart="@dimen/app_common_page_horizontal_padding"
  147. android:text="@string/home_page_hot_function"
  148. app:layout_constraintStart_toStartOf="parent"
  149. app:layout_constraintTop_toBottomOf="@+id/space5" />
  150. <Space
  151. android:id="@+id/space6"
  152. android:layout_width="match_parent"
  153. android:layout_height="0dp"
  154. app:layout_constraintDimensionRatio="360:12"
  155. app:layout_constraintTop_toBottomOf="@+id/tv_hot_function" />
  156. <androidx.recyclerview.widget.RecyclerView
  157. android:id="@+id/ry_other_function"
  158. android:layout_width="match_parent"
  159. android:layout_height="wrap_content"
  160. android:layout_marginHorizontal="@dimen/app_common_page_horizontal_padding"
  161. android:overScrollMode="never"
  162. android:scrollbars="none"
  163. app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
  164. app:layout_constraintTop_toBottomOf="@+id/space6"
  165. app:spanCount="2"
  166. tools:itemCount="6"
  167. tools:listitem="@layout/item_home_page_other_function" />
  168. <Space
  169. android:id="@+id/space9"
  170. android:layout_width="match_parent"
  171. android:layout_height="0dp"
  172. app:layout_constraintDimensionRatio="360:20"
  173. app:layout_constraintTop_toBottomOf="@+id/ry_other_function" />
  174. </androidx.constraintlayout.widget.ConstraintLayout>
  175. </androidx.core.widget.NestedScrollView>
  176. <ImageView
  177. android:layout_width="0dp"
  178. android:layout_height="wrap_content"
  179. android:layout_marginHorizontal="@dimen/app_common_page_horizontal_padding"
  180. android:adjustViewBounds="true"
  181. android:onClick="@{()-> homePageViewModel.onBackupHelperClick()}"
  182. android:src="@drawable/icon_backup_helper_enter"
  183. app:layout_constraintBottom_toBottomOf="parent"
  184. app:layout_constraintRight_toRightOf="parent"
  185. app:layout_constraintTop_toTopOf="parent"
  186. app:layout_constraintVertical_bias="0.958"
  187. app:layout_constraintWidth_percent="0.375" />
  188. </androidx.constraintlayout.widget.ConstraintLayout>
  189. </layout>