Advertisement
muhamad_lukman

activity_onboarding

Apr 25th, 2022
954
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 4.52 KB | None | 0 0
  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.    xmlns:tools="http://schemas.android.com/tools"
  5.    android:layout_width="match_parent"
  6.    android:layout_height="match_parent"
  7.    android:background="@color/primary_black"
  8.    tools:context=".presentation.onboarding.OnBoardingActivity">
  9.  
  10.     <androidx.viewpager.widget.ViewPager
  11.        android:id="@+id/view_pager_onboarding"
  12.        android:layout_width="match_parent"
  13.        android:layout_height="0dp"
  14.        app:layout_constraintBottom_toTopOf="@+id/tab_layout_dot"
  15.        app:layout_constraintEnd_toEndOf="parent"
  16.        app:layout_constraintHorizontal_bias="0.0"
  17.        app:layout_constraintStart_toStartOf="parent"
  18.        app:layout_constraintTop_toTopOf="parent" />
  19.  
  20.     <com.google.android.material.tabs.TabLayout
  21.        android:id="@+id/tab_layout_dot"
  22.        android:layout_width="match_parent"
  23.        android:layout_height="wrap_content"
  24.        android:layout_alignParentBottom="true"
  25.        android:layout_marginStart="56dp"
  26.        android:layout_marginTop="56dp"
  27.        android:layout_marginEnd="56dp"
  28.        android:background="@color/primary_black"
  29.        app:layout_constraintBottom_toBottomOf="parent"
  30.        app:layout_constraintBottom_toTopOf="@+id/layout_skip_next"
  31.        app:layout_constraintEnd_toEndOf="parent"
  32.        app:layout_constraintHorizontal_bias="0.0"
  33.        app:layout_constraintStart_toStartOf="parent"
  34.        app:tabBackground="@drawable/tab_selector_onboarding"
  35.        app:tabGravity="center"
  36.        app:tabIndicatorHeight="0dp" />
  37.  
  38.     <RelativeLayout
  39.        android:id="@+id/layout_skip_next"
  40.        android:layout_width="match_parent"
  41.        android:layout_height="wrap_content"
  42.        android:layout_margin="40dp"
  43.        android:orientation="horizontal"
  44.        app:layout_constraintBottom_toBottomOf="parent"
  45.        app:layout_constraintEnd_toEndOf="parent"
  46.        app:layout_constraintStart_toStartOf="parent">
  47.  
  48.         <TextView
  49.            android:id="@+id/btn_skip"
  50.            style="@style/TextRegular"
  51.            android:layout_width="wrap_content"
  52.            android:layout_height="wrap_content"
  53.            android:layout_alignParentStart="true"
  54.            android:layout_alignParentLeft="true"
  55.            android:layout_alignParentTop="true"
  56.            android:layout_marginTop="20dp"
  57.            android:text="@string/skip"
  58.            android:textColor="@color/teal_200"
  59.            android:textSize="15sp"
  60.            android:textStyle="bold"
  61.            android:visibility="visible" />
  62.  
  63.         <com.google.android.material.button.MaterialButton
  64.            android:id="@+id/btn_next"
  65.            android:layout_width="wrap_content"
  66.            android:layout_height="50dp"
  67.            android:layout_alignParentTop="true"
  68.            android:layout_alignParentEnd="true"
  69.            android:drawableEnd="@drawable/ic_baseline_arrow_forward_24"
  70.            android:drawableTint="@color/white"
  71.            android:text="@string/next"
  72.            android:textAllCaps="false"
  73.  
  74.            android:visibility="visible"
  75.            app:cornerRadius="40dp"
  76.            tools:targetApi="m" />
  77.  
  78.  
  79.         <com.google.android.material.button.MaterialButton
  80.            android:id="@+id/btn_browse"
  81.            android:layout_width="wrap_content"
  82.            android:layout_height="50dp"
  83.            style="@style/Widget.MaterialComponents.Button.OutlinedButton"
  84.            app:strokeColor="@color/green"
  85.            android:layout_alignParentStart="true"
  86.            android:layout_alignParentLeft="true"
  87.            android:layout_alignParentTop="true"
  88.            android:layout_marginEnd="10dp"
  89.            android:text="@string/browse"
  90.            android:textAllCaps="false"
  91.  
  92.            android:visibility="gone"
  93.            app:cornerRadius="40dp" />
  94.  
  95.         <com.google.android.material.button.MaterialButton
  96.            android:id="@+id/btn_sign_in"
  97.            android:visibility="gone"
  98.            android:layout_width="wrap_content"
  99.            android:layout_height="50dp"
  100.            android:layout_marginEnd="10dp"
  101.            android:layout_alignParentTop="true"
  102.            android:layout_alignParentEnd="true"
  103.            android:text="@string/sign_in"
  104.            android:textAllCaps="false"
  105.            app:cornerRadius="40dp" />
  106.     </RelativeLayout>
  107.  
  108. </androidx.constraintlayout.widget.ConstraintLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement