activity_new_splash.xml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  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="newSplashViewModel"
  8. type="com.atmob.voiceai.module.newsplash.NewSplashViewModel" />
  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. <com.airbnb.lottie.LottieAnimationView
  15. isGone="@{newSplashViewModel.isShowRecommendPage}"
  16. android:layout_width="0dp"
  17. android:layout_height="0dp"
  18. app:layout_constraintBottom_toBottomOf="parent"
  19. app:layout_constraintDimensionRatio="1:1"
  20. app:layout_constraintEnd_toEndOf="parent"
  21. app:layout_constraintStart_toStartOf="parent"
  22. app:layout_constraintTop_toTopOf="parent"
  23. app:layout_constraintVertical_bias="0.6657608695652174"
  24. app:layout_constraintWidth_percent="0.8"
  25. app:lottie_autoPlay="true"
  26. app:lottie_fileName="anim/splash_loading.zip"
  27. app:lottie_loop="true" />
  28. <androidx.constraintlayout.widget.ConstraintLayout
  29. isGone="@{!newSplashViewModel.isShowRecommendPage}"
  30. android:layout_width="match_parent"
  31. android:layout_height="match_parent"
  32. android:background="@color/colorPrimary">
  33. <ImageView
  34. android:layout_width="match_parent"
  35. android:layout_height="0dp"
  36. android:src="@drawable/bg_new_splash_header"
  37. app:layout_constraintDimensionRatio="1080:936"
  38. app:layout_constraintTop_toTopOf="parent" />
  39. <androidx.core.widget.NestedScrollView
  40. android:layout_width="match_parent"
  41. android:layout_height="match_parent"
  42. app:layout_constrainedHeight="true"
  43. app:layout_constraintBottom_toTopOf="@+id/tv_auto_renewable"
  44. app:layout_constraintTop_toTopOf="parent">
  45. <androidx.constraintlayout.widget.ConstraintLayout
  46. android:layout_width="match_parent"
  47. android:layout_height="match_parent">
  48. <Space
  49. android:id="@+id/space_status_bar"
  50. android:layout_width="match_parent"
  51. android:layout_height="@{SizeUtil.getStatusBarHeight(), default=@dimen/app_status_bar_height}"
  52. app:layout_constraintTop_toTopOf="parent" />
  53. <Space
  54. android:id="@+id/space1"
  55. android:layout_width="match_parent"
  56. android:layout_height="0dp"
  57. app:layout_constraintDimensionRatio="360:16"
  58. app:layout_constraintTop_toBottomOf="@+id/space_status_bar" />
  59. <ImageView
  60. android:onClick="@{()-> newSplashViewModel.onBackClick()}"
  61. isInvisible="@{!newSplashViewModel.isShowCloseBtn}"
  62. android:id="@+id/iv_close"
  63. android:layout_width="0dp"
  64. android:layout_height="0dp"
  65. android:layout_marginStart="14dp"
  66. android:src="@drawable/icon_new_splash_close"
  67. app:layout_constraintDimensionRatio="1:1"
  68. app:layout_constraintStart_toStartOf="parent"
  69. app:layout_constraintTop_toBottomOf="@+id/space1"
  70. app:layout_constraintWidth_percent="0.1" />
  71. <Space
  72. android:id="@+id/space2"
  73. android:layout_width="match_parent"
  74. android:layout_height="0dp"
  75. app:layout_constraintDimensionRatio="360:33"
  76. app:layout_constraintTop_toBottomOf="@+id/iv_close" />
  77. <ImageView
  78. android:id="@+id/iv_logo"
  79. android:layout_width="0dp"
  80. android:layout_height="0dp"
  81. android:src="@drawable/ic_splash_logo"
  82. app:layout_constraintDimensionRatio="421:277"
  83. app:layout_constraintEnd_toEndOf="parent"
  84. app:layout_constraintStart_toStartOf="parent"
  85. app:layout_constraintTop_toBottomOf="@+id/space2"
  86. app:layout_constraintWidth_percent="0.3888888888888889" />
  87. <TextView
  88. android:id="@+id/tv_title"
  89. android:layout_width="wrap_content"
  90. android:layout_height="wrap_content"
  91. android:layout_marginTop="12dp"
  92. android:text="@string/new_splash_title"
  93. android:textColor="@color/white80"
  94. android:textSize="14sp"
  95. app:layout_constraintEnd_toEndOf="parent"
  96. app:layout_constraintStart_toStartOf="parent"
  97. app:layout_constraintTop_toBottomOf="@id/iv_logo" />
  98. <Space
  99. android:id="@+id/space3"
  100. android:layout_width="match_parent"
  101. android:layout_height="0dp"
  102. app:layout_constraintDimensionRatio="360:33"
  103. app:layout_constraintTop_toBottomOf="@+id/tv_title" />
  104. <LinearLayout
  105. android:id="@+id/ll_content"
  106. android:layout_width="match_parent"
  107. android:layout_height="wrap_content"
  108. android:orientation="vertical"
  109. app:layout_constraintTop_toBottomOf="@+id/space3">
  110. <include
  111. introduceContent="@{@string/new_splash_unlimited_content}"
  112. introduceIcon="@{@drawable/icon_new_splash_unlimited}"
  113. introduceTitle="@{@string/new_splash_unlimited_title}"
  114. layout="@layout/layout_new_splash_introduce"
  115. android:layout_width="match_parent"
  116. android:layout_height="wrap_content"
  117. android:layout_marginBottom="10dp" />
  118. <include
  119. introduceContent="@{@string/new_splash_limits_content}"
  120. introduceIcon="@{@drawable/icon_new_splash_limits}"
  121. introduceTitle="@{@string/new_splash_limits_title}"
  122. layout="@layout/layout_new_splash_introduce"
  123. android:layout_width="match_parent"
  124. android:layout_height="wrap_content"
  125. android:layout_marginBottom="10dp" />
  126. <include
  127. introduceContent="@{@string/new_splash_turbo_content}"
  128. introduceIcon="@{@drawable/icon_new_splash_turbo}"
  129. introduceTitle="@{@string/new_splash_turbo_title}"
  130. layout="@layout/layout_new_splash_introduce"
  131. android:layout_width="match_parent"
  132. android:layout_height="wrap_content"
  133. android:layout_marginBottom="10dp" />
  134. <include
  135. introduceContent="@{@string/new_splash_no_ad_content}"
  136. introduceIcon="@{@drawable/icon_new_splash_no_ad}"
  137. introduceTitle="@{@string/new_splash_no_ad_title}"
  138. layout="@layout/layout_new_splash_introduce"
  139. android:layout_width="match_parent"
  140. android:layout_height="wrap_content"
  141. android:layout_marginBottom="10dp" />
  142. </LinearLayout>
  143. <TextView
  144. android:id="@+id/tv_subscribe_price_desc"
  145. android:layout_width="wrap_content"
  146. android:layout_height="wrap_content"
  147. android:textColor="@color/white"
  148. android:textSize="20sp"
  149. app:layout_constraintEnd_toEndOf="parent"
  150. app:layout_constraintStart_toStartOf="parent"
  151. app:layout_constraintTop_toBottomOf="@+id/ll_content"
  152. tools:text="US$ 3.99/Week" />
  153. <TextView
  154. android:layout_width="wrap_content"
  155. android:layout_height="wrap_content"
  156. android:layout_marginTop="11dp"
  157. android:drawablePadding="5.5dp"
  158. android:textColor="#BEBFBE"
  159. android:textSize="12sp"
  160. app:drawableStartCompat="@drawable/icon_total_integration"
  161. app:layout_constraintEnd_toEndOf="@+id/tv_subscribe_price_desc"
  162. app:layout_constraintStart_toStartOf="@+id/tv_subscribe_price_desc"
  163. app:layout_constraintTop_toBottomOf="@+id/tv_subscribe_price_desc"
  164. tools:text="20000 renew yearly" />
  165. </androidx.constraintlayout.widget.ConstraintLayout>
  166. </androidx.core.widget.NestedScrollView>
  167. <Space
  168. android:id="@+id/space_bottom"
  169. android:layout_width="match_parent"
  170. android:layout_height="0dp"
  171. app:layout_constraintBottom_toBottomOf="parent"
  172. app:layout_constraintDimensionRatio="360:22" />
  173. <TextView
  174. android:onClick="@{()-> newSplashViewModel.onTermsClick()}"
  175. android:id="@+id/tv_terms_of_service"
  176. android:layout_width="wrap_content"
  177. android:layout_height="wrap_content"
  178. android:text="@string/setting_terms_of_service"
  179. android:textColor="@color/white80"
  180. android:textSize="12sp"
  181. app:layout_constraintBottom_toTopOf="@+id/space_bottom"
  182. app:layout_constraintLeft_toLeftOf="parent"
  183. app:layout_constraintRight_toLeftOf="@+id/tv_restore" />
  184. <TextView
  185. android:id="@+id/tv_restore"
  186. android:layout_width="wrap_content"
  187. android:layout_height="wrap_content"
  188. android:text="@string/sub_restore"
  189. android:textColor="@color/white80"
  190. android:textSize="12sp"
  191. app:layout_constraintBottom_toBottomOf="@+id/tv_terms_of_service"
  192. app:layout_constraintLeft_toRightOf="@+id/tv_terms_of_service"
  193. app:layout_constraintRight_toLeftOf="@+id/tv_privacy_policy"
  194. app:layout_constraintTop_toTopOf="@+id/tv_terms_of_service" />
  195. <TextView
  196. android:onClick="@{()-> newSplashViewModel.onPrivacyPolicyClick()}"
  197. android:id="@+id/tv_privacy_policy"
  198. android:layout_width="wrap_content"
  199. android:layout_height="wrap_content"
  200. android:text="@string/setting_privacy_policy"
  201. android:textColor="@color/white80"
  202. android:textSize="12sp"
  203. app:layout_constraintBottom_toBottomOf="@+id/tv_restore"
  204. app:layout_constraintLeft_toRightOf="@+id/tv_restore"
  205. app:layout_constraintRight_toRightOf="parent"
  206. app:layout_constraintTop_toTopOf="@+id/tv_restore" />
  207. <Space
  208. android:id="@+id/space_bottom2"
  209. android:layout_width="match_parent"
  210. android:layout_height="0dp"
  211. app:layout_constraintBottom_toTopOf="@+id/tv_terms_of_service"
  212. app:layout_constraintDimensionRatio="360:10" />
  213. <TextView
  214. android:id="@+id/tv_continue"
  215. android:layout_width="match_parent"
  216. android:layout_height="0dp"
  217. android:layout_marginHorizontal="@dimen/app_common_page_horizontal_padding"
  218. android:background="@drawable/bg_voice_ai_btn"
  219. android:gravity="center"
  220. android:text="@string/splash_continue"
  221. android:textColor="@color/colorPrimary"
  222. android:textSize="17sp"
  223. android:textStyle="bold"
  224. app:layout_constraintBottom_toTopOf="@+id/space_bottom2"
  225. app:layout_constraintDimensionRatio="336:48" />
  226. <TextView
  227. android:id="@+id/tv_auto_renewable"
  228. android:layout_width="wrap_content"
  229. android:layout_height="wrap_content"
  230. android:layout_marginBottom="8dp"
  231. android:text="@string/splash_aunto_renewable"
  232. android:textColor="@color/white70"
  233. android:textSize="12sp"
  234. app:layout_constraintBottom_toTopOf="@+id/tv_continue"
  235. app:layout_constraintEnd_toEndOf="parent"
  236. app:layout_constraintStart_toStartOf="parent" />
  237. </androidx.constraintlayout.widget.ConstraintLayout>
  238. </androidx.constraintlayout.widget.ConstraintLayout>
  239. </layout>