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

正文內(nèi)容

android生命周期ppt課件(編輯修改稿)

2025-06-01 07:58 本頁面
 

【文章內(nèi)容簡介】 從 Activity建立到銷毀的全部過程,始于onCreate(),結(jié)束于 onDestroy() ? 使用者通常在 onCreate()中初始化 Activity所能使用的全局資源和狀態(tài),并在 onDestroy()中釋放這些資源 ? 在一些極端的情況下, Android系統(tǒng)會(huì)不調(diào)用 onDestroy()函數(shù),而直接終止進(jìn)程 Activity生命周期 ? 可視生命周期 ? 可視生命周期是 Activity在界面上從可見到不可見的過程,開始于 onStart(),結(jié)束于 onStop() Activity生命周期 ? 可視生命周期 ? onStart() ? 一般用來初始化或啟動(dòng)與更新界面相關(guān)的資源 ? onStop() ? 一般用來暫?;蛲V挂磺信c更新用戶界面相關(guān)的線程、計(jì)時(shí)器和服務(wù) ? onRestart() ? 函數(shù)在 onSart()前被調(diào)用,用來在 Activity從不可見變?yōu)榭梢姷倪^程中,進(jìn)行一些特定的處理過程 ? onStart()和 onStop()會(huì)被多次調(diào)用 Activity生命周期 ? 活動(dòng)生命周期 ? 活動(dòng)生命周期是 Activity在屏幕的最上層,并能夠與用戶交互的階段,開始于 onResume(),結(jié)束于 onPause() ? 在 Activity的狀態(tài)變換過程中 onResume()和 onPause()經(jīng)常被調(diào)用,因此這兩個(gè)函數(shù)中應(yīng)使用更為簡單、高效的代碼 Activity生命周期 ? onPause()和 onSaveInstanceState() ? 這兩個(gè)函數(shù)都可以用來保存界面的用戶輸入數(shù)據(jù) ? onPause()一般用于保存持久性數(shù)據(jù),并將數(shù)據(jù)保存在存儲設(shè)備上的文件系統(tǒng)或數(shù)據(jù)庫系統(tǒng)中的 ? onSaveInstanceState()主要用來保存動(dòng)態(tài)的狀態(tài)信息,信息一般保存在 Bundle中 ? Bundle是能夠保存多種格式數(shù)據(jù)的對象,系統(tǒng)在調(diào)用onRestoreInstanceState()和 onCreate()時(shí),會(huì)同樣利用Bundle將數(shù)據(jù)傳遞給函數(shù) Activity生命周期 ? LOG類:日志的輸出 Generally, use the () () () () and () methods. LOG類:日志的輸出 ? public static int i (String tag, String msg) Added in API level 1Send a INFO log message and log the exception. ? Parameters tag Used to identify the source of a log message. It usually identifies the class or activity where the log call occurs. msg The message you would like logged. Activity生命周期 ? 活動(dòng)生命周期 ? 下面以 ActivityLifeCycle示例來進(jìn)行說明,ActivityLifeCycle示例的運(yùn)行界面 Activity生命周期 ? ( P62) 1. private static String TAG = LIFTCYCLE。 2. @Override //完全生命周期開始時(shí)被調(diào)用,初始化 Activity 3. public void onCreate(Bundle savedInstanceState) { 4. (savedInstanceState)。 5. setContentView()。 6. (TAG, (1) onCreate())。 7. } 8. ? @Override //可視生命周期開始時(shí)被調(diào)用,對用戶界面進(jìn)行必要的更改 ? public void onStart() { 1. ()。 2. (TAG, (2) onStart())。 3. } Activity生命周期 20. @Override //在 onStart()后被調(diào)用,恢復(fù) onSaveInstanceState()保存的用戶界面信息 21. publ
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1