In general, there are 8 types of Android design patterns that are commonly used: Singleton, factory, observer, Agent, command, adapter, composition, interview.
Singleton mode: In order to have only one call object in the system, the disadvantage is that the singleton makes the other program rely on it excessively, and the different singleton executes in the different process. make maintenance difficult;
Factory mode: The production of fixed things, such as abstract class, the disadvantage is that the product changes trouble; like action movies and love movies, the person sends the same request to the server respectively. Can get the set of movies they want to see, the equivalent of different objects to the same request, the requirements are met.
Observer pattern: A object is monitored by multiple objects, such as a cache;
Proxy mode: Give your own things to others to do. You can return the results separately. such as asynchronous threads.
Command mode: Separates the calling object from the object, and the middleware coordinates the work between the two, such as the controller;
Adapter mode: Turns an interface into an interface required by the user, such as Baseadapter to fit the ListView and spinner, since they have the same interface
Compositing mode: Converts a one-to-many relationship into a pair of overall relationships. such as the ListView and adapter;
Frequently used Android Design patterns