撥號盤

  • 主機活動: TelecomActivity
  • 片段: DialpadFragment

橫向模式

佈局

更新@layout/dialpad_fragment

撥號盤屏幕

圖 1.撥號盤屏幕

組件 [id:] 類名財產價值
keypad: KeypadFragment width由按鍵的高度、寬度和內邊距決定
高度
dialpad_info: FrameLayout height與鍵盤高度相同
width和身高一樣
divider: View layout_constraintGuide_percent 0.5

鍵盤

  • 分段。 KeypadFragment
  • 佈局。 @layout/keypad
  • 鍵盤

    圖 2.鍵盤

    組件 [id:] 類名財產價值
    小鍵盤按鈕app:numberText 1,2,3,4,5,6,7,8,9,*,0,#
    app:letterText "",ABC,DEF,GHI,JKL,MNO,PQRS,TUV,WXYZ,"",+,""
    style @style/KeypadButtonStyle
    Layout垂直和水平包裝鏈

分隔線

更新@layout/keypad_dividers 。不要在小於 456dp 的短屏幕上使用分隔線。

組件 [id:] 類名財產價值
分隔線height @dimen/dialpad_line_divider_height (for horizontal dividers)
width @dimen/dialpad_line_divider_height (for vertical dividers)
background @color/divider_color

鍵盤按鈕

@KeypadButtonStyle將應用於擴展 FrameLayout 的KeypadButton

組件 [id:] 類名財產價值
LinearLayout width @dimen/keypad_minimum_size
height @dimen/keypad_minimum_size
keypad_number: TextView style @style/KeypadNumber
keypad_letters: TextView style @style/KeypadLetter
textAllCaps true
keypad_image: ImageView tint @color/car_key2
visibility走了

撥號盤信息

佈局。 @layout/dialpad_info

撥號盤信息

圖 3.撥號盤信息

組件 [id:] 類名財產價值

title: TextView

AOSP 參考在標題字段上實現了輸入動作。

要禁用該動作, @bool/config_enable_dial_motion覆蓋為false

height @dimen/dialpad_info_title_container_size
textAppearance @style/TextAppearance.DialNumber
(此樣式也以編程方式應用於DialpadFragment中的標題。)
autoSizeTextType uniform
autoSizeMinTextSize @dimen/dialpad_info_title_text_size_min
autoSizeMaxTextSize @dimen/dialpad_info_title_text_size_max
delete_button: ImageView style @style/DialpadSecondaryButton
src @drawable/ic_backspace
marginStart /td> dimen/dialpad_info_title_padding_size
call_button: ImageView style @style/DialpadPrimaryButton
src @drawable/icon_call_button
include @layout/dialpad_user_profile layout_marginTop @dimen/dialpad_user_profile_padding
  • @layout/dialpad_user_profile

    • @bool/config_show_detailed_user_profile_on_dialpad門控以顯示標籤和頭像。默認值為false ,僅顯示顯示名稱。
    • 組件 [id:] 類名財產價值
      display_name: TextView textAppearance @style/TextAppearance.DialpadDisplayName
      label: TextView textAppearance ?android:attr/textAppreanceSmall
      layout_marginTop @dimen/dialpad_contact_label_margin
      dialpad_contact_avatar: ImageView width @dimen/dialpad_contact_avatar_size
      height @dimen/dialpad_contact_avatar_size

人像模式

佈局。 @layout[ -port ]/dialpad_fragment

人像模式

圖 4.縱向模式

組件 [id:] 類名財產價值
keypad: KeypadFragment width由按鍵按鈕的高度、寬度和填充決定,請參閱鍵盤
高度
include
@layout/dialpad_user_profile
不適用請參閱橫向模式下撥號盤信息中的 dialpad_user_profile 部分。
divider: View layout_constraintGuide_percent 0.5
title: TextView與橫向模式下撥號盤信息中的標題相同。
delete_button: ImageView與橫向模式下撥號盤信息中的 delete_button相同
call_button: ImageView style @style/DialpadPrimaryButton
height @dimen/call_button_height
src @drawable/icon_call_button
layout_marginBottom @dimen/call_button_bottom_margin