Last active
February 28, 2019 14:15
-
-
Save yfujiki/92430b99d25f9d063ebef9ae50c1a44e to your computer and use it in GitHub Desktop.
Calling animation
This file contains hidden or 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
var drawable = AnimatablePathDrawable(INITIAL_PATH.toMutableList(), | |
activity!!.applicationContext) | |
view.pathCanvas.background = drawable | |
// Assume that the final path on the normalized map rectangle ((0,0),(0,1),(1,1),(1,0)) | |
// is something like this. | |
drawable.startAnimating(listOf( | |
NormalizedPoint(0.1f, 0.74f), | |
NormalizedPoint(0.15f, 0.68f), | |
NormalizedPoint(0.26f, 0.69f), | |
NormalizedPoint(0.27f, 0.72f), | |
NormalizedPoint(0.29f, 0.7f), | |
NormalizedPoint(0.35f, 0.72f), | |
NormalizedPoint(0.45f, 0.72f), | |
NormalizedPoint(0.5f, 0.66f), | |
NormalizedPoint(0.7f, 0.6f), | |
NormalizedPoint(0.72f, 0.5f), | |
NormalizedPoint(0.8f, 0.4f) | |
)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment