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
In Android development, the general app is to get server-side data to update the UI, from the server to obtain the data can be JSON, its data is smaller than XML, the analysis of the Chinese weather online access to the data, although it is no longer updated, but to learn is still possible, In order to facilitate my direct to the data through the TXT saved to the
This article illustrates the method of acquiring Sina weather forecast data by Android programming. Share to everyone for your reference, specific as follows:
Sina Weather Forecast Address:
http://php.weather.sina.com.cn/xml.php?city= Wuhan password=djoyniet8234jlskday=0
The city can be Java.net.URLEncoder.encode ("Wuhan", "gb2312") or write "Wuhan" directly,
Android UI development 43rd-use Property Animation to implement moji weather 3.0 guide interface and Animation, androidproperty
Previously I wrote moji weather 3.0 guide interface and Animation implementation, which perfectly achieves the Animation effect. That article uses View Animation, and this article uses the Property Animation implementation. Property Anim
Android realizes weather forecast temperature/temperature Polyline Trend ChartWeather forecast app, will inevitably encounter drawing weather temperature/temperature, and other data on the trend of the line or curve, such as the temperature/temperature of the line chart, there will generally be two lines, one is a h
Last year, I made a simple desktop weather plug-in: appwidgetprovider, the android-like moji weather Desktop component, was easy to use and cannot be used by now, as a matter of fact, I always wanted to make some changes. Since I have been relatively lazy, I have been busy with work, and it will be almost a year in the twinkling of an eye. It's very easy to make
Android weather forecast application design (2) III. Detailed Design
In this article, we refer. In addition, during source code analysis, only schematic and Structured code is selected for analysis. The complete source code of the program can be downloaded at http://download.csdn.net/detail/frankxuanhui/3593051.
(1) multi-thread processing of Weather Information
Android gets weather information via Google API
Copy Code code as follows:
public class Weatheractivity extends activity {
Private TextView txcity;
Private Button btnsearch;
Private Handler Weatherhandler;
Private Dialog ProgressDialog;
private timer timer;
/** called the activity is a. */
@Override
public void OnCreate (Bundle savedinstancestate) {
Super.oncreate (savedinstancestate);
Simple weather forecast for Android
The city is stored in the spinner class, the xml file is read, and the file is filled in the spinner. Xml files are stored in the local res/raw folder.
And add listening events to the three slaves. When you select a province, the spinner of the storage city and region changes accordingly. Similarly, when you select a city, the region's spinner changes accordingly.
// Wh
Previously wrote a weather app with 4-day forecasts and 5-day historical information. So want to add a line chart to show the weather trend, rare to have time, wrote a bit, here to do some records, the head is not easy to forget things.Let's put the effect first:Control content is relatively simple, is a normal line chart, the upper and lower respectively with th
From the previous article together to develop the Android weather software two of the time will be nearly half a month, between always because of something and not updated really sorry, recently will speed up the pace of the update, in order to finish the 2015 before the arrival of this series of blog posts, In the previous chapter we have used the Litepal framework to build the database we need, the conten
Android-obtain weather information and download the source code based on Webservice (3)
This project is described as follows:1. You can obtain service information in three ways. Soap, http get, and http post are used to obtain information.2. Detailed steps for webservice calling Based on android
As described in the previous blog post, the province list and city l
In front of the " Ink Weather 3.0 Guide interface and animation implementation ", the perfect realization of the animation effect, that an article using the View Animation, this article uses the property Animation implementation. The property animation is a new animation library after Android3.0. This article has the source code as well as effects on GitHub.Open Source Library for Viewpager using ink weather
and the data to be parsed, of course, to be consistent, right? ~ here I used the Stringbulder Deletecharat method, according to the string subscript to remove the space and "3.0", and then, with the first line of code, JSON parsing done ~ ~ ~ Debugging look at my Weatherbean This object, the data are already obediently in there!! Summary: Made me long time, this format is not standard Jason data, but also found the processing method, interface to get the Jason data if not standard, you can f
Independent of the system app in the android source code, developed like a common app, Android appI personally recommend that you first import the formatted xml and import in the ide/eclipse of the android source code to your compiled eclipse. If the
Learning Android For some time, should improve their actual combat ability, do some simple demo. Below we introduce how to use the network API to realize the weather forecast function, mainly involves how to use the API to obtain the network data, the network data return is generally the JSON format, here also involves the JSON parsing problem, these are the relatively basic problem, should be mastered.Firs
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
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.