Intent的七個(gè)屬性
1)ComponentName(組件名稱(chēng))
ComponentName
2)Action(動(dòng)作)
Action
3)Category(類(lèi)別)
Category
4)Data(數(shù)據(jù)),Type(MIME類(lèi)型)
Data(數(shù)據(jù))烙懦,Type(MIME類(lèi)型)
5)Extras(額外)
Extras
6)Flags(標(biāo)記)
Flags
顯式Intent
定義:通過(guò)組件名指定啟動(dòng)的目標(biāo)組件,eg:startActivity(new Intent(A.this,B.class))吼句;
? ? ? ? ? ?每次啟動(dòng)的組件只有一個(gè)缭裆;
隱式Intent
定義:不指定組件名,而指定Intent的Action,Data,或Category市咆;
? ? ? ? ? ?啟動(dòng)組件時(shí)匹配清單文件中相關(guān)組件的Intent-filter慢宗,逐一匹配出滿(mǎn)足屬性的組件,彈出多個(gè)需手動(dòng)選擇犁享;
隱式Intent
預(yù)定義隱式
自定義隱式
常用系統(tǒng)Intent合集
Action查詢(xún)
下載了Android文檔
sdk-->docs-->reference-->android--->content--->Intent.html --》Constants