將 Car UI 庫集成到應用程序中
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
Car UI 庫包含兩個供應用程序實現的元素:
應用程序通過將 Car UI 庫添加為依賴項來集成它:
Android 9 和 Android 10( Android.mk
文件),添加以下內容:
LOCAL_STATIC_ANDROID_LIBRARIES := car-ui-lib
Android 11(及更高版本)( Android.bp
),添加以下內容:
static_libs: [
...
"car-ui-lib-bp",
]
要查看使用 Car UI 庫組件的示例,請參閱packages/apps/Car/libs/car-ui-lib/paintbooth/src/main/java/com/android/car/ui/paintbooth
中的Paintbooth應用程序。
設計汽車 UI 組件
一般來說,應用程序應該能夠通過提供數據以及在某些情況下提供圖像和圖標來實現所有必要的功能。例如,後退、關閉、搜索和菜單等標準圖標由 Car UI 庫提供。如果您發現缺少資源或如果提供的組件無法實現某些功能,請與 Android Automotive Partner Engineering 合作。
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2022-08-03 (世界標準時間)。
[{
"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":"其他"
}]