android_guides
android_guides copied to clipboard
Defining Custom Views - getTrianglePath() allocating new Points/Path in onDraw()
This is a no-no and it's not caught by the compiler(IDE) because it's in a caller method.
Just some best practices, especially for a custom view guide.
(If I had the time I would fix it but just wanted to note this.)
https://github.com/codepath/android_guides/wiki/Defining-Custom-Views
@teotigraphix Good catch 👍 , I updated the wiki page Defining-Custom-Views