declaring custom-view constructors
-
14-10-2019 - |
سؤال
Probably it's a Java more than an Android programming question, anyway: there are two ways to declare the 3 standard view constructors: one is using this()
to call the next most parametrized constructor, with null
and 0
, as I've seen here, and doing all the custom init in the last constructor.
The other way is calling super()
, calling each time a function that does the init job.
Is one way more right than the other (why?), or it's just a style choice?
المحلول
OK, so I guess that there isn't any technical involvement one can think of, at least none so important that hi-rep people would know for sure. so... I deduce it's only a style choice.
لا تنتمي إلى StackOverflow