Skip to content

Instantly share code, notes, and snippets.

@tarek360
Created March 8, 2018 05:16
Show Gist options
  • Save tarek360/7350c457f7543158a3642a0af84964b4 to your computer and use it in GitHub Desktop.
Save tarek360/7350c457f7543158a3642a0af84964b4 to your computer and use it in GitHub Desktop.
final KyrieDrawable kyrieDrawable =
KyrieDrawable.builder()
.viewport(409, 280)
.child(
PathNode.builder()
.strokeColor(Color.BLACK)
.strokeWidth(1f)
.fillColor(
Animation.ofArgb(hippoFillColor, elephantFillColor).duration(300),
Animation.ofArgb(buffaloFillColor).startDelay(600).duration(300),
Animation.ofArgb(hippoFillColor).startDelay(1200).duration(300))
.pathData(
Animation.ofPathMorph(
Keyframe.of(0, hippoPathData),
Keyframe.of(0.2f, elephantPathData),
Keyframe.of(0.4f, elephantPathData),
Keyframe.of(0.6f, buffaloPathData),
Keyframe.of(0.8f, buffaloPathData),
Keyframe.of(1, hippoPathData))
.duration(1500)))
.build();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment