Skip to content

Instantly share code, notes, and snippets.

Gil Goldzweig gilgoldzweig

View GitHub Profile
View sample_collapsing_animation_scene.xml
<?xml version="1.0" encoding="utf-8"?>
<MotionScene xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:motion="http://schemas.android.com/apk/res-auto">
<Transition
motion:constraintSetEnd="@+id/end"
motion:constraintSetStart="@id/start"
motion:motionInterpolator="easeInOut">
<OnSwipe
motion:dragDirection="dragUp"
View sample_collapsing_animation_scene.xml
<OnSwipe
motion:dragDirection="dragUp"
motion:touchAnchorId="@id/scrollable_content" />
View sample_collapsing_animation_scene.xml
<Transition
motion:constraintSetEnd="@+id/end"
motion:constraintSetStart="@id/start"
motion:motionInterpolator="easeInOut">
</Transition>
View sample_collapsing_animation_scene.xml
<ConstraintSet android:id="@+id/end">
<Constraint
android:id="@id/search_view"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
android:elevation="4dp"
motion:layout_constraintBottom_toTopOf="@+id/guideline_toolbar"
motion:layout_constraintEnd_toStartOf="@id/menu_icon"
View sample_collapsing_animation_scene.xml
<Constraint
android:id="@+id/guideline_toolbar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
motion:layout_constraintGuide_begin="65dp" />
View sample_collapsing_animation_scene.xml
<Constraint android:id="@id/navigation_icon">
<CustomAttribute
motion:attributeName="ColorFilter"
motion:customColorValue="#ffffff" />
</Constraint>
<Constraint android:id="@id/menu_icon">
<CustomAttribute
motion:attributeName="ColorFilter"
motion:customColorValue="#ffffff" />
View sample_collapsing_animation_scene.xml
<Constraint
android:id="@+id/toolbar_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:elevation="4dp"
motion:layout_constraintBottom_toTopOf="parent"
motion:layout_constraintStart_toEndOf="@id/navigation_icon" />
View sample_collapsing_animation_scene.xml
<Constraint
android:id="@id/search_view"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
android:elevation="4dp"
motion:layout_constraintBottom_toTopOf="@id/guideline_toolbar"
motion:layout_constraintEnd_toStartOf="@id/menu_icon"
motion:layout_constraintStart_toEndOf="@id/navigation_icon"
View sample_collapsing_animation_scene.xml
<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"
View sample_collapsing_animation_scene.xml
<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" />
You can’t perform that action at this time.