|
|
@@ -1,7 +1,243 @@
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
-<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
|
- android:layout_width="match_parent"
|
|
|
- android:background="@drawable/bg_theme_splash"
|
|
|
- android:layout_height="match_parent">
|
|
|
+<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
|
+ xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
|
+ xmlns:tools="http://schemas.android.com/tools">
|
|
|
|
|
|
-</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
+ <data>
|
|
|
+
|
|
|
+ <variable
|
|
|
+ name="splashViewModel"
|
|
|
+ type="com.atmob.voiceai.module.splash.SplashViewModel" />
|
|
|
+
|
|
|
+ <import type="com.atmob.common.ui.SizeUtil" />
|
|
|
+ </data>
|
|
|
+
|
|
|
+ <androidx.constraintlayout.widget.ConstraintLayout
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="match_parent"
|
|
|
+ android:background="@drawable/bg_theme_splash">
|
|
|
+
|
|
|
+ <androidx.constraintlayout.widget.ConstraintLayout
|
|
|
+ android:id="@+id/guide_layout"
|
|
|
+ isGone="@{!splashViewModel.showGuide}"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="match_parent">
|
|
|
+
|
|
|
+ <Space
|
|
|
+ android:id="@+id/space_status"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="@{SizeUtil.getStatusBarHeight(), default=@dimen/app_status_bar_height}"
|
|
|
+ app:layout_constraintTop_toTopOf="parent" />
|
|
|
+
|
|
|
+ <View
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="match_parent"
|
|
|
+ android:background="@color/colorPrimary" />
|
|
|
+
|
|
|
+ <Space
|
|
|
+ android:id="@+id/space1"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="0dp"
|
|
|
+ app:layout_constraintDimensionRatio="360:46"
|
|
|
+ app:layout_constraintTop_toBottomOf="@+id/space_status" />
|
|
|
+
|
|
|
+ <ImageView
|
|
|
+ android:id="@+id/iv_guide_header1"
|
|
|
+ android:layout_width="0dp"
|
|
|
+ android:layout_height="0dp"
|
|
|
+ android:alpha="0"
|
|
|
+ android:src="@drawable/splash_guide_header_1"
|
|
|
+ app:layout_constraintDimensionRatio="232:33"
|
|
|
+ app:layout_constraintEnd_toEndOf="parent"
|
|
|
+ app:layout_constraintStart_toStartOf="parent"
|
|
|
+ app:layout_constraintTop_toBottomOf="@+id/space1"
|
|
|
+ app:layout_constraintWidth_percent="0.6444444444444444" />
|
|
|
+
|
|
|
+
|
|
|
+ <TextView
|
|
|
+ android:id="@+id/tv_guide_header1"
|
|
|
+ android:layout_width="0dp"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:layout_marginTop="8dp"
|
|
|
+ android:alpha="0"
|
|
|
+ android:text="@string/splash_generate_header_txt_1"
|
|
|
+ android:textColor="@color/white"
|
|
|
+ android:textSize="14sp"
|
|
|
+ app:layout_constraintEnd_toEndOf="parent"
|
|
|
+ app:layout_constraintStart_toStartOf="parent"
|
|
|
+ app:layout_constraintTop_toBottomOf="@+id/iv_guide_header1"
|
|
|
+ app:layout_constraintWidth_percent="0.7777777777777778" />
|
|
|
+
|
|
|
+ <Space
|
|
|
+ android:id="@+id/space2"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="0dp"
|
|
|
+ app:layout_constraintDimensionRatio="360:27"
|
|
|
+ app:layout_constraintTop_toBottomOf="@+id/tv_guide_header1" />
|
|
|
+
|
|
|
+ <ImageView
|
|
|
+ android:id="@+id/iv_guide1"
|
|
|
+ x="@{SizeUtil.getScreenWidth()}"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="0dp"
|
|
|
+ android:src="@drawable/splash_guide_1"
|
|
|
+ app:layout_constraintDimensionRatio="360:320"
|
|
|
+ app:layout_constraintTop_toBottomOf="@+id/space2"
|
|
|
+ tools:visibility="gone" />
|
|
|
+
|
|
|
+
|
|
|
+ <ImageView
|
|
|
+ android:id="@+id/iv_guide_header2"
|
|
|
+ android:layout_width="0dp"
|
|
|
+ android:layout_height="0dp"
|
|
|
+ android:alpha="0"
|
|
|
+ android:src="@drawable/splash_guide_header_2"
|
|
|
+ app:layout_constraintDimensionRatio="214:33"
|
|
|
+ app:layout_constraintEnd_toEndOf="parent"
|
|
|
+ app:layout_constraintStart_toStartOf="parent"
|
|
|
+ app:layout_constraintTop_toBottomOf="@+id/space1"
|
|
|
+ app:layout_constraintWidth_percent="0.5944444444444444" />
|
|
|
+
|
|
|
+ <TextView
|
|
|
+ android:id="@+id/tv_guide_header2"
|
|
|
+ android:layout_width="0dp"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:layout_marginTop="8dp"
|
|
|
+ android:alpha="0"
|
|
|
+ android:text="@string/splash_generate_header_txt_2"
|
|
|
+ android:textColor="@color/white"
|
|
|
+ android:textSize="14sp"
|
|
|
+ app:layout_constraintEnd_toEndOf="parent"
|
|
|
+ app:layout_constraintStart_toStartOf="parent"
|
|
|
+ app:layout_constraintTop_toBottomOf="@+id/iv_guide_header1"
|
|
|
+ app:layout_constraintWidth_percent="0.7777777777777778" />
|
|
|
+
|
|
|
+
|
|
|
+ <Space
|
|
|
+ android:id="@+id/space3"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="0dp"
|
|
|
+ app:layout_constraintDimensionRatio="360:27"
|
|
|
+ app:layout_constraintTop_toBottomOf="@+id/tv_guide_header2" />
|
|
|
+
|
|
|
+ <ImageView
|
|
|
+ android:id="@+id/iv_guide2"
|
|
|
+ x="@{SizeUtil.getScreenWidth()}"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="0dp"
|
|
|
+ android:src="@drawable/splash_guide_2"
|
|
|
+ app:layout_constraintDimensionRatio="360:320"
|
|
|
+ app:layout_constraintTop_toBottomOf="@+id/space3"
|
|
|
+ tools:visibility="gone" />
|
|
|
+
|
|
|
+ <androidx.recyclerview.widget.RecyclerView
|
|
|
+ android:id="@+id/rv_guide"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="match_parent"
|
|
|
+ android:alpha="0" />
|
|
|
+
|
|
|
+ <View
|
|
|
+ android:id="@+id/v_guide_mask"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="match_parent"
|
|
|
+ android:alpha="0"
|
|
|
+ android:background="@drawable/rv_guide_mask" />
|
|
|
+
|
|
|
+ <TextView
|
|
|
+ android:id="@+id/tv_guide_done"
|
|
|
+ android:layout_width="0dp"
|
|
|
+ android:layout_height="0dp"
|
|
|
+ android:alpha="0"
|
|
|
+ android:background="@drawable/bg_voice_ai_btn"
|
|
|
+ android:gravity="center"
|
|
|
+ android:onClick="@{()-> splashViewModel.onGuideDoneClick()}"
|
|
|
+ android:text="@string/splash_guide_done"
|
|
|
+ android:textColor="@color/colorPrimary"
|
|
|
+ android:textSize="17sp"
|
|
|
+ android:textStyle="bold"
|
|
|
+ android:visibility="gone"
|
|
|
+ app:layout_constraintBottom_toBottomOf="parent"
|
|
|
+ app:layout_constraintDimensionRatio="240:48"
|
|
|
+ app:layout_constraintEnd_toEndOf="parent"
|
|
|
+ app:layout_constraintStart_toStartOf="parent"
|
|
|
+ app:layout_constraintTop_toBottomOf="@id/space_status"
|
|
|
+ app:layout_constraintVertical_bias="0.8732394366197183"
|
|
|
+ app:layout_constraintWidth_percent="0.6666666666666667" />
|
|
|
+
|
|
|
+ <TextView
|
|
|
+ android:id="@+id/tv_privacy_policy"
|
|
|
+ android:layout_width="0dp"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:alpha="0"
|
|
|
+ android:gravity="center"
|
|
|
+ android:textColor="@color/white80"
|
|
|
+ android:textSize="12sp"
|
|
|
+ android:visibility="gone"
|
|
|
+ app:layout_constraintBottom_toBottomOf="parent"
|
|
|
+ app:layout_constraintEnd_toEndOf="parent"
|
|
|
+ app:layout_constraintStart_toStartOf="parent"
|
|
|
+ app:layout_constraintTop_toBottomOf="@+id/tv_guide_done"
|
|
|
+ app:layout_constraintVertical_bias="0.6363636363636364"
|
|
|
+ app:layout_constraintWidth_percent="0.7611111111111111"
|
|
|
+ tools:text="After clicking the button, you agree to the app’s
|
|
|
+privacy policy and Terms of service" />
|
|
|
+
|
|
|
+ <Space
|
|
|
+ android:id="@+id/space4"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="0dp"
|
|
|
+ app:layout_constraintBottom_toTopOf="@+id/tv_guide_done"
|
|
|
+ app:layout_constraintDimensionRatio="360:48" />
|
|
|
+
|
|
|
+ <TextView
|
|
|
+ android:id="@+id/tv_practical"
|
|
|
+ android:layout_width="match_parent"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:alpha="0"
|
|
|
+ android:gravity="center"
|
|
|
+ android:text="@string/splash_practical_txt"
|
|
|
+ android:textColor="@color/white"
|
|
|
+ android:textSize="32sp"
|
|
|
+ android:textStyle="bold"
|
|
|
+ android:visibility="gone"
|
|
|
+ app:layout_constraintBottom_toTopOf="@+id/space4" />
|
|
|
+
|
|
|
+ <TextView
|
|
|
+ android:id="@+id/tv_practical_funny"
|
|
|
+ android:layout_width="wrap_content"
|
|
|
+ android:layout_height="wrap_content"
|
|
|
+ android:layout_marginBottom="12dp"
|
|
|
+ android:alpha="0"
|
|
|
+ android:text="@string/splash_practical_funny_txt"
|
|
|
+ android:textColor="@color/white50"
|
|
|
+ android:textSize="17sp"
|
|
|
+ android:visibility="gone"
|
|
|
+ app:layout_constraintBottom_toTopOf="@+id/tv_practical"
|
|
|
+ app:layout_constraintEnd_toEndOf="parent"
|
|
|
+ app:layout_constraintStart_toStartOf="parent" />
|
|
|
+
|
|
|
+
|
|
|
+ <TextView
|
|
|
+ android:id="@+id/tv_next_step"
|
|
|
+ isGone="@{!splashViewModel.showGuide}"
|
|
|
+ android:layout_width="0dp"
|
|
|
+ android:layout_height="0dp"
|
|
|
+ android:background="@drawable/bg_splash_continue"
|
|
|
+ android:gravity="center"
|
|
|
+ android:onClick="@{()-> splashViewModel.onContinueClick(splashViewModel.currentGuide)}"
|
|
|
+ android:text="@string/splash_continue"
|
|
|
+ android:textColor="@color/white"
|
|
|
+ android:textSize="17sp"
|
|
|
+ android:textStyle="bold"
|
|
|
+ app:layout_constraintBottom_toBottomOf="parent"
|
|
|
+ app:layout_constraintDimensionRatio="248:48"
|
|
|
+ app:layout_constraintEnd_toEndOf="parent"
|
|
|
+ app:layout_constraintStart_toStartOf="parent"
|
|
|
+ app:layout_constraintTop_toBottomOf="@+id/space_status"
|
|
|
+ app:layout_constraintVertical_bias="0.9154929577464789"
|
|
|
+ app:layout_constraintWidth_percent="0.6888888888888889" />
|
|
|
+
|
|
|
+ </androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
+
|
|
|
+ </androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
+</layout>
|