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

正文內(nèi)容

計算機科學(xué)與技術(shù)專業(yè)畢業(yè)論文--基于android平臺的天氣軟件開發(fā)設(shè)計(編輯修改稿)

2024-12-04 23:07 本頁面
 

【文章內(nèi)容簡介】 @string/sias/ LinearLayout android:orientation vertical android:layout_width fill_parent android:layout_height wrap_content android:layout_marginTop 100dp TextView android:text @string/ab android:layout_width fill_parent android:layout_height wrap_content android:gravity center_horizontal/ 在加載界面文件中,還需要設(shè)置引用的布局文件,然后逐個聲明布局 文件中對應(yīng)的控件,并將這些控件與布局文件中的對應(yīng)的控件綁定在一起。綁定過程為:引用 中控件元素對應(yīng)的整型值,通過強制轉(zhuǎn)換,將其轉(zhuǎn)換為對應(yīng)類型的控件,最后與之綁定。這樣做是為 setContentView 。 界面顯示后,開始進行應(yīng)用程序運行前的準備,主要有數(shù)據(jù)庫的初始化和默認城市的天氣數(shù)據(jù)下載工作。在數(shù)據(jù)庫的初始化部分,首先檢查數(shù)據(jù)庫文件是否存在,若不存在則復(fù)制數(shù)據(jù)庫文件到指定目錄,若存在,則不進行此項操作。數(shù)據(jù)庫初始化代碼如下: // 初始化,轉(zhuǎn)移數(shù)據(jù)庫文件 try 。 Sytln 復(fù)制數(shù)據(jù)庫 。 catch Exception e // TODO Autogenerated catch block Sytln 復(fù)制數(shù)據(jù)庫時候異常 。 。 TimerTask task new TimerTask public void run // TODO Autogenerated method stub intent new Intent , 。 code, 。 Load_ActitService intent 。 while true if ! 0 0 。 break。 。 加載界面通過不斷檢查狀態(tài)碼,知道下載過程結(jié)束,然后依據(jù)狀態(tài)碼,判斷下載是否成功,在進行操作。下載成功,則跳轉(zhuǎn)到默認城市的實時天氣界面,下載不成功,則通知用戶聯(lián)網(wǎng)失敗等信息。代碼如下: public void handleMessage Message msg // TODO Autogenerated method stub if , 連接超時!請檢查網(wǎng)絡(luò)連接! , .show 。 if 。 Intent weatherIntent new Intent 。 , 。 Load_ActitActivity weatherIntent 。 Load_ActiService intent 。 Load_ActiridePendingTransition , 。 // 界面切換 Load_Actish 。 下載數(shù)據(jù)成功后,表示天氣對象已經(jīng)可以使用,下載服務(wù)將關(guān)閉,然后切換到實時天氣界面。 實時天氣界面 圖 :實時天氣界面設(shè)計圖 根據(jù)設(shè)計, 實現(xiàn)實時天氣界面 Weather_Activity,使用的布局文件是。 8 個 TextView:城市名、天氣描述、溫 1 個 ImageView:天氣圖片, 1 個 Button:設(shè)置默認。實時天氣界面布局: ! 上半部分 LinearLayout android:orientation horizontal android:layout_width fill_parent android:layout_height wrap_content ! 第一列:文字信息 LinearLayout android:orientation vertical android:layout_width 160dp android:layout_height fill_parent android:paddingLeft 5dp TextView android:id @+id/city android:layout_width wrap_content android:layout_height 60dp android:textSize 18pt android:textStyle bold/ TextView android:id @+id/weather android:layout_width 140dp android:layout_height 40dp android:textSize 10pt android:paddingLeft 2dp android:layout_marginTop 20dp/ TextView android:id @+id/temp android:layout_width 140dp android:layout_height 40dp android:textSize 10pt android:paddingLeft 4dp/ TextView android:id @+id/wind android:layout_width 140dp android:layout_height 40dp android:textSize 10pt android:paddingLeft 2dp/ ! 第一列:文字信息 結(jié)束 ! 第二列:圖片信息 LinearLayout android:orientation vertical android:layout_margin 5dp android:layout_width fill_parent android:layout_height fill_parent ImageView android:id @+id/img android:layout_width 110dp android:layout_height 110dp android:contentDescription @string/con android:gravity center_horizontal android:visibility visible/ TextView android:id @+id/date android:layout_width fill_parent android:layout_height wrap_content android:layout_marginTop 10dp android:textSize 6pt android:paddingLeft 6dp/ ! 發(fā)布時間 LinearLayout android:orientation horizontal android:layout_width fill_parent android:layout_height wrap_content android:paddingLeft 5dp TextView android:id @+id/week android:layout_width wrap_content android:layout_height wrap_content android:textSize 6pt/ TextView android:id @+id/inch android:layout_width wrap_content android:layout_height wrap_content android:textSize 6pt/ ! 發(fā)布時間 結(jié)束 ! 不是默認 Button android:id @+id/notDefault android:layout_width 90dp android:layout_height 35dp android:textSize 6pt android:layout_marginTop 5dp android:text @string/notDefault
點擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1