freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

畢業(yè)設(shè)計(jì)-基于android系統(tǒng)的智能手機(jī)天氣預(yù)報(bào)軟件(參考版)

2024-12-05 19:17本頁(yè)面
  

【正文】 import .*。 import .*。 } } 江西理工大學(xué) 2021屆本科生畢業(yè)設(shè)計(jì)(論文) 30 Androidtransport 方法 package 。 } public String getStatus() { return status。 } public String getPressure() { return pressure。 } public String getRelativeHumidity() { return relativeHumidity。 } public String getDewPoint() { return dewPoint。 } public String getTemperature() { return temperature。 } public String getVisibility() { return visibility。 } public String getWind() { 江西理工大學(xué) 2021屆本科生畢業(yè)設(shè)計(jì)(論文) 29 return wind。 } public String getTime() { return time。 public String getLocation() { return location。 // 相對(duì)濕度 private String pressure。 private String dewPoint。 private String visibility。 private String time。 package 。其基本功能是當(dāng)用戶運(yùn)行天氣預(yù)報(bào) 系統(tǒng)程序時(shí),在手機(jī)屏幕上顯示出中國(guó)的城市名稱,用戶單擊任意一個(gè)城市名,可獲得該城市的天氣實(shí)況預(yù)報(bào)信息。 // } } 城市天氣詳情代碼 主要功能: 基于 Android 平臺(tái)的智能手機(jī)訪問(wèn)服務(wù)器的主要技術(shù)是數(shù)據(jù)交互方法。 // } // return true。 // (, menu)。 } (sb)。 (is)。 (())。 // create a parser SAXParser parser = ()。 } })。 (body)。 Element entry8 = (Pressure)。 (相對(duì)濕度: +body+\n)。 ( new EndTextElementListener() { public void end(String body) { (prop: + body)。 } })。 (body)。 Element entry6 = (DewPoint)。 (氣溫: +body+\n)。 ( new EndTextElementListener() { public void end(String body) { (prop: + body)。 } })。 (body)。 Element entry4 = (Visibility)。 (風(fēng)向: +body+\n)。 ( new EndTextElementListener() { public void end(String body) { (prop: + body)。 } })。 (body)。 Element entry2 = (Time)。 (位置: +body+\n)。 ( new EndTextElementListener() { public void end(String body) { (prop: + body)。 RootElement root = new RootElement(CurrentWeather)。 String xmlStr = (, , map)。 (CityName, cityName)。 // String countryName = (CountryName)。 Intent queryIntent = getIntent()。 cityWeather = new CityWeather()。 setContentView()。 江西理工大學(xué) 2021屆本科生畢業(yè)設(shè)計(jì)(論文) 25 public class WeatherResult extends Activity { private CityWeather cityWeather。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 startActivity(i)。 (CityName, cityName)。 Intent i = new Intent(getApplicationContext(), )。 (l, v, position, id)。 } Override protected void onListItemClick(ListView l, View v, int position, long id) { cityName = (String) (position)。 return null。 // ((TextView)findViewById()).setText(ERROR: + ().getName() + : + ())。 // ((TextView)findViewById()).setText(())。 // get our data via the xml string InputSource is = new InputSource(new StringBufferInputStream(xmlStr))。 XMLReader xmlreader = ()。 // create the factory SAXParserFactory factory = ()。 (body)。 Element entry = (Table)。 try { String xmlStr = (, , map)。 Map map = new HashMap()。 setListAdapter(new ArrayAdapterString(this, , cityList))。 } })。 (new OnClickListener(){ public void onClick(View v) { cityName = ().toString()。 Button btn = (Button) ()。 /** Called when the activity is first created. */ Override public void onCreate(Bundle savedInstanceState) { (savedInstanceState)。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 import 。 主要代碼介紹 主界面代碼 (用戶界面) package 。在本設(shè)計(jì)實(shí)例的 文 件 中 , 解 析 xml 數(shù) 據(jù) 時(shí) , 先 通 過(guò)RootElement root=new RootElement( NewDataSet) 獲得 xml 數(shù)據(jù)的根節(jié)點(diǎn);然后再尋找其子節(jié)點(diǎn)直到找到 City 子節(jié)點(diǎn),并設(shè)置一個(gè)監(jiān)聽(tīng)器setEndTextElementListener () 來(lái)獲得 City 子 節(jié) 點(diǎn) 的 值 ; 最 后 使 用 的 SAXParser 來(lái)解析 xml 數(shù)據(jù),把數(shù)據(jù)存入 ListString并返回: SAXParserFactory factory=(); SAXParser parser=(); XMLReader xmlreader=(); ( ()); 江西理工大學(xué) 2021屆本科生畢業(yè)設(shè)計(jì)(論文) 21 InputSource is=new InputSource ( new StringBufferInputStream( xmlStr)); ( is); [3] 在 UI 上呈現(xiàn)城市列表數(shù)據(jù) 當(dāng)獲得 ListString類型的數(shù)據(jù)之后,就可以把它綁定到 定義的 ListView 組 件 上 , 然 后 使 用 ListActivity 呈 現(xiàn) 列 表 數(shù) 據(jù) 。 public static final String NAMESPACE= public static final String URL= 然后 中實(shí)例化一個(gè) SoapSerializationEnvelope 對(duì)象,設(shè)置 SoapObject 的命名空間、方法名、參數(shù)等;并通過(guò)實(shí)例化一個(gè)AndroidHttpTransport 對(duì)象來(lái)調(diào)用 WebService,并獲得 xml 字符串?dāng)?shù)據(jù),其代碼段如下: AndroidHttpTransport androidHttpTransport= new AndroidHttpTransport ( ); try { ( soapAction, envelope); Object result=(); xmlStr=(); } catch( Exception e) { (); } [2] 解析數(shù)據(jù)列表 Android 操作系統(tǒng)對(duì) xml 字符串?dāng)?shù)據(jù)的操作功能很強(qiáng),提供了 dom、 sax 以及 xmlpul 3 種方式。譬如,通過(guò) 中的 public class Constant{},設(shè)置 SOAP Action 要調(diào)用的方法名、命名空間以及 Web Service URL 值,其源代碼為: public static final String SOAP_ACTION= public static final String METHOD_NAME= GetCitiesByCountry。通過(guò)定義一個(gè)方法 public ListStringgetAllCitiesNAMEs() 可獲得中國(guó)城市名稱列表。 在 GoogleCode 上 有 一 個(gè) 項(xiàng) 目 ksoap2android( Android 平臺(tái)上實(shí)現(xiàn)輕量級(jí)的 SOAP 庫(kù),即使用 ksoap2android 的 API 來(lái)調(diào)用遠(yuǎn)端 Web Service 的服務(wù)。 [1] 獲取城市列表數(shù)據(jù) Android 沒(méi)有提供 Web Service 的組件庫(kù),但可以通過(guò)修改在 PC 或 J2ME 上使用的開(kāi)源 Web Service Java 庫(kù)作為 AndroidWeb Servic 庫(kù)使用。 創(chuàng)建中國(guó)城市列表數(shù)據(jù) 根據(jù)天氣預(yù)報(bào)系統(tǒng)功能需求分析,系統(tǒng)啟動(dòng)后,應(yīng)在主界面上呈現(xiàn)出中國(guó)國(guó)內(nèi)所有城市的列表數(shù)據(jù),因此需要?jiǎng)?chuàng)建中
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1