- 語法:
<category android:name="string" />
- 包含於:
<intent-filter>
- 說明:
- 新增類別名稱至意圖篩選器。如需有關意圖篩選器和篩選器中類別規格角色的詳細資料,請參閱「意圖和意圖篩選器」。
- 屬性:
android:name
- 類別的名稱。標準類別在
Intent
類別中定義為CATEGORY_name
常數。此處的指派名稱可以從這些常數衍生,在CATEGORY_
後方的name
加上前置字元「android.intent.category.
」。例如,CATEGORY_LAUNCHER
的字串值是「android.intent.category.LAUNCHER
」。注意:如要接收隱含意圖,您必須在意圖篩選器中加入
CATEGORY_DEFAULT
類別。startActivity()
和startActivityForResult()
方法會將所有意圖視為宣告CATEGORY_DEFAULT
類別。如果未在意圖篩選器中進行宣告,系統就不會將任何隱含意圖解析至您的活動。自訂類別應使用套件名稱為前置字元,確保名稱是唯一的。
- 導入版本:
- API 級別 1
- 另請參閱:
<action>
<data>
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2022-05-02 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"Translation issue"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]