一個(gè)應(yīng)用程序有幾個(gè)Context

2018-07-04 11:09 更新

在應(yīng)用程序中Context的具體實(shí)現(xiàn)子類就是: Activity, Service, Application. 那么Context數(shù)量 = Activity數(shù)量 + Service數(shù)量 + 1

Broadcast Receiver, Content Provider 并不是 Context 的子類, 它們所持有的 Context 都是其他地方傳過去的, 所以并不計(jì)入Context總數(shù).


以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號