全局可配置值

您可以使用本文中提供的资源自定义拨号器。不同视图所使用的资源是重定向自全局值。如需了解详情,请参阅 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>

头像角

更改该值会影响所有头像的形状,包括通知头像:

  • 0.5 表示圆形头像。
  • 1 表示方形头像。
<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>