Android weather forecast application design (1)

Source: Internet
Author: User
Document directory
  • Ii. Design Ideas
Android weather forecast application design (I) I. Demand Analysis

There are already many weather forecasting applications on the Android platform, including well-designed works (such as moji weather ). This article introduces a simple implementation of weather forecasting. This application is the first complete Android Application of the author of this article. It records the design process for emergency purposes and provides reference for beginners, you are also welcome to exchange letter (frankxuanhui@yahoo.com.cn ).

Interface Demonstration:

 

Basic functions:

(1) display the detailed weather conditions at the current time on the screen, and display the weather forecast for the next three to four days.

(2) A drop-down list is provided for users to select their cities, and a "OK" button is provided to query the weather.

(3) On the basis of (2), a text input box is provided for the user to enter the city name that does not exist in the city drop-down list, and the "OK" button is provided for weather query.

(4) The UI layout can be adjusted based on the actual situation when the screen is switched between the landscape screen and the portrait screen due to the user's change in the mobile phone direction.

(5) If the weather information of the corresponding city cannot be found, it is necessary to identify and handle exceptions.

Extended functions:

(1) provides the skin replacement function (allows users to select images with built-in skins or file systems), and saves the selected skin as the default skin through lightweight databases.

(2) the "send weather forecast to friends" button is provided to send a text message in a certain format to friends based on the current weather forecast query result.

Ii. Design Ideas

(1) access Google weather API to obtain weather information, the specific URL format is http://www.google.com/ig/api? Weather = query (the city name can be entered in the query, but currently only Pinyin is accepted)

(2) Google weather API returns an XML document containing weather information. You can use saxparser to parse this document to obtain weather forecast information.

(3) design three activity types for the main weather forecast interface, skin change interface, and contact list reading interface, and switch between them through intent.

 

For detailed design, see Android weather forecast application design (2).

 

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.