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

正文內(nèi)容

本科畢業(yè)論文-基于android平臺的3g氣象軟件設(shè)計(參考版)

2025-06-07 08:22本頁面
  

【正文】 在完成課題設(shè)計的過程中,老師在。與此同時,這個軟件還可以進(jìn)一步擴(kuò)展,例如“新聞模塊”、“百寶箱”等,是功能更加強(qiáng)大,帶給用戶更好的體驗與生活的便捷。 在這個過程中,我學(xué)會了很多知識,比如 Android 環(huán)境的搭建、 Intent、Activity、 Service、 ContentProvider、 SQLite 等,但我學(xué)會的最重要的一點是,利用現(xiàn)有的資源去解決問題,在圖書館、在網(wǎng)絡(luò)上尋找答案。如下圖所示 : 第六章 系統(tǒng)測試 第七章 總結(jié) 第七章 總結(jié) 經(jīng)過數(shù)個月的努力, Android平臺 3G手機(jī)氣象軟件終于完成了。 如下圖所示: 第六章 系統(tǒng)測試 (4)點擊顯示頁面就會進(jìn)入詳細(xì)界面,詳細(xì)頁面通過文字圖片動畫顯示當(dāng)前的天氣情況,包括城市當(dāng)前天氣、溫度、風(fēng)向、風(fēng)速、濕度;同時顯示今后四天的天氣情況。 如下圖所示: 第六章 系統(tǒng)測試 (2)設(shè)置界面:對要顯示天氣預(yù)報的城市及更新頻率進(jìn)行設(shè)置。 Android虛擬機(jī)啟動較慢。按照 XML文檔的結(jié)構(gòu)來介紹Animtation,其有以下四種類型: 由于篇幅限制,選實現(xiàn)“下落雨滴”的 。通過 ( )方法判斷具體顯示哪個動畫。 } } 在上述代碼中涉及布局文件 ,為節(jié)約篇幅,此處不贅述。227。227。 ((5))。 //()判斷使用哪個圖標(biāo) ((c.getString(4)))。 TextView condition = (TextView) ()。 } //綁定 View Override public void bindView(View view, Context context, Cursor c) { ImageView icon = (ImageView) ()。 listAdapter = new ForecastAdapter(this, forecastCursor)。 //設(shè)置布局文件 setContentView()。核心代碼如下: //繼承 ListActivity public class DetailForecastActivity extends ListActivity { private ListAdapter listAdapter。 ListActivity可以不通過 setContentView( )設(shè)置布局,也不必重載 onCreate( )方法,而直接將顯示列表加載到 ListActivity,增加了使用的便利性。代碼如下: LinearLayout xmlns:android= android:layout_height=fill_parent android:layout_width=fill_parent android:orientation=vertical TextView android:id=+id/TextView01 android:layout_height=wrap_content android:text=string/labelCity android:layout_width=fill_parent/TextView !—編輯框“城市” — EditText android:layout_height=wrap_content android:text=Shenzhen android:editable=true android:layout_width=fill_parent android:id=+id/editCity/EditText TextView android:layout_height=wrap_content android:layout_width=fill_parent android:id=+id/lableUpdateTime android:text=string/lableUpdateTime/TextView !—編輯框“更新頻率” — EditText android:layout_height=wrap_content android:id=+id/editUpdatetime android:text=2 android:layout_width=fill_parent/EditText !—保存按鈕 — Button android:layout_height=wrap_content android:id=+id/btnSave android:text=string/btnSave android:layout_width=fill_parent/Button /LinearLayout 詳細(xì)頁面 DetailForecastActivity DetailForecastActivity主要用來顯示詳細(xì)的天氣信息,包括當(dāng)天和未來四天的天氣信息。 第五章 程序開發(fā) break。 setConfigureResult()。 (new int[]{widgetId})。 ContentResolver resolver = getContentResolver()。 (, 1)。 (, city)。 ContentValues values = new ContentValues()。 核心代碼如下: //OnClick()事件 public void onClick(View v) { switch (()) { case : { city = ().toString()。 } //更新桌面小空間顯示內(nèi)容 public static RemoteViews updateViews(Context context, Uri uri) { } //更新時間信息 public static RemoteViews updateTime(Context context) { } (4) AppWidgetProvider對應(yīng)一個 receiver屬性,需要更新 。 // 啟動獲取天氣預(yù)報信息的服務(wù) (new Intent(context, ))。核心代碼如下: public class ForecastWidget extends AppWidgetProvider { Override public void onUpdate(Context context, AppWidgetManager appWidgetManager,int[] appWidgetIds) { (context, appWidgetManager, appWidgetIds)。 (2) 定義 Widget的基本屬性文件,此文件是 /res/xml/。此外,長按部件后并拖動到垃圾箱里進(jìn)行刪除。三個用戶界面風(fēng)格簡約、操作簡便,用戶體驗將非常好。 至此,后臺服務(wù)介紹完畢,最后還需要在 注冊后臺服務(wù)。核心代碼如下: AlarmManager alarmManager = (AlarmManager)getSystemService()。 定時更新時間。 } 第五章 程序開發(fā) 注意: for (ForecastEntity forecast : ())相當(dāng)于 foreach語句,在 ()集合里打印出所有類型為 ForecastEntity的 forecast變量。 (, ())。 ContentValues values = new ContentValues()。 C o n t e n t P r o v i d e文 件 系 統(tǒng) 數(shù) 據(jù) 庫 網(wǎng) 絡(luò)C o n t e n t R e s o l v e rU R I 圖 ContentProvider調(diào)用關(guān)系 ContentResolver resolver = ()。 其 過 程 是 : 使 用ContentResolver 對象,通過 URI 間接調(diào)用 ContentProvider, 使用ContentResolver 對象與 ContentProvider 進(jìn) 行 交 互 , 而ContentResolver則通過 URI確定需要訪問的 ContentProvider的數(shù)據(jù)集。 } } catch (IOException e) { ...... } return widgetEntity。 第五章 程序開發(fā) } else if ((tagName)) { dealWithForecastConditions(tagName, widgetEntity, xpp)。 } else if ((tagName)) { dealWithInfomation(tagName, widgetEntity, xpp)。 while (eventType != ) { if (eventType == ) { tagName = ()。 (responseReader)。 XmlPullParser xpp = ()。 } (2) 調(diào)用輕量級 XML解析器 XmlPullParser對從網(wǎng)絡(luò)上獲取的字節(jié)流數(shù)據(jù)進(jìn)行解析,并且將 解析結(jié)果保存在 WidgetEntity對象中 。 } if (responseReader != null) { widgetEntity = parseResponse(responseReader)。 responseReader = new InputStreamReader((), GB2312)。 (TAG, Request returned status + status)。 //發(fā)出請求 HttpResponse response = (request)。 try { (TAG, get google39。 //通過 HttpClient創(chuàng)建 Http連接 HttpClient client = new DefaultHttpClient()。 } Reader responseReader。后臺服務(wù)主要有三個功能,一是周期性的獲取 Google的天氣數(shù)據(jù)并存儲到 SQLite,二是從 SQLite讀取出要顯示的數(shù)據(jù),三是定時更新“顯示頁面”的時間。 (AUTHORITY, forecasts/, FORECASTS_ID)。 (AUTHORITY, widgets//forecasts, WIDGETS_FORECASTS)。 //聲明了 uriMatcher的匹配方式和返回代碼 第五章 程序開發(fā) static { (AUTHORITY, widgets, WIDGETS)。 private static final int FORECASTS = 201。 private static final int WIDGETS_ID = 102。 } //構(gòu)造無匹配方式的 uriMatcher private static final UriMatcher uriMatcher = new UriMatcher( )。 case FORECASTS_ID: return 。 case WIDGETS_FORECASTS: return 。核心代碼如下: /*getType()函數(shù)用來返回指定 URI的 MIME數(shù)據(jù)類型 * CONTENT_TYPE表示 URI是多條數(shù)據(jù) * CONTENT_ITEM_TYPE表示是單條數(shù)據(jù) */ Override public String getType(Uri uri) { // TODO Autogenerated method stub switch ((uri)) { case WIDGETS: return 。 第五章 程序開發(fā) } (4) 添加、 刪除、更新功能 由于核心代碼類似,此處不一一贅述。 break。 (TABLE_FORECAST)。 break。 break。 //qb的 where條件 ( + = + appWidgetId)。 } case WIDGETS_FORECASTS: { // Pick all the forecasts for given widget, sorted by date and // importance //獲得 appWidgetId String appWidgetId
點擊復(fù)制文檔內(nèi)容
畢業(yè)設(shè)計相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1