android - Pre-creating a Path that depends on View width and height -



android - Pre-creating a Path that depends on View width and height -

i have custom view draws complex path. dimensions of path elements calculated using view width , height. need way pre-create path before ondraw called "avoid object allocations during draw/layout...", in moment when view width , height known. proper moment in view lifecycle such pre-creation?

just override view.onsizechanged , initialization there

android android-custom-view

Comments

Popular posts from this blog

c - Compilation of a code: unkown type name string -

java - Bypassing "final local variable defined in an enclosing type" -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -