Tombol nomor

  • Aktivitas host: TelecomActivity
  • Fragmen: DialpadFragment

Mode lanskap

Tata Letak

Mengupdate @layout/dialpad_fragment

Layar tombol nomor

Gambar 1. Layar tombol nomor

Component [id:]ClassName Properti Nilai
keypad: KeypadFragment width Ditentukan oleh tinggi, lebar, dan padding tombol utama
tinggi
dialpad_info: FrameLayout height Sama dengan tinggi keypad
width Sama dengan tinggi
divider: View layout_constraintGuide_percent 0.5

Keypad

  • Fragmen. KeypadFragment
  • Tata letak. @layout/keypad
  • Keypad

    Gambar 2. Keypad

    Component [id:]ClassName Properti Nilai
    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 Rantai yang dikemas secara vertikal dan horizontal

Pembatas

Update @layout/keypad_dividers. Jangan gunakan pemisah pada layar pendek yang kurang dari 456 dp.

Component [id:]ClassName Properti Nilai
pemisah height @dimen/dialpad_line_divider_height (for horizontal dividers)
width @dimen/dialpad_line_divider_height (for vertical dividers)
background @color/divider_color

KeypadButton

@KeypadButtonStyle akan diterapkan ke KeypadButton, yang memperluas FrameLayout.

Component [id:]ClassName Properti Nilai
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 pergi

Info tombol nomor

Tata letak. @layout/dialpad_info

Info tombol nomor

Gambar 3. Info tombol nomor

Component [id:]ClassName Properti Nilai

title: TextView

Referensi AOSP menerapkan gerakan input di kolom judul.

Untuk menonaktifkan gerakan, ganti @bool/config_enable_dial_motion ke false.

height @dimen/dialpad_info_title_container_size
textAppearance @style/TextAppearance.DialNumber
(Gaya ini juga diterapkan ke judul secara terprogram di 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 dibatasi oleh @bool/config_show_detailed_user_profile_on_dialpad untuk menampilkan label dan avatar. Nilai defaultnya adalah false, yang hanya menampilkan nama tampilan.

Component [id:]ClassName Properti Nilai
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

Mode potret

Tata letak. @layout[-port]/dialpad_fragment

Mode potret

Gambar 4. Mode potret

Component [id:]ClassName Properti Nilai
keypad: KeypadFragment width Ditentukan oleh tinggi, lebar, dan padding tombol kunci, Lihat Keypad.
tinggi
include
@layout/dialpad_user_profile
T/A Lihat bagian dialpad_user_profile di Info dialpad dalam mode lanskap.
divider: View layout_constraintGuide_percent 0,5
title: TextView Sama seperti judul di info Dialpad dalam mode lanskap.
delete_button: ImageView Sama seperti delete_button di info Dialpad dalam mode lanskap.
call_button: ImageView style @style/DialpadPrimaryButton
height @dimen/call_button_height
src @drawable/icon_call_button
layout_marginBottom @dimen/call_button_bottom_margin