Skip to content

Instantly share code, notes, and snippets.

@yfujiki
Created February 23, 2019 23:41
Show Gist options
  • Save yfujiki/7b5f722802d9e49b4eaf27f7e64cd3dc to your computer and use it in GitHub Desktop.
Save yfujiki/7b5f722802d9e49b4eaf27f7e64cd3dc to your computer and use it in GitHub Desktop.
How to use PathDrawable instance.
val INITIAL_PATH = listOf(
NormalizedPoint(0.2f, 0.5f),
NormalizedPoint(0.8f, 0.5f)
)
// In MainFragment/MapFragment
// ...
val drawable = PathDrawable(INITIAL_PATH.toMutableList(), activity!!.applicationContext)
view.pathCanvas.background = drawable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment