Android High Imitation Yahoo weather (two)---code structure analysis
Last Update:2015-06-07
Source: Internet
Author: User
<span id="Label3"></p><p><p><span style="font-family:Comic Sans MS;font-size:14px;">Version has been upgraded to 1.0.1</span></p></p><p><p></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><span style="font-family:Comic Sans MS;font-size:14px;">SOURCE Address:</span></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><span style="font-family:Comic Sans MS;font-size:14px;">Github:https://github.com/way1989/wayhoo</span></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><span style="font-family:Comic Sans MS;font-size:14px;">Oschina:http://git.oschina.net/way/wayhoo</span></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><span style="font-family:Comic Sans MS;font-size:14px;"><br></span></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><span style="font-family:Comic Sans MS;font-size:18px;"><strong>This example uses 6 library code and 1 main project Code.</strong></span></p></p><p><p></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><span style="font-family:Comic Sans MS;font-size:18px;"><br></span></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><span style="font-family:Comic Sans MS;font-size:14px;"><strong>One or 6 library code as Shown:</strong></span></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><span style="font-family:Comic Sans MS;font-size:14px;"></span></p></p><p><p>watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvd2f5x3bpbmdfbgk=/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast "/><br></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><span style="font-family:Comic Sans MS;font-size:14px;">which</span></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><span style="font-family:Comic Sans MS;font-size:14px;">①.menudrawer, viewpagerindicator, showcaseview, swipeback are all on Github's famous sidebar menu open source library, I do not make changes here, directly quoted, thanks to the power of open source.</span></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><span style="font-family:Comic Sans MS;font-size:14px;">②.pulltorefresh is also known on GitHub to refresh the open source library, I made a few minor changes, mainly to the Yahoo dropdown refresh effect added to it.</span></p></p><p><p>As shown in the Following:</p></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><span style="font-family:Comic Sans MS;font-size:14px;"><br></span></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><span style="font-family:Comic Sans MS;font-size:14px;"><br></span></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><span style="font-family:Comic Sans MS;font-size:14px;">③.weather-lib is the millet weather source that I have shared with you before, just joined the local cache, also do not introduce more, please refer To: http://blog.csdn.net/way_ping_li/article/details/29669045.</span></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><span style="font-family:Comic Sans MS;font-size:14px;"><br></span></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><span style="font-family:Comic Sans MS;font-size:14px;"><strong>second, The main code structure as Shown:</strong></span></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><span style="font-family:Comic Sans MS;font-size:14px;"><br></span></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><span style="font-family:Comic Sans MS;font-size:14px;"><br></span></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><span style="font-family:Comic Sans MS;font-size:14px;">which</span></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><span style="font-family:Comic Sans MS;font-size:14px;">Com.way.adapter: all adapters, including ListView and Viewpager.</span></p></p><p><p></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><span style="font-family:Comic Sans MS;font-size:14px;">com.way.beans: where all Java beans are Stored.</span></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><span style="font-family:Comic Sans MS;font-size:14px;">Com.way.common.util: all Tool class storage Places. such as network judgment, system tools, time tools and so On.</span></p></p><p><p></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><span style="font-family:Comic Sans MS;font-size:14px;">Com.way.db: that is, the use of the Project database management class, on a file cityprovider.java, I prefer to use contentprovider, do feel more convenient than the direct operation of the Database. And you can work with multiple tables of a database at the same time. Just a different uri, switch case when you can judge a bit more.</span></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><span style="font-family:Comic Sans MS;font-size:14px;">Com.way.fragment: This project uses the fragment, only one file.</span></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><span style="font-family:Comic Sans MS;font-size:14px;">Com.way.ui.view: All Custom View. It is worth mentioning that touchdispatchview, as the name implies is to assign the touch event view, because this code uses ScrollView as a Drop-down refresh, the ListView is used to display Data. So two view requires a touch event, and a parent container is needed to assign their touch events.</span></p></p><p><p></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><span style="font-family:Comic Sans MS;font-size:14px;">Com.way.yahoo: All Activity Packages.</span></p></p><p><p></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><span style="font-family:Comic Sans MS;font-size:14px;"><br></span></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><span style="font-family:Comic Sans MS;font-size:14px;">All right. This is the end of today, the next time and you detailed analysis of the following 3 aspects:</span></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><span style="font-family:Comic Sans MS;font-size:14px;">①. the main interface is slippery and blurred, and the background follows the Slide.</span></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><span style="font-family:Comic Sans MS;font-size:14px;">②.listview and GridView encountered multiple types of item Processing.</span></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><span style="font-family:Comic Sans MS;font-size:14px;">③.viewpager uses fragment for caching and Optimization.</span></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><span style="font-family:Comic Sans MS;font-size:14px;">Thank you!</span></p></p><p><p></p></p><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><p style="margin-top: 0px; margin-bottom: 0px; padding-top: 0px; padding-bottom: 0px; line-height: 26px;"><span style="font-family:Comic Sans MS;font-size:14px;"><br></span></p></p><br><p><p>Android High Imitation Yahoo weather (two)---code structure analysis</p></p></span>