สถานะการโทร

  • กิจกรรมโฮสต์: InCallActivity
  • เค้าโครงราก: @layout/in_call_activity

หน้าจอสายเรียกเข้า

แฟรกเมนต์ IncomingCallFragment

หน้าจอแป้นกด InCall ในโหมดแนวนอน

เค้าโครง: @layout/ongoing_call_fragment

หน้าจอสายเรียกเข้า

รูปที่ 1. หน้าจอสายเรียกเข้า

ส่วนประกอบ [id:]ClassName คุณสมบัติ ค่า
background_image:
BackgroundImageView
@config/config_background_image_alpha 1.0
ใช้ทางโปรแกรมสำหรับอวาตาร์ผู้ติดต่อ
@config/config_background_image_error_alpha 1.0
ใช้ทางโปรแกรมสำหรับไทล์จดหมายติดต่อ ตั้งค่าเป็น 0.0 จะซ่อนสีพื้นหลัง
user_profile_container:
@layout/user_profile_large
ไม่มี ไม่มี
ringing_call_controller_bar:
RingingCallControllerBarFragment
height @dimen/in_call_controller_bar_height
layout_margintStart
layout_marginEnd
layout_marginBottom
@dimen/in_call_controller_bar_margin
  • ประวัติผู้ใช้. @layout/user_profile_large
    Component [id:]ClassName คุณสมบัติ ค่า
    root: LinearLayout orientation horizontal
    paddingStart
    paddingEnd
    @dimen/in_call_user_profile_margin
    user_profile_avatar: ImageView width in_call_avatar_icon_size
    height in_call_avatar_icon_size
    scaleType fitCenter
    User info: LinearLayout paddingStart @dimen/in_call_margin_between_avatar_and_text
    user_profile_title:TextView textAppearance @style/TextAppearance.InCallUserTitle
    user_profile_phone_number: TextView textAppearance @style/TextAppearance.InCallUserPhoneNumber
    marginTop @dimen/in_call_phone_number_margin_top
    user_profile_call_state: Chronometer textAppearance @style/TextAppearance.InCallState
    marginTop @dimen/in_call_state_margin_top
  • RingingCallControllerBarFragment. @layout/ringing_call_controller_bar_fragment
    Component [id:]ClassName คุณสมบัติ ค่า
    root: ConstraintLayout height @dimen/in_call_controller_bar_height
    background @android:color/transparent
    answer_call_button: ImageView width
    height
    @dimen/ringing_call_button_touch_target_size
    background @drawable/dialer_ripple_background
    src @drawable/ic_phone
    tint @color/phone_call
    scaleType center
    answer_call_text: TextView marginStart @dimen/ringing_call_text_margin
    text @string/answer_call
    textAppearance ?android:attr/textAppearanceLarge
    end_call_button: ImageView width
    height
    @dimen/ringing_call_button_touch_target_size
    background @drawable/dialer_ripple_background
    src @drawable/ic_call_end
    tint @color/phone_end_call
    scaleType center
    end_call_text: TextView marginStart @dimen/ringing_call_text_margin
    text @string/decline_call
    textAppearance ?android:attr/textAppearanceLarge
    mid_line: Guideline constraintGuide_percent 0.5

สายเรียกเข้าในโหมดแนวตั้ง

หน้าสายเรียกเข้าในโหมดแนวตั้งแชร์ @layout/ongoing_call_fragment เดียวกันกับโหมดแนวนอน ยกเว้น @layout [-port] /user_profile_large ซึ่งมีการจัดวางต่างกัน

หน้าสายเรียกเข้าในโหมดแนวตั้ง

รูปที่ 2. สายเรียกเข้าในโหมดแนวตั้ง

  • ประวัติผู้ใช้. @layout/user_profile_large
    Component [id:]ClassName คุณสมบัติ ค่า
    root: LinearLayout orientation vertical
    gravity center
    user_profile_avatar: ImageView width in_call_avatar_icon_size
    height in_call_avatar_icon_size
    scaleType fitCenter
    user_profile_title: TextView textAppearance @style/TextAppearance.InCallUserTitle
    paddingTop @dimen/in_call_margin_between_avatar_and_text
    user_profile_phone_number: TextView textAppearance @style/TextAppearance.InCallUserPhoneNumber
    paddingTop @dimen/in_call_phone_number_margin_top
    user_profile_call_state: Chronometer textAppearance @style/TextAppearance.InCallState
    paddingTop @dimen/in_call_state_margin_top

หน้าการโทรอย่างต่อเนื่อง

แฟรกเมนต์ OngoingCallFragment

โหมดแนวนอน

หน้าจอการโทรที่กำลังสนทนาอยู่ในโหมดแนวนอน

รูปที่ 3 หน้าจอการโทรที่กำลังสนทนาอยู่ในโหมดแนวนอน

Component [id:]ClassName คุณสมบัติ ค่า
background_image: BackgroundImageView @config/config_background_image_alpha 1.0
ใช้ทางโปรแกรมสำหรับอวาตาร์ผู้ติดต่อ
@config/config_background_image_error_alpha 1.0
ใช้ทางโปรแกรมสำหรับไทล์จดหมายติดต่อ เมื่อตั้งค่าเป็น 0.0 สีพื้นหลังจะถูกซ่อนไว้
คอนเทนเนอร์ของมุมมองอื่น: ConstraintLayout background @android:color/transparent
จำเป็นต้องทำให้ระลอกคลื่นทำงานสำหรับปุ่มแถบควบคุม
incall_dialpad_fragment: InCallDialpadFragment ไม่มี ดู แป้นหมายเลข InCall
user_profile_container: @layout/user_profile_large ไม่มี เช่นเดียวกับ @layout/user_profile_large ใน หน้าสายเรียกเข้า
  • โหมดแนวนอน
  • โหมดแนวตั้ง
onhold_user_profile: OnHoldCallUserProfileFragment height @dimen/onhold_user_info_height
layout_marginTop @dimen/onhold_profile_margin_y
layout_marginStart
layout_marginEnd
@dimen/onhold_profile_margin_x
ongoing_call_control_bar: OnGoingCallControllerBarFragment layout_marginBottom @dimen/in_call_controller_bar_margin
layout_marginHorizontal @dimen/in_call_controller_bar_margin
  • OnHoldCallUserProfileFragment @layout/onhold_user_profile
    ส่วนประกอบ [id:]ClassName คุณสมบัติ ค่า
    root: CardView android:elevation @dimen/dialer_card_elevation
    cardBackgroundColor @color/onhold_call_background
    cardCornerRadius @dimen/onhold_profile_corner_radius
    swap_calls_view: ConstraintLayout background ?android:attr/selectableItemBackground
    guideline: Guideline layout_constraintGuide_begin @dimen/onhold_profile_guideline
    icon: ImageView width
    height
    @dimen/avatar_icon_size
    scaleType centerCrop
    layout_marginStart @dimen/onhold_profile_avatar_margin
    title: TextView textAppearance ?android:attr/textAppearanceLarge
    text: TextView text @string/onhold_call_label
    textAppearance ?android:attr/textAppearanceSmall
    swap_call_button: ImageView src @drawable/ic_swap_calls
    tint @color/secondary_icon_color
    scaleType center
    paddingLeft
    paddingRight
    @dimen/swap_call_button_margin
  • OnGoingCallControllerBarFragment. @layout/on_going_call_controller_bar_fragment
    Component [id:]ClassName คุณสมบัติ ค่า
    root: ConstraintLayout height @dimen/in_call_controller_bar_height
    mute_button: ImageView width
    height
    @dimen/in_call_button_size
    scaleType center
    src @drawable/ic_mute_activatable
    background @drawable/dialer_ripple_background
    toggle_dialpad_button: ImageView width
    height
    @dimen/in_call_button_size
    scaleType center
    src @drawable/ic_dialpad_activatable
    background @drawable/dialer_ripple_background
    end_call_button: ImageView style @style/DialpadPrimaryButton
    src @drawable/ic_call_end_button
    voice_channel_view: LinearLayout orientation vertical
    voice_channel_button: ImageView width
    height
    @dimen/in_call_button_size
    scaleType center
    src @drawable/ic_audio_route_vehicle_activatable
    background @drawable/dialer_ripple_background
    voice_channel_text: TextView visibility gone
    pause_button: ImageView width
    height
    @dimen/in_call_button_size
    scaleType center
    src @drawable/ic_pause_activatable
    background @drawable/dialer_ripple_background

หน้าการโทรที่กำลังดำเนินอยู่ในโหมดแนวตั้ง

รูปที่ 4 หน้าการโทรที่กำลังดำเนินอยู่ในโหมดแนวตั้ง

โหมดแนวตั้งใช้เลย์เอาต์เดียวกัน ยกเว้น @layout/user_profile_large ที่วางต่างกัน ดูเพิ่มเติมที่ โหมดแนวตั้ง ใน หน้าสายเรียกเข้า

แป้นกด InCall

แฟรกเมนต์ InCallDialpadFragment

โหมดแนวนอน

เค้าโครง @layout/incall_dialpad_fragment

หน้าจอแป้นกด InCall ในโหมดแนวนอน

รูปที่ 5. หน้าจอแป้นหมายเลข InCall ในโหมดแนวนอน

ส่วนประกอบ [id:]ClassName คุณสมบัติ ค่า
divider: Guideline layout_constraintGuide_percent 0.5
dialpad_fragment: KeypadFragment ไม่มี ดู ปุ่มกด
dialpad_info_boundaries: View height เช่นเดียวกับ dialpad_fragment
layout_constraintDimensionRatio W, 1:1
call_state: Chronometer layout_width match_parent เพื่อหลีกเลี่ยงการวาดมุมมองทั้งหมดใหม่ในการอัปเดตข้อความ
textAppearance @style/TextAppearance.InCallState
marginBottom @dimen/call_state_padding
title: TextView textAppearance @style/TextAppearance.DialNumber

แป้นกด InCall ในโหมดแนวตั้ง

เค้าโครง @layout[-port]/incall_dialpad_fragment

หน้าจอแป้นกด InCall ในโหมดแนวตั้ง

รูปที่ 6 หน้าจอแป้นหมายเลข InCall ในโหมดแนวตั้ง

ส่วนประกอบ [id:]ClassName คุณสมบัติ ค่า
dialpad_fragment: KeypadFragment layout_marginTop @dimen/keypad_margin
call_state: Chronometer layout_width match_parent เพื่อหลีกเลี่ยงการวาดมุมมองทั้งหมดใหม่ในการอัปเดตข้อความ
gravity center
textAppearance @style/TextAppearance.InCallState
marginStart
marginEnd
@dimen/dialpad_info_edge_padding_size
title: TextView gravity จบพร้อมกันโดยตั้งค่าความกว้างเป็น wrap_content เพื่อให้หมายเลขที่โทรออกอยู่ตรงกลางและจางลงเมื่อเริ่มต้น
textAppearance @style/TextAppearance.DialNumber
marginStart
marginEnd
@dimen/dialpad_info_edge_padding_size

KeypadFragment ดู ปุ่มกด