CallCoreView

class CallCoreView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0) : ConstraintLayout

Core call view component responsible for video rendering and interactive display of the call interface. Supports multi-layout switching (single-person float/multi-person grid/picture-in-picture), call waiting animations, and personalized configuration of volume, network status, and user avatars.

Overview

CallCoreView Core view component for displaying call screens. CallCoreView is the main container for the call interface, providing the following core capabilities:

  • Multi-Layout Switching: Supports switching between single-person float, multi-person grid, and picture-in-picture layouts.

  • Call Waiting Interaction: Supports custom waiting animations before call connection.

  • Status Visualization: Supports custom icons for different volume levels and network quality states.

  • User Personalization: Supports setting participant avatars through User ID mapping.

Key Features

  • Multi-Layout Switching:Supports switching between single-person float, multi-person grid, and picture-in-picture layouts

  • Call Waiting Interaction:Supports custom waiting animations before call connection

  • Status Visualization:Supports custom icons for different volume levels and network quality states

  • User Personalization:Supports setting participant avatars through User ID mapping

Tip: This view component must be used together with CallStore to properly display call screens and receive call state updates.

Method Overview

FeatureMethodDescription
Multi-Layout SwitchingsetLayoutTemplateSwitch call interface layout (single-person float/multi-person grid/PiP)
Waiting AnimationsetWaitingAnimationSet the loading animation during call waiting state
Volume IconssetVolumeLevelIconsCustomize icons for each volume level
Network IconssetNetworkQualityIconsCustomize icons for each network quality level
User AvatarssetParticipantAvatarsSet participant avatar images

Usage Example

import io.trtc.tuikit.atomicxcore.api.view.*

// Create call view
val callCoreView = CallCoreView(context)
addView(callCoreView)

// Set layout mode
callCoreView.setLayoutTemplate(CallLayoutTemplate.GRID)

// Set waiting animation
callCoreView.setWaitingAnimation("waiting_animation.json")

// Set volume icons
callCoreView.setVolumeLevelIcons(mapOf(
VolumeLevel.MUTE to "volume_mute",
VolumeLevel.LOW to "volume_low",
VolumeLevel.MEDIUM to "volume_medium",
VolumeLevel.HIGH to "volume_high",
VolumeLevel.PEAK to "volume_peak"
))

// Set network quality icons
callCoreView.setNetworkQualityIcons(mapOf(
NetworkQuality.UNKNOWN to "network_unknown",
NetworkQuality.EXCELLENT to "network_excellent",
NetworkQuality.GOOD to "network_good",
NetworkQuality.POOR to "network_poor",
NetworkQuality.BAD to "network_bad",
NetworkQuality.VERY_BAD to "network_very_bad",
NetworkQuality.DOWN to "network_down"
))

// Set participant avatars
callCoreView.setParticipantAvatars(mapOf(
"user_123" to "avatar_user_123",
"user_456" to "avatar_user_456"
))

Topics

Static Properties

  • defaultAvatarImage - Default placeholder avatar

  • waitingAnimationImage - Call waiting animation

  • volumeImages - Volume status icon collection

  • networkQualityImages - Network signal icon collection

  • participantAvatars - Participant avatar collection

Configuration Methods

See Also

Constructors

Link copied to clipboard
constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0)

Functions

Link copied to clipboard

Switch the layout mode of the call interface.

Link copied to clipboard

Customize network quality icons.

Link copied to clipboard

Set participant avatars.

Link copied to clipboard

Customize volume level icons.

Link copied to clipboard

Configure call waiting animation.