Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rework the onDraw method #1

Open
mrwonderman opened this issue Jun 30, 2015 · 0 comments
Open

rework the onDraw method #1

mrwonderman opened this issue Jun 30, 2015 · 0 comments
Assignees

Comments

@mrwonderman
Copy link
Owner

Try and remove the instantiating of various objects in onDraw(). There are these 3 cases:

  • getFolderPath()
  • getDividerPath()
  • getWritableFolderRect(int cw)

As suggested by: https://plus.google.com/u/0/+YannickSigner/posts/iT8DwRXaE1P?cfem=1

You can reuse Rect objects instead of creating new ones. As for the Path, you should only rebuild it when it changes (like when the bounds of the view change for example) then reuse it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant