自 2025 年 3 月 27 日起,我們建議您使用 android-latest-release
而非 aosp-main
建構及貢獻 AOSP。詳情請參閱「Android 開放原始碼計畫變更」。
自訂規範
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
AOSP 中提供的撥號器實作功能,可提供可直接採用或修改的基本主題和結構。
在下表中,「應」和「可」的說明是根據 在 RFC 中用於指示需求層級的關鍵字 (RFC 2119) 定義的 IETF 標準,這與 Android 10 相容性定義所使用的標準相同。
自訂規範
您可以根據下方所述的限制,調整或修改基本主題和結構。下表說明與自訂設定相關的 OEM 責任。
自訂 |
說明 |
SHOULD |
可自訂的行為或介面:
- 透過資源重疊調整整體主題和樣式
- 調色盤
- 尺寸
- 文字外觀
- 小工具外觀
- 對話方塊外觀
- 可繪項目
- 啟用或停用受設定限制的功能,或變更由資源設定的參數
|
5 月 |
Google 建議的行為或介面,可提供最佳使用者體驗,但不會強制執行。
- 修改自適應回應規則。
- 修改撥號應用程式的高階 UI 結構。版面配置 UI 元件必須遵循使用者體驗限制。
|
撥號程式屬於一組系統應用程式 (包括媒體、通知中心和應用程式啟動器),這些應用程式都會共用在 AOSP 結構中不同層級定義的共同樣式和資產:
-
framework/base/core
所有 Android 基本樣式都定義於此。具體來說,所有系統應用程式主題都以 Theme.DeviceDefault
為基礎,這個主題是專為原始設備製造商 (OEM) 使用而設計,可用於自訂裝置的預設外觀。
-
packages/services/Car/car_product/overlay
這個資料夾包含 Theme.DeviceDefault
的覆寫值,用於產生 Android Automotive 的 AOSP 外觀和風格。原始設備製造商 (OEM) 可能會選擇排除這項疊加層,並改用自己的疊加層。
-
packages/apps/Car/libs/car-apps-common
AOSP 提供的系統應用程式之間共用的常用顏色和樣式。OEM 可以使用 path/to/overlay/packages/apps/Car/libs/car-apps-common
底下的疊加層自訂這些元素。
-
packages/apps/Car/Dialer
Dialer 會使用自有主題,該主題是從 Theme.DeviceDefault
(在 framework/base
中定義) 延伸而來。您也可以使用疊加層自訂 Dialer 的版面配置、顏色、樣式和其他資源。與上述 libs
類似,資源覆寫值可位於 path/to/overlay/packages/apps/Car/Dialer
中。
其他說明文件
如要進一步瞭解 AOSP 主題設定和覆蓋層,請參閱「使用資源覆蓋層自訂建構作業」。
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-27 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-27 (世界標準時間)。"],[],[],null,["# Customization guidelines\n\nThe Dialer implementation included in AOSP provides a base theme and structure you can adopt as\nis or modify.\n\nIn the table below, the descriptions of \"SHOULD\" and \"MAY\" are per the IETF standard defined\nin [Key words for use in RFCs to\nIndicate Requirement Levels (RFC 2119)](http://www.ietf.org/rfc/rfc2119.txt), the same standard used in the\n[Android 10 Compatibility Definition](/docs/compatibility/10/android-10-cdd).\n\nCustomization guidelines\n------------------------\n\nYou can adapt or modify the base theme and structure as per the restrictions mentioned below.\nThe following table describes\nthe OEM responsibilities regarding customization.\n\n| Customization | Description |\n|---------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **SHOULD** | Behaviors or interfaces that may be customized: - Adjust overall theming and styling through a resource overlay - Color pallette - Sizing - Text appearance - Widget appearance - Dialog appearance - Drawables - Enable or disable a feature gated by a config or change parameters configured by resources |\n| **MAY** | Behaviors or interfaces Google recommends for an optimal user experience, but does not enforce. - Modify adaptive-responsive rules. - Modify the high-level UI structure of Dialer. The Layout UI component must follow the User Experience Restrictions. |\n\nDialer belongs to a suite of system apps (including Media, Notification Center, and\nApp Launcher), all of which share common styles and assets that are defined at different levels in\nthe AOSP structure:\n\n- `framework/base/core` \n\n All Android base styles are defined here. Specifically, all system app themes are\n based on `Theme.DeviceDefault`, the theme designed for use by OEMs to customize\n device default appearance.\n\n- `packages/services/Car/car_product/overlay` \n\n This folder contains overrides to `Theme.DeviceDefault` which are used to produce\n the AOSP look and feel of Android Automotive. OEMs might opt for excluding this overlay and\n use their own\n instead.\n\n- `packages/apps/Car/libs/car-apps-common` \n\n Common colors and styles shared among AOSP provided system apps. These elements can\n be customized by OEMs using overlays under\n `path/to/overlay/packages/apps/Car/libs/car-apps-common`.\n\n- `packages/apps/Car/Dialer` \n\n Dialer uses its own theme, which extends from `Theme.DeviceDefault` (defined in\n `framework/base`). The layouts, colors, styles, and other resources of Dialer can\n also be customized through the use of an Overlay. Similar to `libs` mentioned\n above, the resource override can be located in\n `path/to/overlay/packages/apps/Car/Dialer`.\n\nMore documentation\n------------------\n\nFor more information about AOSP theming and overlays, see\n[Customize the build with resource\noverlays](/docs/setup/create/new-device#use-resource-overlays)."]]