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

正文內(nèi)容

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

2025-01-23 04:50本頁面
  

【正文】 在這個過程中,我學會了很多知識,比如 Android 環(huán)境的搭建、 Intent、Activity、 Service、 Cont。如下圖所示: 第 六 章 系統(tǒng)測試 第七章 總結(jié) 第七章 總結(jié) 經(jīng)過數(shù)個月的努力, Android平臺 3G手機氣象軟件終于完成了。 如下圖所示: 第 六 章 系統(tǒng)測試 (4)點擊顯示頁面就會進入詳細界面,詳細頁面通過文字 圖片 動畫 顯示當前的天氣情況,包括城市當前天氣、溫度、風向、風速、濕度;同時顯示今后四天的天氣情況 。 如下圖所示: 第 六 章 系統(tǒng)測試 (2)設置界面:對要顯示天氣預報的城市及更新頻率進行設置。 Android虛擬機啟動較慢。 按照 XML文檔的結(jié)構(gòu)來介紹Animtation,其有 以下四 種類型 : 由于篇幅限制,選實現(xiàn)“下落雨滴”的 。 通過 ( )方法判斷具體顯示哪個動畫。 } } 在上述代碼中涉及布局文件 ,為節(jié)約篇幅,此處不贅述 。227。227。 ((5))。 //()判斷使用哪個圖標 ((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)。 //設置布局文件 setContentView()。核心代碼如下: //繼承 ListActivity public class DetailForecastActivity extends ListActivity { private ListAdapter listAdapter。 ListActivity可以不通過 setContentView( )設置 布局,也不必重載 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 詳細頁面 DetailForecastActivity DetailForecastActivity主要用來顯示詳細的天氣信息,包括當天和未來四天的天氣信息。 第五章 程序開發(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對應一個 receiver屬性,需要更新 。 // 啟動獲取天氣預報信息的服務 (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/。此外,長按部件后并拖動到垃圾箱里進行刪除。 三個用戶界面 風 格簡約、操作簡便,用戶體驗將非常好。 至此,后臺服務介紹完畢,最后還需要在 注冊后臺服務。核心代碼如下: AlarmManager alarmManager = (AlarmManager)getSystemService()。 定時更新時間 。 } 第五章 程序開發(fā) 注意: for (ForecastEntity forecast : ())相當于 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) 絡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 進 行 交 互 , 而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)絡上獲取的字節(jié)流數(shù)據(jù)進行解析,并且將解析結(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。后臺服務主要有三 個功能 ,一是周期性的 獲取 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 = ().get(1)。 ( + = + appWidgetId)。 } case WIDGETS_ID: { String appWid
點擊復制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1