activity_welcome.xml 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:app="http://schemas.android.com/apk/res-auto"
  4. android:orientation="vertical"
  5. android:layout_width="match_parent"
  6. android:layout_height="match_parent"
  7. android:animateLayoutChanges="true"
  8. android:fitsSystemWindows="true">
  9. <LinearLayout
  10. android:id="@+id/ll_info"
  11. android:layout_width="match_parent"
  12. android:layout_height="wrap_content"
  13. android:orientation="vertical"
  14. app:layout_constraintStart_toStartOf="parent"
  15. app:layout_constraintTop_toTopOf="parent">
  16. <ImageView
  17. android:layout_width="56dp"
  18. android:layout_height="wrap_content"
  19. android:layout_marginStart="16dp"
  20. android:layout_marginTop="48dp"
  21. android:scaleType="centerCrop"
  22. android:src="@drawable/ic_launcher_foreground" />
  23. <TextView
  24. android:id="@+id/tv_title"
  25. android:layout_width="match_parent"
  26. android:layout_height="wrap_content"
  27. android:layout_marginHorizontal="16dp"
  28. android:text="@string/welcome_title"
  29. android:textSize="36sp"
  30. android:textStyle="bold" />
  31. <TextView
  32. android:id="@+id/tv_summary"
  33. android:layout_width="match_parent"
  34. android:layout_height="wrap_content"
  35. android:textSize="16sp"
  36. android:layout_marginHorizontal="16dp"
  37. android:layout_marginTop="8dp"
  38. android:layout_marginBottom="16dp"
  39. android:text="@string/first_read"
  40. android:textStyle="bold" />
  41. <com.google.android.material.progressindicator.LinearProgressIndicator
  42. android:id="@+id/progress_bar"
  43. android:layout_width="match_parent"
  44. android:layout_height="wrap_content"
  45. app:indicatorColor="?attr/colorSecondary"
  46. app:waveAmplitude="4dp"
  47. app:waveSpeed="32dp"
  48. app:wavelength="80dp" />
  49. </LinearLayout>
  50. <androidx.viewpager2.widget.ViewPager2
  51. android:id="@+id/viewPager"
  52. android:layout_width="match_parent"
  53. android:layout_height="0dp"
  54. android:layout_marginTop="8dp"
  55. android:layout_weight="1"
  56. app:layout_constraintBottom_toTopOf="@id/btnNext"
  57. app:layout_constraintTop_toBottomOf="@id/ll_info" />
  58. <com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
  59. android:id="@+id/btnNext"
  60. android:layout_width="wrap_content"
  61. android:layout_height="wrap_content"
  62. android:layout_gravity="end"
  63. android:layout_margin="16dp"
  64. android:text="@string/text"
  65. app:icon="@drawable/ic_arrow_right"
  66. app:layout_constraintBottom_toBottomOf="parent"
  67. app:layout_constraintEnd_toEndOf="parent" />
  68. </androidx.constraintlayout.widget.ConstraintLayout>