Skip to content

Instantly share code, notes, and snippets.

View gilgoldzweig's full-sized avatar

Gil Goldzweig gilgoldzweig

View GitHub Profile
blueprint:
name: Styrbar multiple lights
description: A blueprint that allows Ikea styrbar light controller to be used to
control multiple lights, made by Zuul.
domain: automation
input:
controller:
name: Controller
description: The styrbar controller to be used to control the lights.
selector:
@gilgoldzweig
gilgoldzweig / sample_collapsing_animation_scene.xml
Last active January 7, 2020 07:45
entire animation motion scene
<?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"
<OnSwipe
motion:dragDirection="dragUp"
motion:touchAnchorId="@id/scrollable_content" />
<Transition
motion:constraintSetEnd="@+id/end"
motion:constraintSetStart="@id/start"
motion:motionInterpolator="easeInOut">
</Transition>
@gilgoldzweig
gilgoldzweig / sample_collapsing_animation_scene.xml
Last active December 27, 2019 11:14
entire end constraint set
<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"
@gilgoldzweig
gilgoldzweig / sample_collapsing_animation_scene.xml
Created December 27, 2019 11:12
guideline end constraint
<Constraint
android:id="@+id/guideline_toolbar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
motion:layout_constraintGuide_begin="65dp" />
@gilgoldzweig
gilgoldzweig / sample_collapsing_animation_scene.xml
Last active December 27, 2019 11:09
icons end constraint
<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" />
@gilgoldzweig
gilgoldzweig / sample_collapsing_animation_scene.xml
Last active December 27, 2019 11:07
title end constraint
<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" />
@gilgoldzweig
gilgoldzweig / sample_collapsing_animation_scene.xml
Last active December 27, 2019 11:04
search view end constraint
<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"