Android High Imitation Yahoo weather (ii)---code structure parsing

Source: Internet
Author: User
Tags switch case

Version has been upgraded to 1.0.1

Source Address:

Github:https://github.com/way1989/wayhoo

Oschina:http://git.oschina.net/way/wayhoo


This example uses 6 library code and 1 main project code.


One or 6 library code as shown:


which

①.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.

②.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. As shown in the following:



③.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.


Second, the main code structure as shown:



which

Com.way.adapter: All adapters, including ListView and Viewpager.

Com.way.beans: Where all java beans are stored.

Com.way.common.util: All tools are stored in places such as network judgment, System Tools, time tools, and so on.

Com.way.db: That is, the project uses the 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 can simultaneously process a database of multiple tables, but the URI is different, switch Case, you can judge more.

Com.way.fragment: This project uses the fragment, only one file.

Com.way.ui.view: All Custom view, which is worth mentioning is Touchdispatchview, as the name implies is assigned to 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, a parent container is required to assign their touch events.

Com.way.yahoo: All activity packages.


Well, this is the end of today, the next time and you detailed analysis of the following 3 aspects:

①. The main interface is slippery and blurred, and the background follows the slide.

②.listview and GridView encountered multiple types of item processing.

③.viewpager uses fragment for caching and optimization.

Thank you!



Android High Imitation Yahoo weather (ii)---code structure parsing

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.