https://kotlinlang.org logo
#android
Title
# android
p

pablisco

09/01/2017, 2:35 PM
In case someone is interested: https://medium.com/pablisco/extending-resources-61134cbd809c Disclaimer: it’s mine 😄
e

ebonet

09/01/2017, 4:26 PM
I appreciate the Catan cover
p

pablisco

09/01/2017, 4:28 PM
All those resources 😄
y

yoavst

09/01/2017, 8:20 PM
2 Suggestions: 1. Replace to method reference instead of lambda. 2. You can just use
dimenRes
extension over context with inlining - same as calling normal, no allocation: https://github.com/OhelShem/android/blob/7.0.0/app/src/main/java/com/ohelshem/app/android/package.kt#L46
p

pablisco

09/01/2017, 8:36 PM
1. Very true, good idea I may make an update when I get time 🙂 2. You can do that with a method yeah, but the whole point was to use the get operator
y

yoavst

09/01/2017, 9:18 PM
Yea the get operator looks nice. If will have inline classes one day maybe it will also be free 🙂
p

pablisco

09/01/2017, 9:31 PM
Not sure if it’ll come for free, adding a nested class I think will be significantly heavier in terms of bytecode
y

yoavst

09/01/2017, 9:39 PM
As I said, the day we'll have inline classes 😎