Advertisement
Guest User

Untitled

a guest
Feb 16th, 2020
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 5.14 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <MotionScene xmlns:motion="http://schemas.android.com/apk/res-auto"
  3.    xmlns:android="http://schemas.android.com/apk/res/android">
  4.  
  5.     <Transition
  6.        motion:constraintSetStart="@id/start_layout_trainer"
  7.        motion:constraintSetEnd="@id/end_layout_trainer"
  8.        motion:duration="1000">
  9.         <OnSwipe
  10.            motion:touchAnchorId="@+id/trainerContentScrollView"
  11.            motion:touchAnchorSide="top"
  12.            motion:dragDirection="dragUp" />
  13.     </Transition>
  14.  
  15.     <Transition
  16.        android:id="@+id/transitionOnImageSwipe"
  17.        motion:constraintSetStart="@id/start_layout_trainer"
  18.        motion:constraintSetEnd="@id/end_layout_image_trainer"
  19.        motion:duration="1000">
  20.         <OnSwipe
  21.            motion:touchAnchorId="@+id/trainerContentScrollView"
  22.            motion:touchAnchorSide="top"
  23.            motion:dragDirection="dragDown" />
  24.     </Transition>
  25.  
  26.     <ConstraintSet android:id="@+id/start_layout_trainer">
  27.  
  28.         <Constraint
  29.            android:id="@id/ivTrainerImage"
  30.            android:layout_width="match_parent"
  31.            android:layout_height="432dp"
  32.            motion:layout_constraintStart_toStartOf="parent"
  33.            motion:layout_constraintEnd_toEndOf="parent"
  34.            motion:layout_constraintTop_toTopOf="parent" />
  35.  
  36.         <Constraint
  37.            android:id="@id/trainerAppBar"
  38.            android:layout_width="match_parent"
  39.            android:layout_height="wrap_content"
  40.            android:visibility="gone"/>
  41.  
  42.         <Constraint
  43.            android:id="@id/ivTrainerArrowBack"
  44.            motion:layout_constraintStart_toStartOf="parent"
  45.            motion:layout_constraintTop_toTopOf="parent"
  46.            android:visibility="visible"
  47.            android:layout_width="wrap_content"
  48.            android:layout_height="wrap_content"/>
  49.  
  50.         <Constraint
  51.            android:id="@id/trainerContentScrollView"
  52.            motion:layout_constraintStart_toStartOf="parent"
  53.            motion:layout_constraintEnd_toEndOf="parent"
  54.            motion:layout_constraintTop_toBottomOf="@id/ivTrainerImage"
  55.            motion:layout_constraintBottom_toBottomOf="parent"
  56.            android:fillViewport="true"
  57.            android:layout_width="match_parent"
  58.            android:layout_height="0dp"/>
  59.  
  60.     </ConstraintSet>
  61.  
  62.     <ConstraintSet android:id="@+id/end_layout_trainer">
  63.  
  64.         <Constraint
  65.            android:id="@id/ivTrainerImage"
  66.            android:layout_width="match_parent"
  67.            android:layout_height="432dp"
  68.            motion:layout_constraintStart_toStartOf="parent"
  69.            motion:layout_constraintBottom_toTopOf="@id/trainerContentScrollView"/>
  70.  
  71.         <Constraint
  72.            android:id="@id/trainerAppBar"
  73.            android:layout_width="match_parent"
  74.            android:layout_height="wrap_content"
  75.            android:visibility="visible"/>
  76.  
  77.         <Constraint
  78.            android:id="@id/ivTrainerArrowBack"
  79.            android:visibility="gone"
  80.            motion:layout_constraintStart_toStartOf="parent"
  81.            motion:layout_constraintBottom_toTopOf="@id/trainerContentScrollView"
  82.            android:layout_width="wrap_content"
  83.            android:layout_height="wrap_content"/>
  84.  
  85.         <Constraint
  86.            android:id="@id/trainerContentScrollView"
  87.            motion:layout_constraintStart_toStartOf="parent"
  88.            motion:layout_constraintEnd_toEndOf="parent"
  89.            motion:layout_constraintTop_toTopOf="parent"
  90.            motion:layout_constraintBottom_toBottomOf="parent"
  91.            android:fillViewport="true"
  92.            android:layout_width="match_parent"
  93.            android:layout_height="match_parent"/>
  94.  
  95.     </ConstraintSet>
  96.  
  97.     <ConstraintSet android:id="@+id/end_layout_image_trainer">
  98.  
  99.         <Constraint
  100.            android:id="@id/ivTrainerImage"
  101.            android:layout_width="600dp"
  102.            android:layout_height="600dp"
  103.            motion:layout_constraintStart_toStartOf="parent"
  104.            motion:layout_constraintEnd_toEndOf="parent"
  105.            motion:layout_constraintTop_toTopOf="parent" />
  106.  
  107.         <Constraint
  108.            android:id="@id/trainerAppBar"
  109.            android:layout_width="match_parent"
  110.            android:layout_height="wrap_content"
  111.            android:visibility="gone"/>
  112.  
  113.         <Constraint
  114.            android:id="@id/ivTrainerArrowBack"
  115.            motion:layout_constraintStart_toStartOf="parent"
  116.            motion:layout_constraintTop_toTopOf="parent"
  117.            android:layout_width="wrap_content"
  118.            android:visibility="visible"
  119.            android:layout_height="wrap_content"/>
  120.  
  121.         <Constraint
  122.            android:id="@id/trainerContentScrollView"
  123.            motion:layout_constraintStart_toStartOf="parent"
  124.            motion:layout_constraintEnd_toEndOf="parent"
  125.            motion:layout_constraintTop_toBottomOf="@id/ivTrainerImage"
  126.            motion:layout_constraintBottom_toBottomOf="parent"
  127.            android:fillViewport="true"
  128.            android:layout_width="match_parent"
  129.            android:layout_height="0dp"/>
  130.  
  131.     </ConstraintSet>
  132.  
  133. </MotionScene>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement