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

正文內(nèi)容

基于android平臺(tái)的3g氣象軟件畢業(yè)論文(參考版)

2025-03-02 08:29本頁(yè)面
  

【正文】 參考文獻(xiàn) [1] 靳巖 , 姚尚朗 . Google Android 開發(fā)入門與實(shí)戰(zhàn) .人民郵電出版社 [2] 景保玉 .2021中國(guó)移動(dòng)應(yīng)用開發(fā)現(xiàn)狀與趨勢(shì)大調(diào)查 , 2021年 01月 12日 [3] Michael . 輕松搞定 XML 林嘉勝譯 2021年 01月 08日 [4](英) Herbert Schildt Java 參考大全( J2SE 5 Edition), 清華大學(xué)出版社 [5](美) 鮑格斯坦 ( Bergsten, H.)著, 林琪 , 朱濤江 譯 .JSP 設(shè)計(jì)(第三版) / O’ Reilly Java 系列 [M].北京:中國(guó)電力出版社, 2021 年 12 月 . [6] 王向輝,張國(guó)印,沈潔 .Android 應(yīng)用程序開發(fā) .清華大學(xué)出版社, 2021 年 3月 內(nèi)部資料 請(qǐng)。 雖然,這個(gè)軟件目前運(yùn)行良好,但是我認(rèn)為代碼的健壯行還很差,在整個(gè)工程的構(gòu)思方面也不足 ,用戶操作界面 還不夠靈活,這些問題還需要今后逐一解決 。由于對(duì) JAVA濃厚的興趣引發(fā)了我對(duì) Android 的好奇心,從一開始什么都不懂一直摸索著運(yùn)用了很多高級(jí)技術(shù)完成了這個(gè)軟件 。 如下圖所示: (5) 長(zhǎng)按顯示頁(yè)面 并拖動(dòng)到垃圾箱,即可將程序刪除。 如下圖所示: (3)設(shè)置好后就進(jìn)入顯示頁(yè)面,顯示頁(yè)面通過文字和圖片顯示當(dāng)前的天氣情況,包括日期、時(shí)間、城市、最高溫度、最低溫度、當(dāng)前溫度等。 如下圖所示: (2) 啟動(dòng) App Widget應(yīng)用程序 長(zhǎng)按屏幕空白處,選擇“ Widget”,然后選擇“天氣預(yù)報(bào)” 。代碼如下所示: !—“ 下落雨滴”動(dòng)態(tài)效果 — ?xml version= encoding=utf8? set xmlns:android= !—Y不變, X從 100到 420,重復(fù)無限次 — translate android:repeatCount=1 android:fromXDelta=100 android:toXDelta=420 android:fromYDelta=50 android:toYDelta=50 android:duration=15000 / /set 第 六 章 系統(tǒng)測(cè)試 第六章 系統(tǒng)測(cè)試 至此已經(jīng)完成了 tyweather工程的代碼編寫工作,在這一章節(jié)對(duì) tyweather工程進(jìn)行測(cè)試,步驟及結(jié)果如下: (1) 啟動(dòng) Android虛擬機(jī) 在工程名 tyweather上點(diǎn)右鍵,然后 選擇“ Run As”,然后選擇“ Android Application”。 動(dòng)畫效果是通過 XML文件來實(shí)現(xiàn)的。 動(dòng)態(tài)特效 動(dòng)態(tài)特效是指如果天氣為多云或雨天時(shí),就會(huì)在 浮的云或下落的 雨 滴 ;如果天氣為 晴 時(shí),就會(huì)在 透明度逐漸變化第五章 程序開發(fā) 的太陽(yáng)圖標(biāo)等 。)。/ + (3) + 161。 ((2) + 161。 ((1))。 TextView temp = (TextView) ()。 TextView day = (TextView) ()。 } 列表適配器代碼: private class ForecastAdapter extends ResourceCursorAdapter { public ForecastAdapter(Context context, Cursor c) { //設(shè)置布局文件 super(context, , c)。 ...... //獲取游標(biāo),訪問數(shù)據(jù)庫(kù) Cursor forecastCursor = managedQuery(forecastUri, , null, null, null)。 第五章 程序開發(fā) /** Called when the activity is first created. */ Override public void onCreate(Bundle savedInstanceState) { (savedInstanceState)。在此工程中,仍然使用 setContentView( )設(shè)置布局,這樣做的好處是可以在界面中設(shè)置更為復(fù)雜的顯示元素 。為了能夠以列表的形勢(shì)顯示多行數(shù)據(jù),并制定每行數(shù)據(jù)的布局,使用了 ListActivity。 } } ConfigureActivity的布局文件是 res/layout/,采用了LinearLayout的布局方式。 finish()。 // 啟動(dòng) 獲取天氣預(yù)報(bào)信息的 后臺(tái)服務(wù) startService(new Intent(this, ))。 // 通過 ContentResolver對(duì)象存儲(chǔ)數(shù)據(jù) (, values)。 (, 1)。 (, updatetime)。 (, widgetId)。 updatetime = (().toString())。代碼如下: 第五章 程序開發(fā) !receiver字段定義的是 AppWidgetProvider類 — receiver android:icon=drawable/weather android:label=string/app_name android:name=ForecastWidget !intentfilter說明 appWidget可以接受下面的廣播事件 — intentfilter action android:name= /action /intentfilter !metadata指明 屬性 文件 — metadata android:name= android:resource=xml/weatherwidget/metadata /receiver 設(shè) 置頁(yè)面 ConfigureActivity ConfigureActivity繼承 Activity并且實(shí)現(xiàn)了 ,AppWidget第一次啟動(dòng)之前會(huì)先運(yùn)行 ConfigureActivity,會(huì) 出現(xiàn)設(shè)置頁(yè)面用戶進(jìn)行設(shè)置, 點(diǎn)擊保存按鈕就會(huì)將 設(shè)置好的參數(shù)會(huì)存儲(chǔ)到 SQLite中 。 // 啟動(dòng)時(shí)間信息的服務(wù) (new Intent(context, ))。 // 獲取需要更新的桌面小控件 (appWidgetIds)。代碼如下: ?xml version= encoding=utf8? appwidgetprovider xmlns:android= android:initialLayout=layout/weather //Widget的布局文件 //在啟動(dòng)前首先要啟動(dòng) ConfigureActivity進(jìn)行設(shè)置 android:configure= android:minWidth=292dip //定義 Widget組件的寬度 android:minHeight=144dip //定義 Widget組件的高度 android:updatePeriodMillis=0 //更新的時(shí)間周 期 /appwidgetprovider (3) 創(chuàng)建 ,此類繼承自 AppWidgetProvider,主要的功能有:獲取需要更新的桌面小控件;啟動(dòng)獲取天氣預(yù)報(bào)信息的服務(wù);啟動(dòng)時(shí)間信息的服務(wù); 更新 桌面小控件顯示內(nèi)容 ;更新時(shí)間信息 。創(chuàng)建 AppWidget需要以下四個(gè)步驟: (1) 定義 Widget布局文件,此文件是 res/layout/,采用AbsoluteLayout方式進(jìn)行布局 需要注意的是在這個(gè)文件中所使用的組件必須是 RemoteViews所支持的。 程序入口類 ForecastWidget ForecastWidget在設(shè)計(jì)上采用了 AppWidget框架結(jié)構(gòu), AppWidget就是HomeScreen上顯示的小部件,通過在 HomeScreen空白處長(zhǎng)按,在彈出的對(duì)話框第五章 程序開發(fā) 中選擇 Widget部件來進(jìn)行創(chuàng)建。 service android:name=ForecastService/service service android:name=ForecastTimeService/service 用戶界面 在用戶界面設(shè)計(jì)上,采用了 AppWidget框架結(jié)構(gòu),提供直觀的交互操作。 (, now + updateMilis, pendingIntent)。 AppWidget一啟動(dòng)就會(huì)啟動(dòng) ForcastTimeService這個(gè)后臺(tái)服務(wù),此服務(wù)設(shè)置了每隔 20秒刷新一次時(shí)間, “顯示頁(yè)面”通過這個(gè)后臺(tái)服務(wù)獲取系統(tǒng)時(shí)間從而顯示。 讀取天氣數(shù)據(jù) 實(shí)例 通過 ()方法 操作數(shù)據(jù)庫(kù)取出所需要的數(shù)據(jù),這一部分與 上一節(jié)的 “ 將解析好的數(shù)據(jù)存儲(chǔ)到 SQLite數(shù)據(jù)庫(kù)中”的關(guān)鍵點(diǎn)相同, 為節(jié)約篇幅, 此處不贅 述。 ...... (forecastUri, values)。 for (ForecastEntity forecast : ()) { ()。 (forecastUri, null, null)。核心代碼如下, 調(diào)用關(guān)系如圖 。 } (3) 將 解 析 好 的 數(shù) 據(jù) 存 儲(chǔ) 到 SQLite 數(shù)據(jù)庫(kù)中 。 } } eventType = ()。 } else if ((tagName)) { dealWithCurrentConditions(tagName, widgetEntity, xpp)。 //根據(jù)不同的標(biāo)簽做不同的解析 if ((tagName)) { throw new ForecastParseException( the city is non correct!)。 int eventType = ()。 String tagName = null。 核心代碼如下: //返回類型為 WidgetEntity private static WidgetEntity parseResponse(Reader responseReader) throws ForecastParseException { ...... try { //使用工廠類 XmlPullParserFactory來創(chuàng)建解析器 XmlPullParser XmlPullParserFactory factory = ()。 } return widgetEntity。 } catch (IOException e) { throw new ForecastParseException(Problem calling forecast API, e)。 //取出回復(fù)信息 HttpEntity entity = ()。 第五章 程序開發(fā) StatusLine status = ()。s weather infomation)。 //創(chuàng)建 Http Get請(qǐng)求 HttpGet request = new HttpGet((WEBSERVICE_URL, postalCode))。 WidgetEntity widgetEntity = null。 獲取天氣數(shù)據(jù) 天氣數(shù)據(jù) 的獲取天氣數(shù)據(jù)分為以下三個(gè)步驟: (1) 從 Google提供的 Web Service中獲取的天氣數(shù)據(jù),數(shù)據(jù)的獲取地址是: 下: public static WidgetEntity queryWebservice(String postalCode) throws ForecastParseException { //編碼出錯(cuò) if (postalCode == null) { throw new ForecastParseException(can not covert to entity)。 } } 后臺(tái)服務(wù) 后臺(tái)服務(wù)是 tyweather工程的核心模塊 ,在用戶啟動(dòng)后持續(xù)在后臺(tái)運(yùn)行,直到用戶停止服務(wù)。 (AUTHORITY, forecasts, FORECASTS)。 (AUTHORITY, widgets/, WIDGETS_ID)。 private static final int FORECASTS_ID = 202。 private static final int WIDGETS_FORECASTS = 103。 private static final int WIDGETS = 101。 } throw new IllegalStateException()。 case FORECASTS: return 。
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1