AnimatedImage
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
繪製動畫圖片 (如 GIF) 的元素。
語法
<AnimatedImage resource="string" format="IMAGE | AGIF | WEBP"
thumbnail="string" />
屬性
AnimatedImage
元素的屬性如下:
必要屬性
必要屬性包括:
resource
- 資源 ID 是指要算繪的動畫資源。
下列程式碼片段顯示如何參照位於 res/drawable/my_anim.webp
的動畫:
<AnimatedImage resource="my_anim" format="WEBP">
</AnimatedImage>
format
- 動畫的格式。支援的值為
AGIF
、WEBP
和 IMAGE
。
選用屬性
選用屬性包括:
thumbnail
- 所參照縮圖的資源 ID,該縮圖可反映動畫內容。這可用於取代不支援動畫的
AnimatedImage
,例如在錶面輪轉介面的預覽畫面。 ,瞭解如何調查及移除這項存取權。
為您推薦
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2024-08-22 (世界標準時間)。
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"缺少我需要的資訊"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"過於複雜/步驟過多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"過時"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻譯問題"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/程式碼問題"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"容易理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"確實解決了我的問題"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]
{
"last_modified": "上次更新時間:2024-08-22 (世界標準時間)。",
"state": ""
}