Skip to content

Instantly share code, notes, and snippets.

@rodrigomartind
Last active May 3, 2020 16:54
Show Gist options
  • Save rodrigomartind/6c9c5bca7baf1e84f9317b7de7201888 to your computer and use it in GitHub Desktop.
Save rodrigomartind/6c9c5bca7baf1e84f9317b7de7201888 to your computer and use it in GitHub Desktop.
Tinder MotionLayout
<androidx.constraintlayout.motion.widget.MotionLayout 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"
app:showPaths="true"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layoutDescription="@xml/tinder_scene1"
tools:context=".scenes.TinderScene1Activity">
<com.google.android.material.card.MaterialCardView
android:id="@+id/cardOne"
android:layout_width="270dp"
android:layout_height="424dp"
app:cardBackgroundColor="@color/colorPrimary"
app:cardCornerRadius="24dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
</androidx.constraintlayout.motion.widget.MotionLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment