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

Delphi change the assembly code of a running process -

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

C++ 11 "class" keyword -