【正文】
launched a product called the Android open source smart phone operating system, which uses the Linux kernel, Open Handset Alliance (OHA) members can be free to use and modify the SDK package, open source, it has good scalability of the system. The most important feature of Android is its open architecture, not only has a very good development and debugging environment, but also supports a variety of scalable user experience. Therefore, for software professionals, the Android platform has unlimited appeal. Android operating system has bee the user the most intelligent operating system.The weather software designed for the Android end users to provide a convenient, realtime weather query software, to provide users with a good user experience and convenience of control of the weather conditions. The weather forecast software the ViewFlipper ponents, friendly interface sliding switch, while reducing the space occupied when the system is running. Files saved Weather Information, Shared Preferences to save user preferences settings, save the file storage space. This article on the basis of analysis and discussion of the Android mobile phone software development technical principles, using the basic ponents and mon design patterns Android, developers can provide users with better mobile phone weather forecast software based on the Android platform.Keywords:Android;weather forecast;smart phone platformI目 錄1 系統(tǒng)概述 ..........................................................11.1 研究?jī)?nèi)容 .................................................11.2 研究意義 .................................................11.3 研究現(xiàn)狀和發(fā)展趨勢(shì) .......................................12 系統(tǒng)分析 ..........................................................4 研究目標(biāo) ..................................................4 需求分析 ..................................................4 性能分析 ..................................................43 程序設(shè)計(jì) ..........................................................6 用戶界面設(shè)計(jì) ..............................................6 程序模塊設(shè)計(jì) ..............................................94 程序開發(fā) .........................................................10 文件結(jié)構(gòu)與用途 ..........................................10 數(shù)據(jù)存儲(chǔ) ................................................13 Shared Preferences.....................................13 Files..................................................14 主要功能代碼 ............................................18 獲取天氣數(shù)據(jù) ..........................................18 網(wǎng)絡(luò)檢查 ..............................................20 定時(shí)更新時(shí)間 ..........................................21 ViewFlipper 手勢(shì)監(jiān)聽 ...................................21 城市管理中城市點(diǎn)擊事件 .................................23 主要界面結(jié)構(gòu)布局代碼 ....................................24 ViewFlipper 框架結(jié)構(gòu) ...................................25 城市管理界面 ...........................................25 生活指數(shù) ...............................................26 城市簡(jiǎn)介 ...............................................275 系統(tǒng)測(cè)試 .........................................................29II總結(jié) ...............................................................36參考文獻(xiàn) ...........................................................37致 謝 .............................................................3811 系統(tǒng)概述1.1 研究?jī)?nèi)容Android 平臺(tái)手機(jī)天氣預(yù)報(bào)軟件是基于 Android 手機(jī)平臺(tái),運(yùn)用 Java 語(yǔ)言,應(yīng)用 webService 接口獲取天氣預(yù)報(bào)信息,深入研究 Android 平臺(tái) Activity、Service、Broadcast Receiver、Content Provider 這四大組件及 Android 平臺(tái)的程序運(yùn)行機(jī)制,開發(fā)出針對(duì)使用 Android 平臺(tái)的手機(jī)天氣預(yù)報(bào)系統(tǒng)。本天氣預(yù)報(bào)軟件的設(shè)計(jì),為 Android 終端用戶提供一款方便的實(shí)時(shí)天氣預(yù)報(bào)查詢軟件,為用戶帶來(lái)良好的用戶體驗(yàn)及便利的對(duì)天氣情況進(jìn)行掌控。本科畢業(yè)論文(設(shè)計(jì))題 目 基于 Android 平臺(tái)的天氣預(yù)報(bào)軟件設(shè)計(jì) 學(xué)生姓名 lion 專業(yè)名稱 指導(dǎo)教師 2022 年 5 月 20 日I基于 Android 平臺(tái)的天氣預(yù)報(bào)軟件設(shè)計(jì)摘要:Google 于 2022 年推出了一款名為 Android 的開源智能手機(jī)操作系統(tǒng),它采用 Linux 內(nèi)核,開放手機(jī)聯(lián)盟(OHA)成員可以任意使用和修改 SDK 包,系統(tǒng)的開源性使其具有良好的拓展性。Android 的最大特點(diǎn)是其開放性體系架構(gòu),不僅具有非常好的開發(fā)、調(diào)試環(huán)境,而且還支持各種可擴(kuò)展的用戶體驗(yàn)。本天氣預(yù)報(bào)軟件采用 ViewFlipper 組件,提供友好的界面滑動(dòng)切換方式,同時(shí)減少系統(tǒng)運(yùn)行時(shí)占用的空間。1.2 研究意義Android 平臺(tái)手機(jī)天氣預(yù)報(bào)軟件的開發(fā)可以進(jìn)一步擴(kuò)大氣象信息的覆蓋面,讓廣大公眾能夠在第一時(shí)間方便快捷地獲取最新的氣象預(yù)報(bào)(預(yù)警)信息,以便提前預(yù)防,把氣象災(zāi)害造成的損失降到最低。2圖 1 手機(jī)操作系統(tǒng)關(guān)注度變化趨勢(shì)圖安卓是首款開源代碼的操作系統(tǒng),采用 Linux 內(nèi)核,開放手機(jī)聯(lián)盟(OHA)成員可以任意使用和修改安卓的 SDK 軟件包。例如用戶要是喜歡HTC 的操作界面便馬上可以在應(yīng)用市場(chǎng)上找到,甚至還能模仿 IOS 的界面。系統(tǒng)的免費(fèi)讓更多的廠商加入,推動(dòng)了份額的上升;代碼的開源讓更多的開發(fā)者進(jìn)入應(yīng)用開發(fā);應(yīng)用的豐富吸引了更多用戶選擇,這也是谷歌值得眾多廠商學(xué)習(xí)的地方。 需求分析本程序主界面采用 ViewFlipper 視圖,實(shí)現(xiàn) Android 界面滑動(dòng)效果,主界面分為四個(gè)一面,第一頁(yè)顯示用戶選定的首要城市的當(dāng)天天氣詳細(xì)情況,以及未來(lái)三天天氣的概況,并提供手動(dòng)更新天氣