4 ms·
As far as I can see, that's lots of code for generating a UI. Interesting that they do that instead of using the usual xml files for specifying the UI on androi
by tomsmeding 9y ago
As far as I can see, that's lots of code for generating a UI. Interesting that they do that instead of using the usual xml files for specifying the UI on android; the result is that there's lots of code, a number of statements for each single UI element, and all the listeners and such are declared inline.
The compiled code will be fine, probably. It won't be much different from that would happen if they used the standard method of xml files and separate classes for that stuff, and might even be slightly faster.
But it surely is less maintainable, and the code definitely doesn't look generated to me. Maybe if you count copy-paste as code generation.
I hope they don't use Atom as an editor, because it surely won't be able to cope with such a file. [/s; but might even be true. not tested.]
- balladeer 9y agoLess maintainable? That's a nightmare. As an Android developer who has struggled with couple of 4 digit lines long activity classes I literally shuddered. This is as if someone used a tool to translate UI code from some other platform to Android (completely into Java) and forgot to refactor.