Trạng thái cuộc gọi

  • Hoạt động của máy chủ: InCallActivity
  • Bố cục gốc: @layout/in_call_activity

Màn hình cuộc gọi đến

Miếng. IncomingCallFragment

Màn hình bàn phím quay số InCall ở chế độ ngang

Bố cục: @layout/onending_call_fragment

Màn hình cuộc gọi đến

Hình 1. Màn hình cuộc gọi đến

Thành phần [id:]ClassName Tài sản Giá trị
background_image:
BackgroundImageView
@config/config_background_image_alpha 1.0
Được sử dụng theo chương trình cho hình đại diện liên hệ.
@config/config_background_image_error_alpha 1.0
Được sử dụng theo chương trình cho các ô thư liên hệ. Đặt thành 0,0 sẽ ẩn màu nền.
user_profile_container:
@layout/user_profile_large
không áp dụng không áp dụng
ringing_call_controller_bar:
RingingCallControllerBarFragment
height @dimen/in_call_controller_bar_height
layout_margintStart
layout_marginEnd
layout_marginBottom
@dimen/in_call_controller_bar_margin
  • Thông tin người dùng. @layout/user_profile_large
    Component [id:]ClassName Tài sản Giá trị
    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 Tài sản Giá trị
    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

Cuộc gọi đến ở chế độ dọc

Trang cuộc gọi đến ở chế độ dọc có cùng @layout/ongoing_call_fragment với chế độ ngang ngoại trừ @layout [-port] /user_profile_large được bố trí khác.

Trang cuộc gọi đến ở chế độ dọc

Hình 2. Cuộc gọi đến ở chế độ dọc

  • Thông tin người dùng. @layout/user_profile_large
    Component [id:]ClassName Tài sản Giá trị
    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

Trang cuộc gọi đang diễn ra

Miếng. OngoingCallFragment

Chế độ phong cảnh

Màn hình cuộc gọi đang diễn ra ở chế độ ngang

Hình 3. Màn hình cuộc gọi đang diễn ra ở chế độ ngang

Component [id:]ClassName Tài sản Giá trị
background_image: BackgroundImageView @config/config_background_image_alpha 1.0
Được sử dụng theo chương trình cho hình đại diện liên hệ.
@config/config_background_image_error_alpha 1.0
Được sử dụng theo chương trình cho các ô thư liên hệ. Khi được đặt thành 0,0, màu nền sẽ bị ẩn.
Vùng chứa các chế độ xem khác: ConstraintLayout background @android:color/transparent
Cần thiết để làm cho gợn hoạt động cho các nút trên thanh điều khiển.
incall_dialpad_fragment: InCallDialpadFragment không áp dụng Xem bàn phím quay số InCall
user_profile_container: @layout/user_profile_large không áp dụng Tương tự như @layout/user_profile_large trên trang Cuộc gọi đến .
  • Chế độ phong cảnh
  • Chế độ chân dung
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
    Thành phần [id:]ClassName Tài sản Giá trị
    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 Tài sản Giá trị
    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

Trang cuộc gọi đang diễn ra ở chế độ dọc

Hình 4. Trang cuộc gọi đang diễn ra ở chế độ dọc

Chế độ dọc có cùng bố cục ngoại trừ @layout/user_profile_large được bố trí khác. Xem thêm Chế độ chân dung trên trang Cuộc gọi đến .

Bàn phím quay số InCall

Miếng. InCallDialpadFragment

Chế độ phong cảnh

Cách trình bày. @layout/incall_dialpad_fragment

Màn hình bàn phím quay số InCall ở chế độ ngang

Hình 5. Màn hình bàn phím quay số InCall ở chế độ ngang

Thành phần [id:]ClassName Tài sản Giá trị
divider: Guideline layout_constraintGuide_percent 0,5
dialpad_fragment: KeypadFragment không áp dụng Xem bàn phím
dialpad_info_boundaries: View height Tương tự như dialpad_fragment
layout_constraintDimensionRatio W, 1:1
call_state: Chronometer layout_width match_parent để tránh vẽ lại toàn bộ chế độ xem khi cập nhật văn bản
textAppearance @style/TextAppearance.InCallState
marginBottom @dimen/call_state_padding
title: TextView textAppearance @style/TextAppearance.DialNumber

Bàn phím quay số InCall ở chế độ dọc

Cách trình bày. @layout[-port]/incall_dialpad_fragment

Màn hình bàn phím quay số InCall ở chế độ dọc

Hình 6. Màn hình bàn phím quay số InCall ở chế độ dọc

Thành phần [id:]ClassName Tài sản Giá trị
dialpad_fragment: KeypadFragment layout_marginTop @dimen/keypad_margin
call_state: Chronometer layout_width match_parent để tránh vẽ lại toàn bộ chế độ xem khi cập nhật văn bản.
gravity center
textAppearance @style/TextAppearance.InCallState
marginStart
marginEnd
@dimen/dialpad_info_edge_padding_size
title: TextView gravity Kết thúc cùng với chiều rộng được đặt thành wrap_content để căn giữa số đã gọi và mờ dần khi bắt đầu.
textAppearance @style/TextAppearance.DialNumber
marginStart
marginEnd
@dimen/dialpad_info_edge_padding_size

KeypadFragment . Xem bàn phím