第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時(shí)綁定郵箱和手機(jī)立即綁定

onpause和onstop啥區(qū)別

onpause和onstop啥區(qū)別?一個(gè)說是隱藏,一個(gè)說是不可見?

正在回答

5 回答

以上結(jié)論有錯(cuò)誤,onPause和onStop一般都是成對出現(xiàn),鎖屏?xí)瑫r(shí)調(diào)用,非全屏dialog彈出時(shí),兩個(gè)都不會(huì)調(diào)用

0 回復(fù) 有任何疑惑可以回復(fù)我~


以上的結(jié)論有錯(cuò)
0 回復(fù) 有任何疑惑可以回復(fù)我~

是呀挺好記的。

基本上可以分3對,ocreate對應(yīng)ondestroy 銷毀跟創(chuàng)建, onStart對應(yīng)onStop 可見與不可見都不能操作,onResum對應(yīng)onPause 都可見 前者可操作后者不可操作。

2 回復(fù) 有任何疑惑可以回復(fù)我~

說得通俗一點(diǎn)就是:onPause就是你看得見,但是無法操作;onStop就是你看都看不見。

1 回復(fù) 有任何疑惑可以回復(fù)我~

Generally, you should?not?use onPause() to store user changes (such as personal information entered into a form) to permanent storage. The only time you should persist user changes to permanent storage withinonPause() is when you're certain users expect the changes to be auto-saved (such as when drafting an email). However, you should avoid performing CPU-intensive work during onPause(), such as writing to a database, because it can slow the visible transition to the next activity (you should instead perform heavy-load shutdown operations during onStop()).

0 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消
Android-重識Activity
  • 參與學(xué)習(xí)       46063    人
  • 解答問題       45    個(gè)

Activity的系列教程的第一講,將帶您重新認(rèn)識Activity

進(jìn)入課程

onpause和onstop啥區(qū)別

我要回答 關(guān)注問題
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號