Skip to content

Instantly share code, notes, and snippets.

@gilgoldzweig
Last active December 27, 2019 10:15
Show Gist options
  • Save gilgoldzweig/a3a9ba516cf69f93d030169ab79c4ff1 to your computer and use it in GitHub Desktop.
Save gilgoldzweig/a3a9ba516cf69f93d030169ab79c4ff1 to your computer and use it in GitHub Desktop.
MotionScene constraint start|-|&tag=MotionLayout
<ConstraintSet android:id="@+id/start">
<Constraint
android:id="@id/search_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:elevation="4dp"
motion:layout_constraintEnd_toEndOf="parent"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintTop_toBottomOf="@id/navigation_icon" />
<Constraint
android:id="@+id/toolbar_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:elevation="4dp"
motion:layout_constraintBottom_toBottomOf="@id/navigation_icon"
motion:layout_constraintStart_toEndOf="@id/navigation_icon"
motion:layout_constraintTop_toTopOf="@id/navigation_icon" />
<Constraint android:id="@id/navigation_icon">
<CustomAttribute
motion:attributeName="ColorFilter"
motion:customColorValue="#000000" />
</Constraint>
<Constraint android:id="@id/menu_icon">
<CustomAttribute
motion:attributeName="ColorFilter"
motion:customColorValue="#000000" />
</Constraint>
</ConstraintSet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment