Skip to content

Instantly share code, notes, and snippets.

@cdmunoz
Created April 23, 2020 03:09
Show Gist options
  • Save cdmunoz/b2ceb6fe401ee1f2287780b3d9303422 to your computer and use it in GitHub Desktop.
Save cdmunoz/b2ceb6fe401ee1f2287780b3d9303422 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".OnBoardingFragment">
<!-- Image container -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:orientation="vertical"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/on_boarding_image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="0.4"
android:foreground="@drawable/fade_bottom_effect"
android:scaleType="centerCrop" />
<View
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.6" />
</LinearLayout>
<!-- Text container -->
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/on_boarding_info"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.6">
<TextView
android:id="@+id/on_boarding_text_title"
style="@style/App.OnBoarding.TextTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.Barrier
android:id="@+id/barrier"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="left"
app:constraint_referenced_ids="on_boarding_text_title" />
<TextView
android:id="@+id/on_boarding_text_msg"
style="@style/App.OnBoarding.TextMsg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginEnd="200dp"
app:layout_constraintHorizontal_chainStyle="spread"
app:layout_constraintStart_toEndOf="@+id/barrier"
app:layout_constraintTop_toBottomOf="@+id/on_boarding_text_title" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment