-2
I develop on Android a few months and one thing I noticed is that the more features a screen has, the more messy the code gets!
How so?
Imagine an Activity that has Loading bar, various actions that make asynchronous calls, etc. the source code gets full of classes and well messy, know a good practice to group these classes in separate files? Any good practice is welcome!
Object orientation is responsible for this, create objects for what you need and modularize according to need. If the code is getting too large it is likely that it could have a different encapsulation.
– Mansueli
Do not worry so much about this no, the recommendation of the Kyllopardium is good, precisely to prevail the composition of objects and delegation of responsibility in order to avoid monolithic and "rolled up" code. An idea is to section its interface in
Fragments
and distribute responsibilities among them. Another suggestion is to look at Android projects that are Open Source, on Github for example. A good one I recommend is theiosched
: https://github.com/google/iosched. (The Google I/O app).– Wakim
Not exactly the answer to your question, but try reading Robert C. Martin’s Clean Code. http://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882 At.
– banneddude