Photogalley is another important application in the "Guide to Android Programming Authority" book.
Github:https://github.com/xurui1995/photogallery (Welcome and thank you for your star)
In the first application criminalintent, mainly learned the use of intent, the use of fragment, SQLite and so on.
Details: http://www.cnblogs.com/xurui1995/p/5829458.html
In Photogalley applications, the main learning of Android multi-threading, network requests, JSON parsing, WebView and other aspects of knowledge content.
First of all, we analyze the framework of the application, it is often difficult for an Android novice to design a framework, but
We can learn to analyze other people's frame, it is helpful for us to design new frame or "counter switch".
Main interface:
Interface Analysis:
1, main interface =toolbar+recyclerview. Toolbar contains a Serachview, Recyclerview uses Girdlayoutmanager。
2, the picture of the yellow border marked as the default picture, or understand that the Recyclerview Viewholder has not obtained the network request to the picture, but we should also let it show something, empty will be very awkward.
Functional and technical considerations:
1, how to get the picture data?
Key: Apply the corresponding API key, according to the relevant API guidelines to request the data corresponding to their own address, the resulting JSON format data parsing.
2, how is the loading of the picture time-consuming operation handled? How can I load all thumbnails without one time, but only when there is a need? Picture too big how to not oom?
Key: asnyctask,handlerthread, Message Queuing, picture shrinking.
3, when there is new data on the network, if the user is notified to refresh? How to record Searchview last search record, WebView load Web page with progress bar and so on.
Key: Intentservice,sharepreference, onprogresschanged (... )。
Finally, take the mind with the map, so that you learn this book to review the Knowledge points.
Android Programming Authority guide Photogallery Application Grooming