แป้นหมายเลข

  • กิจกรรมของโฮสต์: TelecomActivity
  • เศษ: DialpadFragment

โหมดแนวนอน

เลย์เอาต์

อัปเดต @layout/dialpad_fragment

หน้าจอแป้นหมายเลข

รูปที่ 1 หน้าจอแป้นหมายเลข

คอมโพเนนต์ [id:]ClassName พร็อพเพอร์ตี้ ค่า
keypad: KeypadFragment width กำหนดโดยความสูง ความกว้าง และระยะห่างจากขอบของปุ่มสำคัญ
ส่วนสูง
dialpad_info: FrameLayout height เท่ากับความสูงของปุ่มกด
width เหมือนกับความสูง
divider: View layout_constraintGuide_percent 0.5

ปุ่มกด

  • เศษ KeypadFragment
  • เลย์เอาต์ @layout/keypad
  • ปุ่มกด

    รูปที่ 2 ปุ่มกด

    คอมโพเนนต์ [id:]ClassName พร็อพเพอร์ตี้ ค่า
    KeypadButtons 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:]ClassName พร็อพเพอร์ตี้ ค่า
ตัวแบ่ง height @dimen/dialpad_line_divider_height (for horizontal dividers)
width @dimen/dialpad_line_divider_height (for vertical dividers)
background @color/divider_color

KeypadButton

@KeypadButtonStyle จะมีผลกับ KeypadButton ซึ่งขยายจาก FrameLayout

คอมโพเนนต์ [id:]ClassName พร็อพเพอร์ตี้ ค่า
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:]ClassName พร็อพเพอร์ตี้ ค่า

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:]ClassName พร็อพเพอร์ตี้ ค่า
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:]ClassName พร็อพเพอร์ตี้ ค่า
keypad: KeypadFragment width กำหนดโดยความสูง ความกว้าง และระยะห่างจากขอบของปุ่ม ดูปุ่มกด
ส่วนสูง
include
@layout/dialpad_user_profile
ไม่มี ดูส่วน dialpad_user_profile ในข้อมูล Dialpad ในโหมดแนวนอน
divider: View layout_constraintGuide_percent 0.5
title: TextView เหมือนกับชื่อในข้อมูล Dialpad ในโหมดแนวนอน
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