-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #79 from lewismcgeary/add-fab-animation
add-fab-animation
- Loading branch information
Showing
16 changed files
with
233 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<set xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:ordering="together" | ||
> | ||
<objectAnimator | ||
android:startOffset="@string/fab_anim_time" | ||
android:propertyName="rotation" | ||
android:duration="@string/fab_anim_time" | ||
android:valueFrom="-180" | ||
android:valueTo="-360" | ||
android:interpolator="@android:interpolator/decelerate_cubic" | ||
/> | ||
<objectAnimator | ||
android:propertyName="scaleX" | ||
android:duration="@string/fab_anim_time" | ||
android:valueFrom="0.45" | ||
android:valueTo="1" | ||
android:interpolator="@android:interpolator/decelerate_cubic" | ||
/> | ||
<objectAnimator | ||
android:propertyName="scaleY" | ||
android:duration="@string/fab_anim_time" | ||
android:valueFrom="0.71" | ||
android:valueTo="1" | ||
android:interpolator="@android:interpolator/decelerate_cubic" | ||
/> | ||
</set> |
26 changes: 26 additions & 0 deletions
26
app/src/main/res/animator/fab_arrowhead_to_play_startoffset.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<set xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:ordering="together" | ||
> | ||
<objectAnimator | ||
android:propertyName="rotation" | ||
android:duration="@string/fab_anim_time" | ||
android:valueFrom="-180" | ||
android:valueTo="-180" | ||
android:interpolator="@android:interpolator/decelerate_cubic" | ||
/> | ||
<objectAnimator | ||
android:propertyName="scaleX" | ||
android:duration="@string/fab_anim_time" | ||
android:valueFrom="0.45" | ||
android:valueTo="0.45" | ||
android:interpolator="@android:interpolator/decelerate_cubic" | ||
/> | ||
<objectAnimator | ||
android:propertyName="scaleY" | ||
android:duration="@string/fab_anim_time" | ||
android:valueFrom="0.71" | ||
android:valueTo="0.71" | ||
android:interpolator="@android:interpolator/decelerate_cubic" | ||
/> | ||
</set> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<set xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:ordering="together"> | ||
<objectAnimator | ||
android:propertyName="rotation" | ||
android:duration="@string/fab_anim_time" | ||
android:valueFrom="0" | ||
android:valueTo="-180" | ||
android:interpolator="@android:interpolator/accelerate_cubic" | ||
/> | ||
<objectAnimator | ||
android:propertyName="scaleX" | ||
android:duration="@string/fab_anim_time" | ||
android:valueFrom="1" | ||
android:valueTo="0.45" | ||
android:interpolator="@android:interpolator/accelerate_cubic" | ||
/> | ||
<objectAnimator | ||
android:propertyName="scaleY" | ||
android:duration="@string/fab_anim_time" | ||
android:valueFrom="1" | ||
android:valueTo="0.71" | ||
android:interpolator="@android:interpolator/accelerate_cubic" | ||
/> | ||
</set> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<set xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<objectAnimator | ||
android:propertyName="rotation" | ||
android:startOffset="@string/fab_anim_time" | ||
android:duration="@string/fab_anim_time" | ||
android:valueFrom="0" | ||
android:valueTo="-360" | ||
android:interpolator="@android:interpolator/decelerate_cubic" | ||
/> | ||
</set> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<set xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:ordering="sequentially"> | ||
<objectAnimator android:propertyName="trimPathEnd" | ||
android:valueFrom="0" | ||
android:valueTo="0" | ||
android:valueType="floatType" | ||
android:duration="@string/fab_anim_time" /> | ||
<objectAnimator android:propertyName="trimPathEnd" | ||
android:valueFrom="0" | ||
android:valueTo="1" | ||
android:valueType="floatType" | ||
android:duration="@string/fab_anim_time" | ||
android:interpolator="@android:interpolator/decelerate_cubic"/> | ||
</set> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<set xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<objectAnimator android:propertyName="trimPathEnd" | ||
android:valueFrom="1" | ||
android:valueTo="0" | ||
android:valueType="floatType" | ||
android:duration="@string/fab_anim_time" | ||
android:interpolator="@android:interpolator/accelerate_cubic"/> | ||
</set> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="24.0dp" | ||
android:height="24.0dp" | ||
android:viewportWidth="24.0" | ||
android:viewportHeight="24.0"> | ||
<group android:name="rotation group" | ||
android:pivotX="12" | ||
android:pivotY="12"> | ||
|
||
<path | ||
android:name="arrow tail" | ||
android:strokeColor="#000000" | ||
android:strokeWidth="2" | ||
android:trimPathEnd="0" | ||
android:pathData= | ||
"M12,6 c3.9,0 7,3.135 7,7 s-3.135,7 -7,7 -7,-3.135 -7,-7" | ||
/> | ||
<group | ||
android:name="arrow head group" | ||
android:rotation="0" | ||
android:pivotX="10.75" | ||
android:pivotY="8.5" | ||
android:scaleX="1" | ||
android:scaleY="1"> | ||
<path | ||
android:fillColor="#FF000000" | ||
android:pathData="M8,5v14l11,-7z"/> | ||
</group> | ||
</group> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="24.0dp" | ||
android:height="24.0dp" | ||
android:viewportWidth="24.0" | ||
android:viewportHeight="24.0"> | ||
<group android:name="rotation group" | ||
android:pivotX="12" | ||
android:pivotY="12"> | ||
|
||
<path | ||
android:name="arrow tail" | ||
android:strokeColor="#000000" | ||
android:strokeWidth="2" | ||
android:pathData= | ||
"M12,6 c3.9,0 7,3.135 7,7 s-3.135,7 -7,7 -7,-3.135 -7,-7" | ||
/> | ||
<group | ||
android:name="arrow head group" | ||
android:rotation="180" | ||
android:pivotX="10.75" | ||
android:pivotY="8.5" | ||
android:scaleX="0.45" | ||
android:scaleY="0.71"> | ||
<path | ||
android:fillColor="#FF000000" | ||
android:pathData="M8,5v14l11,-7z"/> | ||
</group> | ||
</group> | ||
</vector> | ||
|
16 changes: 16 additions & 0 deletions
16
app/src/main/res/drawable/fab_play_to_reset_animated_vector.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<animated-vector | ||
android:drawable="@drawable/fab_ic_play_arrow_24dp" | ||
xmlns:android="http://schemas.android.com/apk/res/android" > | ||
|
||
<target | ||
android:animation="@animator/fab_play_to_arrowhead" | ||
android:name="arrow head group"/> | ||
<target | ||
android:animation="@animator/fab_rotate_reset_arrow" | ||
android:name="rotation group"/> | ||
<target | ||
android:animation="@animator/fab_tail_grow" | ||
android:name="arrow tail"/> | ||
|
||
</animated-vector> |
15 changes: 15 additions & 0 deletions
15
app/src/main/res/drawable/fab_reset_to_play_animated_vector.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<animated-vector | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:drawable="@drawable/fab_ic_replay_24dp"> | ||
<target | ||
android:animation="@animator/fab_tail_shrink" | ||
android:name="arrow tail"/> | ||
<target | ||
android:animation="@animator/fab_arrowhead_to_play_startoffset" | ||
android:name="arrow head group"/> | ||
<target | ||
android:animation="@animator/fab_arrowhead_to_play" | ||
android:name="arrow head group"/> | ||
|
||
</animated-vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters