I think it is becoming common knowledge that using...
# android
a
I think it is becoming common knowledge that using
@JvmOverloads
for custom views on Android can bite you if you don’t do it properly. What I haven’t seen in this discussion yet, is that most probably (because in Kotlin
final
is the default), you only need the 2 constructors in your custom view, and so you should be just fine using
@JvmOverloads
for it. https://medium.com/@arekolek/all-your-classes-are-final-so-why-do-you-even-need-the-3-argument-constructor-d35553dd6347 What do you think?
👍 2
w
Afaik you only need one constructor if you’re creating the view from the xml, the one with two parameters
👍 2
a
That’s a good point