android-drawable-dsl icon indicating copy to clipboard operation
android-drawable-dsl copied to clipboard

Add best practices

Open Miha-x64 opened this issue 8 years ago • 4 comments

Hello. Nice DSL!

It would be better to add some best practices: — Where one should keep drawables? At a use-site (e. g. Anko UI declaration), in extension functions, in application class? — How and when one should reuse these drawables? (e. g., stateful drawables shouldn't be reused, or you may click one item and see ripple on the another one ;)

P. S. To avoid boxing, e. g., Float? in rectangleShape, you can use Float.NaN instead of null.

P. P. S. GradientDrawable.solidColor's getter should be @Deprecated(level = ERROR).

P. P. P. S. 80 methods

Thanks for your work!

Miha-x64 avatar May 21 '17 07:05 Miha-x64

  • [x] boxing
  • [x] deprecated getters

meoyawn avatar May 26 '17 12:05 meoyawn

how did you generate that badge?

meoyawn avatar May 26 '17 12:05 meoyawn

best practices coming soon :) thanks for the suggestion

meoyawn avatar May 26 '17 12:05 meoyawn

I've took this badge here: http://www.methodscount.com/?lib=com.github.infotech-group%3Aandroid-drawable-dsl%3A0.1.0

Miha-x64 avatar May 26 '17 12:05 Miha-x64