Skip to content

Instantly share code, notes, and snippets.

@bitvale
Created January 7, 2019 13:39
Show Gist options
  • Save bitvale/c32625704289e6f76c5664c54c63ab19 to your computer and use it in GitHub Desktop.
Save bitvale/c32625704289e6f76c5664c54c63ab19 to your computer and use it in GitHub Desktop.
For Medium article "The power of Android Porter/Duff Mode"
private var angle = 0f
set(value) {
field = value
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
postInvalidateOnAnimation()
} else {
invalidate()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment