Answer the question
In order to leave comments, you need to log in
What are some good books on writing apps for android?
So that this is not a stupid reference book, but the essence is revealed, how best to organize the code in android, why all these android chips are needed, and so on ... And then some things, for example, hiding the action bar, can be done with several lines using your own methods, although in the example of fullscreen there is a whole class made for this. In short, some things are not clear at all or work like that hedgehog, which until you kick it, it will not take off.
Answer the question
In order to leave comments, you need to log in
Boyan, but still I advise Brian Hardy, Bill Phillips - Programming for Android (For professionals).
The book describes the development of 6 applications from a weak to an interesting parser of pictures from a photo service.
The difference in implementation methods is noticeable only to experienced programmers who have already probed. Here it is necessary to kick all the hedgehogs.
A separate class is a sign of not only optimization, but also the presence of some application architecture (for example, MVC, where the emphasis is on reusing data processing functions by generalizing them). If the function is in a separate class, then perhaps this is a sign of programming style. Some people like to make code as reusable as possible (that is, with minimal duplication), as a result of which there may be several inheritance hierarchies instead of one (just as an example) and other features. In optimization, for example, you need to avoid memory leaks -> you also have to make some changes in the application architecture.
About the examples. They can be written in the most popular or the simplest style (it's always easier to give a separate class to the user than to insert lines inside an unknown class in unknown places, etc.). Your option may be correct, but it doesn’t really match the programming style in supported applications (which are expanding and updating), because it’s better to bring the common functionality (especially with several activities) into a separate class, where it will be better accessible (in one place and without duplication ).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question