自 2025 年 3 月 27 日起,我们建议您使用 android-latest-release
而非 aosp-main
构建 AOSP 并为其做出贡献。如需了解详情,请参阅 AOSP 的变更。
全局可配置值
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
您可以使用本文中提供的资源自定义拨号器。不同视图所使用的资源是重定向自全局值。如需了解详情,请参阅 AOSP 用户体验设计(可能需要登录)。
<!-- Boolean config to gate the dialpad input motion -->
<bool name="config_enable_dial_motion">true</bool>
<!-- Font scale for the last input digit -->
<item name="config_dial_motion_scale_start" format="float" type="integer">1.5</item>
<!-- Scale down motion duration for the last input digit -->
<integer name="config_dial_motion_duration">200</integer>
<!-- 8388629 stands for Gravity.END |
Gravity.CENTER_VERTICAL-->
<integer name="config_dialed_number_gravity">8388629</integer>
详细的用户个人资料
用于在找到与输入号码匹配的联系人时显示详细用户个人资料的配置。设置为 false 时,仅显示联系人姓名。设置为 true 时,显示联系人的头像、姓名和电话号码标签。
<bool name="config_show_detailed_user_profile_on_dialpad">false</bool>
背景图片 Alpha 值
设置为 0 时,背景图片不可见。
<!-- Alpha when there is a contact avatar -->
<item name="config_background_image_alpha" format="float"
type="dimen">1.0</item>
<!-- Alpha when there are no contact avatars and uses the letter tile drawable color as background. -->
<item name="config_background_image_error_alpha" format="float" type="dimen">1.0</item>
“最近通话”和“通讯录”页上的操作按钮
<!-- A config determines whether to show divider and callog_action_button for callog items that
are not stored as contacts. "true" will show divider and button as disable state and "false" will
make divider and button invisible for non contacts. -->
<bool name="config_show_calllog_action_button_for_non_contact">false</bool>
<!-- A config determines whether to show divider and the button on the right side for contacts
without any contact details. "true" will show divider and button as disable state and "false" will
make divider and button invisible for empty contacts. -->
<bool name="config_show_contact_detail_button_for_empty_contact">false</bool>
控制“详细联系信息”页上的地址和导航功能
使用此布尔值配置可控制“详细联系信息”页上的地址和导航功能。
<!-- A config determines whether to show postal address in contact details page. -->
<bool name="config_show_postal_address">false</bool>
“详细联系信息”页上的工具栏
<!-- A config determines whether to show the action bar view in the contact details page.-->
<bool name="config_show_contact_details_action_bar_view">false</bool>
<!-- A config determines if to show the action bar avatar in the contact details page.-->
<bool name="config_show_contact_details_action_bar_avatar">true</bool>
工具栏标题模式的配置:
- 0 表示应用名称。
- 1 表示没有工具栏标题。
- 2 表示已连接的蓝牙设备的名称。
<!-- Use app name as toolbar title. Supported value see @attr/toolbarTitleMode -->
<integer name="config_toolbar_title_mode">0</integer>
全屏通话界面
用于控制全屏通话界面的配置。设置为 true 时,无论来电用户是谁,接听来电时都将显示全屏通话界面。如果设置为 false,当用户未使用拨号器时,接听来电会关闭 HUN 且不会全屏显示通话界面。
<bool name="config_show_fullscreen_incall_ui">true</bool>
头像角
更改该值会影响所有头像的形状,包括通知头像:
<dimen name="contact_avatar_corner_radius_percent" format="float">0.5</dimen>
用于列表项的头像大小
该配置可用于为这些页上的列表项设置头像大小:
- “通话记录”页
- “联系人”页
- “搜索”页
- 拨号键盘页上的个人资料头像
<dimen name="avatar_icon_size">76dp</dimen>
在用户使用拨号键盘拨号时实时显示搜索结果
<!-- A config determines whether to show type down list on Dialpad -->
<bool name="config_show_type_down_list_on_dialpad">true</bool>
控制条高度
设置“正在通话”控制条、“来电”控制条和“通话”按钮的高度。
<dimen name="control_bar_height">96dp</dimen>
列表项维度
<dimen name="list_item_height">116dp</dimen>
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-09。
[[["易于理解","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"]],["最后更新时间 (UTC):2025-08-09。"],[],[],null,["# Global configurable values\n\nUse the resources provided in this article to customize Dialer. Different views will use\nresources redirected from the global values. For more information, see the AOSP UX design (may\nrequire sign-in).\n\n### Dialpad input motion\n\n```carbon\n\u003c!-- Boolean config to gate the dialpad input motion --\u003e\n\u003cbool name=\"config_enable_dial_motion\"\u003etrue\u003c/bool\u003e\n\u003c!-- Font scale for the last input digit --\u003e\n\u003citem name=\"config_dial_motion_scale_start\" format=\"float\" type=\"integer\"\u003e1.5\u003c/item\u003e\n\u003c!-- Scale down motion duration for the last input digit --\u003e\n\u003cinteger name=\"config_dial_motion_duration\"\u003e200\u003c/integer\u003e\n```\n\n### Gravity of input digits in Dialpad\n\n```component-pascal\n\u003c!-- 8388629 stands for Gravity.END |\nGravity.CENTER_VERTICAL--\u003e\n\u003cinteger name=\"config_dialed_number_gravity\"\u003e8388629\u003c/integer\u003e\n```\n\n### Detailed user profile\n\nConfig to display a detailed user profile when a matching contact for the input number is found.\nWhen false, display contact name *only*. When true, display the contact avatar, contact name,\nand phone number label. \n\n```scdoc\n\u003cbool name=\"config_show_detailed_user_profile_on_dialpad\"\u003efalse\u003c/bool\u003e\n```\n\n### Background image alpha\n\nWhen set to 0, the background image is invisible. \n\n```carbon\n\u003c!-- Alpha when there is a contact avatar --\u003e\n\u003citem name=\"config_background_image_alpha\" format=\"float\"\ntype=\"dimen\"\u003e1.0\u003c/item\u003e\n\u003c!-- Alpha when there are no contact avatars and uses the letter tile drawable color as background. --\u003e\n\u003citem name=\"config_background_image_error_alpha\" format=\"float\" type=\"dimen\"\u003e1.0\u003c/item\u003e\n```\n\n### Action buttons on the Recents and Contacts pages\n\n```scdoc\n\u003c!-- A config determines whether to show divider and callog_action_button for callog items that\nare not stored as contacts. \"true\" will show divider and button as disable state and \"false\" will\nmake divider and button invisible for non contacts. --\u003e\n \u003cbool name=\"config_show_calllog_action_button_for_non_contact\"\u003efalse\u003c/bool\u003e\n\n\u003c!-- A config determines whether to show divider and the button on the right side for contacts\nwithout any contact details. \"true\" will show divider and button as disable state and \"false\" will\nmake divider and button invisible for empty contacts. --\u003e\n \u003cbool name=\"config_show_contact_detail_button_for_empty_contact\"\u003efalse\u003c/bool\u003e\n```\n\n### Gate address and navigation feature on Contact Details page\n\nUse this Boolean config to gate the address and navigation reature on the Contact Details\npage. \n\n```carbon\n\u003c!-- A config determines whether to show postal address in contact details page. --\u003e\n\u003cbool name=\"config_show_postal_address\"\u003efalse\u003c/bool\u003e\n```\n\n### Toolbar on the Contact Details page\n\n```scdoc\n\u003c!-- A config determines whether to show the action bar view in the contact details page.--\u003e\n\u003cbool name=\"config_show_contact_details_action_bar_view\"\u003efalse\u003c/bool\u003e\n\u003c!-- A config determines if to show the action bar avatar in the contact details page.--\u003e\n\u003cbool name=\"config_show_contact_details_action_bar_avatar\"\u003etrue\u003c/bool\u003e\n```\n\n### Toolbar title mode\n\nConfig for toolbar title mode:\n\n- 0 denotes app name.\n- 1 denotes no toolbar title.\n- 2 denotes connected Bluetooth device name.\n\n```gdscript\n\u003c!-- Use app name as toolbar title. Supported value see @attr/toolbarTitleMode --\u003e\n\u003cinteger name=\"config_toolbar_title_mode\"\u003e0\u003c/integer\u003e\n```\n\n### Fullscreen incall UI\n\nConfig gate for the fullscreen incall UI. When set to true, answering an incoming call\ndisplays the fullscreen incall UI regardless of Dialer user. When set to false, answering an\nincoming call dismisses the HUN without displaying the fullscreen incall UI when a user is not in\nDialer. \n\n```scdoc\n\u003cbool name=\"config_show_fullscreen_incall_ui\"\u003etrue\u003c/bool\u003e\n```\n\n### Avatar corner\n\nChanging this value affects all avatar shapes, including the notifications avatar:\n\n- 0.5 denotes round avatar.\n- 1 denotes square avatar.\n\n```scdoc\n\u003cdimen name=\"contact_avatar_corner_radius_percent\" format=\"float\"\u003e0.5\u003c/dimen\u003e\n```\n\n### Avatar size used for list items\n\nUse this config to set the avatar size for list items on these pages:\n\n- Call History page\n- Contacts page\n- Search page\n- Profile avatar on the Dialpad page\n\n```scdoc\n\u003cdimen name=\"avatar_icon_size\"\u003e76dp\u003c/dimen\u003e\n```\n\n### Live search result when user dials with Dialpad\n\n```carbon\n\u003c!-- A config determines whether to show type down list on Dialpad --\u003e\n\u003cbool name=\"config_show_type_down_list_on_dialpad\"\u003etrue\u003c/bool\u003e\n```\n\n### Control bar height\n\nSet the height of the Ongoing Call control bar, Incoming Call control bar height, and Call\nbutton height. \n\n```scdoc\n\u003cdimen name=\"control_bar_height\"\u003e96dp\u003c/dimen\u003e\n```\n\n### List item dimensions\n\n```scdoc\n\u003cdimen name=\"list_item_height\"\u003e116dp\u003c/dimen\u003e\n```"]]