A.setContentView()可以通過注解實(shí)現(xiàn)
B.setContentView()不能通過注解實(shí)現(xiàn)
C.都能通過注解實(shí)現(xiàn)
D.都不能通過注解實(shí)現(xiàn)
您可能感興趣的試卷
你可能感興趣的試題
A.當(dāng)View需要更新時(shí),首先去找Controller,然后Controller找Model獲取數(shù)據(jù),Model獲取到數(shù)據(jù)之后直接更新View
B.當(dāng)View需要更新時(shí),首先去找Model獲取數(shù)據(jù),Model獲取到數(shù)據(jù)之后直接更新View
C.當(dāng)View需要更新時(shí),首先去找Controller,然后Controller找Model獲取數(shù)據(jù),Model獲取到數(shù)據(jù)之后直接更新Controller,就顯示了
D.當(dāng)View需要更新時(shí),首先去找Controller,然后Controller找Model獲取數(shù)據(jù),Controller獲取到數(shù)據(jù)之后直接更新View
A.View不可以直接訪問Model的
B.View就是Activity
C.View是可以直接訪問Model的
D.View就是fragment
A.當(dāng)View需要更新數(shù)據(jù)時(shí),首先去找Model,然后Presenter去找Model請求數(shù)據(jù),Model獲取到數(shù)據(jù)之后通知Presenter,Presenter再通知Model更新數(shù)據(jù)
B.當(dāng)View需要更新數(shù)據(jù)時(shí),首先去找Presenter,然后Presenter去找Model請求數(shù)據(jù),Model獲取到數(shù)據(jù)之后通知Presenter,Model再通知View更新數(shù)據(jù)
C.當(dāng)View需要更新數(shù)據(jù)時(shí),首先去找Presenter,然后Presenter去找Model請求數(shù)據(jù),Model獲取到數(shù)據(jù)之后通知Presenter,Presenter再通知View更新數(shù)據(jù)
D.當(dāng)View需要更新數(shù)據(jù)時(shí),首先去找Presenter,然后Presenter去找Model請求數(shù)據(jù),Presenter獲取到數(shù)據(jù)之后通知model,Presenter再通知View更新數(shù)據(jù)
A.Moder-View-Presenter
B.Model-Video-Presenter
C.Model-View-Picture
D.Model-View-Presenter
A.第一,將我們需要注入的對象的類的構(gòu)造參數(shù)使用@Inject標(biāo)注,告訴dagger2它可以實(shí)例化這個(gè)類;
B.兩個(gè),第二,編寫Component接口使用@Component進(jìn)行標(biāo)注,里面的voidinject()的參數(shù)表示要將依賴注入到的目標(biāo)位置;
C.第三,使用androidstudio的Build菜單編譯一下項(xiàng)目,使它自動(dòng)生成我們編寫的Component所對應(yīng)的類,生成的類的名字的格式為“Dagger+我們所定義的Component的名字”;
D.第四,在需要注入的類中使用@Inject標(biāo)注要注入的變量;然后調(diào)用自動(dòng)生成的Component類的方法create()或builder().build(),然后inject到當(dāng)前類;在這之后就可以使用這個(gè)@Inject標(biāo)注的變量了。
最新試題
在WorkManager中,哪個(gè)類用于定義WorkRequest的約束條件()
以下哪個(gè)不是創(chuàng)建數(shù)據(jù)庫實(shí)例的步驟()
以下哪個(gè)字符串資源ID用于播放音頻的按鈕文本()
在WorkManager中,LiveData可以轉(zhuǎn)換為什么類型的數(shù)據(jù)流()
在WorkManager中,哪種狀態(tài)表示工作已完成()
Room是在哪個(gè)數(shù)據(jù)庫基礎(chǔ)上構(gòu)建的抽象層()
在HomeScreen中,homeUiState的作用是什么()
創(chuàng)建實(shí)體類時(shí),哪個(gè)注解用來標(biāo)記數(shù)據(jù)庫實(shí)體類()
在WorkManager中,哪個(gè)方法用于獲取工作信息()
在WorkManager中,哪個(gè)方法用于取消工作()