Skip to main content
{
  "component": "CometChatCallLogs",
  "package": "com.cometchat.chatuikit.calls.calllogs",
  "xmlElement": "<com.cometchat.chatuikit.calls.calllogs.CometChatCallLogs />",
  "description": "Scrollable list of call logs for the logged-in user with caller names, avatars, call status, and timestamps.",
  "primaryOutput": {
    "method": "setOnItemClick",
    "type": "OnItemClick<CallLog>"
  },
  "methods": {
    "data": {
      "setCallLogRequestBuilder": {
        "type": "CallLogRequest.CallLogRequestBuilder",
        "default": "SDK default",
        "note": "Pass the builder, not the result of .build()"
      }
    },
    "callbacks": {
      "setOnItemClick": "OnItemClick<CallLog>",
      "setOnItemLongClick": "OnItemLongClick<CallLog>",
      "setOnBackPressListener": "OnBackPress",
      "setOnCallIconClickListener": "OnCallIconClick",
      "setOnError": "OnCallError",
      "setOnLoad": "OnLoad<CallLog>",
      "setOnEmpty": "OnEmpty"
    },
    "visibility": {
      "setToolbarVisibility": { "type": "int (View.VISIBLE | View.GONE)", "default": "View.VISIBLE" },
      "setBackIconVisibility": { "type": "int", "default": "View.GONE" },
      "setLoadingStateVisibility": { "type": "int", "default": "View.VISIBLE" },
      "setErrorStateVisibility": { "type": "int", "default": "View.VISIBLE" },
      "setEmptyStateVisibility": { "type": "int", "default": "View.VISIBLE" },
      "setSeparatorVisibility": { "type": "int", "default": "View.VISIBLE" },
      "setTitleVisibility": { "type": "int", "default": "View.VISIBLE" }
    },
    "viewSlots": {
      "setItemView": "CallLogsViewHolderListener — entire list item row",
      "setLeadingView": "CallLogsViewHolderListener — avatar / left section",
      "setTitleView": "CallLogsViewHolderListener — name / title text",
      "setSubtitleView": "CallLogsViewHolderListener — subtitle text below name",
      "setTrailingView": "CallLogsViewHolderListener — right section",
      "setLoadingView": "@LayoutRes int — loading spinner",
      "setEmptyView": "@LayoutRes int — empty state",
      "setErrorView": "@LayoutRes int — error state",
      "setOptions": "Function2<Context, CallLog, List<MenuItem>> — long-press context menu (replaces defaults)",
      "setAddOptions": "Function2<Context, CallLog, List<MenuItem>> — long-press context menu (appends to defaults)"
    },
    "advanced": {
      "refreshCallLogs": "void — re-fetches call logs from the server",
      "setDateFormat": "SimpleDateFormat — legacy date format setter",
      "setDateTimeFormatter": "DateTimeFormatterCallback — custom date/time formatting",
      "getBinding": "CometchatCallLogsBinding — root ViewBinding",
      "getViewModel": "CallLogsViewModel — internal ViewModel access",
      "getAdapter": "CallLogsAdapter — internal adapter access",
      "setAdapter": "CallLogsAdapter — replace the default adapter"
    },
    "style": {
      "setStyle": {
        "type": "@StyleRes int",
        "parent": "CometChatCallLogsStyle"
      }
    }
  },
  "events": [],
  "sdkListeners": []
}

Where It Fits

CometChatCallLogs is a list component. It renders all call logs for the logged-in user and emits the selected CallLog via setOnItemClick. Wire it to a call detail screen or use setOnCallIconClickListener to initiate a callback.
CallDetailActivity.kt
class CallDetailActivity : AppCompatActivity() {

    private lateinit var callLogs: CometChatCallLogs

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_call_detail)

        callLogs = findViewById(R.id.call_log)

        callLogs.setOnItemClick { view, position, callLog ->
            // Navigate to call detail screen with the selected callLog
        }

        callLogs.setOnCallIconClickListener { view, holder, position, callLog ->
            // Initiate a call using the callLog data
        }
    }
}

Quick Start

Add the component to your layout XML:
layout_activity.xml
<com.cometchat.chatuikit.calls.calllogs.CometChatCallLogs
    android:id="@+id/call_log"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />
Prerequisites: CometChat SDK initialized with CometChatUIKit.init(), a user logged in, and the cometchat-chat-uikit-android dependency added. To add programmatically in an Activity:
YourActivity.kt
override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    setContentView(CometChatCallLogs(this))
}
Or in a Fragment:
YourFragment.kt
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
    return CometChatCallLogs(requireContext())
}

Filtering Call Logs

Pass a CallLogRequest.CallLogRequestBuilder to setCallLogRequestBuilder. Pass the builder instance — not the result of .build().
val builder = CallLogRequest.CallLogRequestBuilder()
    .setLimit(20)
    .setHasRecording(true)
cometchatCallLogs.setCallLogRequestBuilder(builder)

Filter Recipes

RecipeCode
Limit to 20 per pagebuilder.setLimit(20)
Audio calls onlybuilder.setCallType(CometChatCallsConstants.CALL_TYPE_AUDIO)
Video calls onlybuilder.setCallType(CometChatCallsConstants.CALL_TYPE_VIDEO)
Missed calls onlybuilder.setCallStatus(CometChatCallsConstants.CALL_STATUS_MISSED)
Calls with recordingsbuilder.setHasRecording(true)
Incoming calls onlybuilder.setCallDirection("incoming")
Outgoing calls onlybuilder.setCallDirection("outgoing")
Filter by user UIDbuilder.setUid("uid1")
Filter by group GUIDbuilder.setGuid("guid1")
Filter by call categorybuilder.setCallCategory("call")
The component uses infinite scroll — the next page loads as the user scrolls to the bottom.

Actions and Events

Callback Methods

setOnItemClick

Fires when a call log row is tapped. Primary navigation hook — use to open a call detail screen.
YourActivity.kt
cometchatCallLogs.onItemClick = OnItemClick { view, position, callLog ->
            
}
What this does: Replaces the default item-click behavior. When a user taps a call log entry, your custom lambda executes instead of the built-in navigation.

setOnItemLongClick

Fires when a call log row is long-pressed. Use for additional actions like delete or call back.
YourActivity.kt
cometchatCallLogs.onItemLongClick = OnItemLongClick({ view, position, callLog ->
            
})

setOnBackPressListener

Fires when the user presses the back button in the app bar. Default: navigates to the previous activity.
YourActivity.kt
cometchatCallLogs.onBackPressListener = OnBackPress {

}

setOnCallIconClickListener

Fires when the user taps the audio or video call icon on a call log item. Use to initiate a call or navigate to a call screen. Interface: void onCallIconClick(View view, CallLogsAdapter.CallLogsViewHolder holder, int position, CallLog callLog)
YourActivity.kt
cometchatCallLogs.setOnCallIconClickListener { view, holder, position, callLog ->
    // Handle call icon click
}

setOnError

Fires on internal errors (network failure, auth issue, SDK exception).
YourActivity.kt
cometchatCallLogs.setOnError {

}

setOnLoad

Fires when the list is successfully fetched and loaded.
YourActivity.kt
cometchatCallLogs.setOnLoad(object : OnLoad<CallLog?> {
    override fun onLoad(list: MutableList<CallLog?>?) {

    }
})

setOnEmpty

Fires when the list is empty, enabling custom handling such as showing a placeholder.
YourActivity.kt
cometchatCallLogs.setOnEmpty {
            
}
  • Verify: After setting an action callback, trigger the corresponding user interaction (tap, long-press, back, call icon) and confirm your custom logic executes instead of the default behavior.

Global UI Events

The CometChatCallLogs component does not have any exposed global UI events.

SDK Events (Real-Time, Automatic)

The CometChatCallLogs component does not listen to any SDK events internally. Call logs are fetched on load and can be refreshed manually with refreshCallLogs().

Functionality

Small functional customizations such as toggling visibility of UI elements.
MethodsDescriptionCode
setToolbarVisibilityToggles visibility for the toolbar in the app bar.setToolbarVisibility(View.GONE);
setBackIconVisibilityToggles visibility for the back button in the app bar.setBackIconVisibility(View.VISIBLE);
setLoadingStateVisibilityHides the loading state while fetching call logs.setLoadingStateVisibility(View.GONE);
setErrorStateVisibilityHides the error state on fetching call logs.setErrorStateVisibility(View.GONE);
setEmptyStateVisibilityHides the empty state on fetching call logs.setEmptyStateVisibility(View.GONE);
setSeparatorVisibilityControls visibility of separators in the list view.setSeparatorVisibility(View.GONE);
setTitleVisibilityControls visibility of the title in the toolbar.setTitleVisibility(View.GONE);
  • Verify: After calling a visibility method, confirm the corresponding UI element is shown or hidden.

Custom View Slots

Each slot replaces a section of the default UI. Slots that accept a CallLog parameter receive the call log object for that row via the CallLogsViewHolderListener pattern (createView + bindView).
SlotMethodReplaces
Leading viewsetLeadingView(CallLogsViewHolderListener)Avatar / left section
Title viewsetTitleView(CallLogsViewHolderListener)Name / title text
Subtitle viewsetSubtitleView(CallLogsViewHolderListener)Subtitle text below name
Trailing viewsetTrailingView(CallLogsViewHolderListener)Right section
Item viewsetItemView(CallLogsViewHolderListener)Entire list item row
Loading viewsetLoadingView(@LayoutRes int)Loading spinner
Empty viewsetEmptyView(@LayoutRes int)Empty state
Error viewsetErrorView(@LayoutRes int)Error state
Options (replace)setOptions(Function2)Long-press context menu (replaces defaults)
Options (append)setAddOptions(Function2)Long-press context menu (appends to defaults)

setLeadingView

Replace the avatar / left section.
cometchatCallLogs.setLeadingView(object : CallLogsViewHolderListener() {
    override fun createView(context: Context?, listItem: CometchatCallLogsItemsBinding?): View {
        return CometChatAvatar(context)
    }

    override fun bindView(
        context: Context,
        createdView: View,
        callLog: CallLog,
        holder: RecyclerView.ViewHolder,
        callList: List<CallLog>,
        position: Int
    ) {
    }
})
What this does: Registers a CallLogsViewHolderListener that provides a custom view for the leading (left) area of each call log item. createView inflates your layout, and bindView populates it with call log data.
Example with call direction icons:
YourActivity.kt
cometchatCallLogs.setLeadingView(object : CallLogsViewHolderListener() {
    override fun createView(context: Context?, listItem: CometchatCallLogsItemsBinding?): View {
        return CometChatAvatar(context)
    }

    override fun bindView(
        context: Context,
        createdView: View,
        callLog: CallLog,
        holder: RecyclerView.ViewHolder,
        callList: List<CallLog>,
        position: Int
    ) {
        val avatar = createdView as CometChatAvatar

        if (callLog.initiator is CallUser) {
            val initiator = callLog.initiator as CallUser
            val isLoggedInUser = CallUtils.isLoggedInUser(initiator)
            val isMissedOrUnanswered = callLog.status == CometChatCallsConstants.CALL_STATUS_UNANSWERED || (callLog
                .status
                == CometChatCallsConstants.CALL_STATUS_MISSED)

            if (callLog.type == CometChatCallsConstants.CALL_TYPE_AUDIO || (callLog
                    .type
                    == CometChatCallsConstants.CALL_TYPE_VIDEO) || callLog.type == CometChatCallsConstants.CALL_TYPE_AUDIO_VIDEO
            ) {
                if (isLoggedInUser) {
                    avatar.setAvatar(ResourcesCompat.getDrawable(context.resources, R.drawable.outgoing_voice_call, null)!!)
                } else if (isMissedOrUnanswered) {
                    avatar.setAvatar(ResourcesCompat.getDrawable(context.resources, R.drawable.miss_call, null)!!)
                } else {
                    avatar.setAvatar(ResourcesCompat.getDrawable(context.resources, R.drawable.incoming_voice_call, null)!!)
                }
            }
        }
        val layoutParams = LinearLayout.LayoutParams(
            Utils.convertDpToPx(context, 50),
            Utils.convertDpToPx(context, 50)
        )
        avatar.layoutParams = layoutParams
    }
})

setTitleView

Replace the name / title text.
cometchatCallLogs.setTitleView(object : CallLogsViewHolderListener() {
    override fun createView(context: Context?, listItem: CometchatCallLogsItemsBinding?): View {
        return TextView(context)
    }

    override fun bindView(
        context: Context,
        createdView: View,
        callLog: CallLog,
        holder: RecyclerView.ViewHolder,
        callList: List<CallLog>,
        position: Int
    ) {
    }
})
Inline call duration example:
YourActivity.kt
cometchatCallLogs.setTitleView(object : CallLogsViewHolderListener() {
    override fun createView(context: Context?, listItem: CometchatCallLogsItemsBinding?): View {
        return TextView(context)
    }

    override fun bindView(
        context: Context,
        createdView: View,
        callLog: CallLog,
        holder: RecyclerView.ViewHolder,
        callList: List<CallLog>,
        position: Int
    ) {
        val textView = createdView as TextView
        textView.setTextAppearance(CometChatTheme.getTextAppearanceHeading4Regular(context))
        textView.setTextColor(CometChatTheme.getTextColorPrimary(context))
        CallUtils.getCallLogUserName(callLog)
        if (callLog.totalDurationInMinutes > 0) {
            val duration = callLog.totalDurationInMinutes.toString()
            textView.text = CallUtils.getCallLogUserName(callLog) + " • \uD83D\uDD5A\uFE0F " + duration
                .substring(0, if (duration.length > 4) 4 else 3) + " mins"
        } else textView.text = CallUtils.getCallLogUserName(callLog)
    }
})

setSubtitleView

Replace the subtitle text below the caller’s name.
cometchatCallLogs.setSubtitleView(object : CallLogsViewHolderListener() {
    override fun createView(context: Context?, listItem: CometchatCallLogsItemsBinding?): View {
        return TextView(context)
    }

    override fun bindView(
        context: Context,
        createdView: View,
        callLog: CallLog,
        holder: RecyclerView.ViewHolder,
        callList: List<CallLog>,
        position: Int
    ) {
    }
})
Example with call direction text:
YourActivity.kt
cometchatCallLogs.setSubtitleView(object : CallLogsViewHolderListener() {
    override fun createView(context: Context?, listItem: CometchatCallLogsItemsBinding?): View {
        return TextView(context)
    }

    override fun bindView(
        context: Context,
        createdView: View,
        callLog: CallLog,
        holder: RecyclerView.ViewHolder,
        callList: List<CallLog>,
        position: Int
    ) {
        val textView = createdView as TextView
        val callUser = callLog.initiator as CallUser
        val isInitiator = callUser.uid == CometChat.getLoggedInUser().uid
        if (callLog.status == CometChatCallsConstants.CALL_STATUS_UNANSWERED || (callLog
                .status
                == CometChatCallsConstants.CALL_STATUS_MISSED)
        ) {
            textView.text = "Missed Call"
        } else {
            if (isInitiator) {
                textView.text = "Outgoing Call"
            } else {
                textView.text = "Incoming Call"
            }
        }
    }
})

setTrailingView

Replace the right section of each call log item.
cometchatCallLogs.setTrailingView(object : CallLogsViewHolderListener() {
    override fun createView(context: Context?, listItem: CometchatCallLogsItemsBinding?): View {
        return TextView(context)
    }

    override fun bindView(
        context: Context,
        createdView: View,
        callLog: CallLog,
        holder: RecyclerView.ViewHolder,
        callList: List<CallLog>,
        position: Int
    ) {
    }
})
Timestamp example:
YourActivity.kt
cometchatCallLogs.setTrailingView(object : CallLogsViewHolderListener() {
    override fun createView(context: Context?, listItem: CometchatCallLogsItemsBinding?): View {
        return TextView(context)
    }

    override fun bindView(
        context: Context,
        createdView: View,
        callLog: CallLog,
        holder: RecyclerView.ViewHolder,
        callList: List<CallLog>,
        position: Int
    ) {
        val textView = createdView as TextView
        textView.text = SimpleDateFormat("dd MMM, hh:mm a").format(callLog.initiatedAt * 1000)
    }
})

setItemView

Replace the entire list item row.
cometchatCallLogs.setItemView(object : CallLogsViewHolderListener() {
    override fun createView(context: Context?, listItem: CometchatCallLogsItemsBinding?): View? {
        return null
    }

    override fun bindView(
        context: Context,
        createdView: View,
        callLog: CallLog,
        holder: RecyclerView.ViewHolder,
        callList: List<CallLog>,
        position: Int
    ) {
    }
})
Example with custom call log layout:
Create a call_log_list_item.xml custom layout file:
call_log_list_item.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal">

    <com.cometchat.chatuikit.shared.views.avatar.CometChatAvatar
        android:id="@+id/avatar"
        android:layout_width="@dimen/cometchat_48dp"
        android:layout_height="@dimen/cometchat_48dp" />

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="@dimen/cometchat_margin_3"
        android:layout_marginEnd="@dimen/cometchat_margin_3"
        android:gravity="center_vertical"
        android:orientation="vertical">

        <TextView
            android:id="@+id/tv_title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:ellipsize="end"
            android:maxLines="1" />

        <TextView
            android:id="@+id/tv_subtitle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:textAppearance="?attr/cometchatTextAppearanceBodyRegular"
            android:textColor="?attr/cometchatTextColorSecondary" />

    </LinearLayout>

    <Space
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_weight="1" />

    <TextView
        android:id="@+id/tv_date_call_log"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />
</LinearLayout>
YourActivity.kt
cometchatCallLogs.setItemView(object : CallLogsViewHolderListener() {
    override fun createView(context: Context?, listItem: CometchatCallLogsItemsBinding?): View {
        return LayoutInflater.from(context).inflate(R.layout.call_log_list_item, null)
    }

    override fun bindView(
        context: Context,
        createdView: View,
        call: CallLog,
        holder: RecyclerView.ViewHolder,
        callList: List<CallLog>,
        position: Int
    ) {
        val avatar: CometChatAvatar = createdView.findViewById(R.id.avatar)
        val name: TextView = createdView.findViewById(R.id.tv_title)
        val subTitle: TextView = createdView.findViewById(R.id.tv_subtitle)
        val date: TextView = createdView.findViewById(R.id.tv_date_call_log)

        val layoutParams = LinearLayout.LayoutParams(
            ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT
        )

        createdView.layoutParams = layoutParams
        val callUser = call.initiator as CallUser
        val callUser1 = call.receiver as CallUser
        val isInitiator = callUser.uid == CometChat.getLoggedInUser().uid
        date.text = SimpleDateFormat("dd MMM, hh:mm a").format(call.initiatedAt * 1000)
        if (call.status == CometChatCallsConstants.CALL_STATUS_UNANSWERED || (call
                .status
                == CometChatCallsConstants.CALL_STATUS_MISSED)
        ) {
            avatar.setAvatar(ResourcesCompat.getDrawable(resources, R.drawable.ic_missed_call, null)!!)
            subTitle.text = "Missed Call"
        } else {
            if (isInitiator) {
                avatar.setAvatar(ResourcesCompat.getDrawable(resources, R.drawable.ic_outgoing_call, null)!!)
                subTitle.text = "Outgoing Call"
                name.text = callUser1.name
            } else {
                avatar.setAvatar(ResourcesCompat.getDrawable(resources, R.drawable.ic_incoming_call, null)!!)
                subTitle.text = "Incoming Call"
                name.text = callUser.name
            }
        }
    }
})

setOptions

Replace the long-press context menu entirely.
cometchatCallLogs.setOptions { context, callLog -> emptyList<CometChatPopupMenu.MenuItem?>() }

setAddOptions

Append to the long-press context menu without removing defaults.
cometchatCallLogs.setAddOptions { context, callLog -> emptyList<CometChatPopupMenu.MenuItem?>() }

setLoadingView

Sets a custom loading view displayed when data is being fetched.
cometchatCallLogs.setLoadingView(R.layout.your_loading_view)

setEmptyView

Configures a custom view displayed when there are no call logs in the list.
cometchatCallLogs.setEmptyView(R.layout.your_empty_view)

setErrorView

Defines a custom error state view that appears when an issue occurs while loading call logs.
cometchatCallLogs.setErrorView(R.layout.your_error_view)
  • Verify: After setting any custom view slot, confirm the custom view renders in the correct position within the call log list item, and the data binding populates correctly for each call log entry.

Common Patterns

Hide all chrome — minimal list

cometchatCallLogs.setSeparatorVisibility(View.GONE)
cometchatCallLogs.setToolbarVisibility(View.GONE)

Missed calls only

val builder = CallLogRequest.CallLogRequestBuilder()
    .setCallStatus(CometChatCallsConstants.CALL_STATUS_MISSED)
cometchatCallLogs.setCallLogRequestBuilder(builder)

Calls with recordings only

val builder = CallLogRequest.CallLogRequestBuilder()
    .setHasRecording(true)
cometchatCallLogs.setCallLogRequestBuilder(builder)

Audio calls only

val builder = CallLogRequest.CallLogRequestBuilder()
    .setCallType(CometChatCallsConstants.CALL_TYPE_AUDIO)
cometchatCallLogs.setCallLogRequestBuilder(builder)

Advanced Methods

refreshCallLogs

Forces a refresh of the call log list, re-fetching data from the server.
cometchatCallLogs.refreshCallLogs()

setDateFormat

Sets a legacy SimpleDateFormat for call log timestamps.
cometchatCallLogs.setDateFormat(SimpleDateFormat("dd/MM/yyyy, HH:mm:ss", Locale.getDefault()))

setDateTimeFormatter

Provides a custom implementation of DateTimeFormatterCallback to configure how time and date values are displayed. Each method corresponds to a specific case:
  • time(long timestamp) — Custom full timestamp format
  • today(long timestamp) — Called when a call log is from today
  • yesterday(long timestamp) — Called for yesterday’s call logs
  • lastWeek(long timestamp) — Call logs from the past week
  • otherDays(long timestamp) — Older call logs
  • minutes(long diffInMinutesFromNow, long timestamp) — e.g., “5 minutes ago”
  • hours(long diffInHourFromNow, long timestamp) — e.g., “2 hours ago”
import java.text.SimpleDateFormat
import java.util.*

cometchatCallLogs.setDateTimeFormatter(object : DateTimeFormatterCallback {

    private val fullTimeFormatter = SimpleDateFormat("hh:mm a", Locale.getDefault())
    private val dateFormatter = SimpleDateFormat("dd MMM yyyy", Locale.getDefault())

    override fun time(timestamp: Long): String {
        return fullTimeFormatter.format(Date(timestamp))
    }

    override fun today(timestamp: Long): String {
        return "Today"
    }

    override fun yesterday(timestamp: Long): String {
        return "Yesterday"
    }

    override fun lastWeek(timestamp: Long): String {
        return "Last Week"
    }

    override fun otherDays(timestamp: Long): String {
        return dateFormatter.format(Date(timestamp))
    }

    override fun minutes(diffInMinutesFromNow: Long, timestamp: Long): String {
        return "$diffInMinutesFromNow mins ago"
    }

    override fun hours(diffInHourFromNow: Long, timestamp: Long): String {
        return "$diffInHourFromNow hrs ago"
    }
})

Internal Access

These methods provide direct access to internal components for advanced use cases.
MethodReturnsDescription
getBinding()CometchatCallLogsBindingThe ViewBinding for the component’s root layout
getViewModel()CallLogsViewModelThe ViewModel managing call log data and state
getAdapter()CallLogsAdapterThe adapter powering the RecyclerView
setAdapter(CallLogsAdapter)voidReplaces the default adapter with a custom one
Use these only when the standard API is insufficient. Directly manipulating the adapter or ViewModel may conflict with the component’s internal state management.

Style

The component uses XML theme styles. Define a custom style with parent CometChatCallLogsStyle in themes.xml, then apply with setStyle().
themes.xml
    <style name="CustomAvatarStyle" parent="CometChatAvatarStyle">
        <item name="cometchatAvatarStrokeRadius">8dp</item>
        <item name="cometchatAvatarBackgroundColor">#FBAA75</item>
    </style>
    <style name="CustomCallLogStyle" parent="CometChatCallLogsStyle">
        <item name="cometchatCallLogsAvatarStyle">@style/CustomAvatarStyle</item>
        <item name="cometchatCallLogsSeparatorColor">#F76808</item>
        <item name="cometchatCallLogsTitleTextColor">#F76808</item>
    </style>
cometchatCallLogs.setStyle(R.style.CustomCallLogStyle)
To know more such attributes, visit the attributes file.

Programmatic Style Properties

In addition to XML theme styles, the component exposes programmatic setters for fine-grained control:
MethodTypeDescription
setBackgroundColor@ColorInt intBackground color of the component
setCornerRadius@Dimension intCorner radius of the component
setStrokeColor@ColorInt intStroke color of the component border
setStrokeWidth@Dimension intStroke width of the component border
setBackIconDrawableCustom back icon drawable
setBackIconTint@ColorInt intTint color for the back icon
setTitleTextColor@ColorInt intTitle text color in the toolbar
setTitleTextAppearance@StyleRes intTitle text appearance in the toolbar
setItemTitleTextColor@ColorInt intText color for call log item titles
setItemTitleTextAppearance@StyleRes intText appearance for call log item titles
setItemSubtitleTextColor@ColorInt intText color for call log item subtitles
setItemSubtitleTextAppearance@StyleRes intText appearance for call log item subtitles
setSeparatorColor@ColorInt intColor of list item separators
setItemIncomingCallIconDrawableIcon for incoming call indicators
setItemIncomingCallIconTint@ColorInt intTint for incoming call icon
setItemOutgoingCallIconDrawableIcon for outgoing call indicators
setItemOutgoingCallIconTint@ColorInt intTint for outgoing call icon
setItemMissedCallIconDrawableIcon for missed call indicators
setItemMissedCallIconTint@ColorInt intTint for missed call icon
setItemMissedCallTitleColor@ColorInt intTitle text color for missed call entries
setItemAudioCallIconDrawableIcon for audio call action button
setItemAudioCallIconTint@ColorInt intTint for audio call action icon
setItemVideoCallIconDrawableIcon for video call action button
setItemVideoCallIconTint@ColorInt intTint for video call action icon
setAvatarStyle@StyleRes intStyle for call log avatars
setDateStyle@StyleRes intStyle for date/time display
setEmptyStateTitleTextAppearance@StyleRes intTitle text appearance for the empty state
setEmptyStateTitleTextColor@ColorInt intTitle text color for the empty state
setEmptyStateSubtitleTextAppearance@StyleRes intSubtitle text appearance for the empty state
setEmptyStateSubtitleTextColor@ColorInt intSubtitle text color for the empty state
setErrorTitleTextAppearance@StyleRes intTitle text appearance for the error state
setErrorTitleTextColor@ColorInt intTitle text color for the error state
setErrorSubtitleTextAppearance@StyleRes intSubtitle text appearance for the error state
setErrorSubtitleTextColor@ColorInt intSubtitle text color for the error state

Customization Matrix

What to changeWhereProperty/APIExample
Override behavior on user interactionActivity/FragmentsetOn<Event> callbackssetOnItemClick((v, pos, cl) -> { ... })
Filter which call logs appearActivity/FragmentsetCallLogRequestBuildersetCallLogRequestBuilder(builder)
Toggle visibility of UI elementsActivity/Fragmentset<Feature>Visibility(int)setSeparatorVisibility(View.GONE)
Replace a section of the list itemActivity/Fragmentset<Slot>ViewsetLeadingView(listener)
Change colors, fonts, spacingthemes.xmlCometChatCallLogsStyle<item name="cometchatCallLogsSeparatorColor">#F76808</item>
Avatar style (corner radius, background)themes.xmlcometchatCallLogsAvatarStyle<item name="cometchatAvatarStrokeRadius">8dp</item>
Apply a custom styleActivity/FragmentsetStyle(int styleRes)cometchatCallLogs.setStyle(R.style.CustomCallLogStyle);
Back button visibilityActivity/FragmentsetBackIconVisibility(int).setBackIconVisibility(View.VISIBLE);
Toolbar visibilityActivity/FragmentsetToolbarVisibility(int).setToolbarVisibility(View.GONE);
Title visibilityActivity/FragmentsetTitleVisibility(int).setTitleVisibility(View.GONE);
Error state visibilityActivity/FragmentsetErrorStateVisibility(int).setErrorStateVisibility(View.GONE);
Empty state visibilityActivity/FragmentsetEmptyStateVisibility(int).setEmptyStateVisibility(View.GONE);
Loading state visibilityActivity/FragmentsetLoadingStateVisibility(int).setLoadingStateVisibility(View.GONE);
Separator visibilityActivity/FragmentsetSeparatorVisibility(int).setSeparatorVisibility(View.GONE);
Date/time formattingActivity/FragmentsetDateTimeFormatter(DateTimeFormatterCallback)See setDateTimeFormatter code above
Legacy date formatActivity/FragmentsetDateFormat(SimpleDateFormat)setDateFormat(new SimpleDateFormat("dd/MM/yyyy, HH:mm:ss"))
Long-press options (replace)Activity/FragmentsetOptions(Function2)See setOptions code above
Long-press options (append)Activity/FragmentsetAddOptions(Function2)See setAddOptions code above
Loading viewActivity/FragmentsetLoadingView(int).setLoadingView(R.layout.your_loading_view);
Empty viewActivity/FragmentsetEmptyView(int).setEmptyView(R.layout.your_empty_view);
Error viewActivity/FragmentsetErrorView(int).setErrorView(R.layout.your_error_view);
Leading view (avatar area)Activity/FragmentsetLeadingView(CallLogsViewHolderListener)See setLeadingView code above
Title viewActivity/FragmentsetTitleView(CallLogsViewHolderListener)See setTitleView code above
Subtitle viewActivity/FragmentsetSubtitleView(CallLogsViewHolderListener)See setSubtitleView code above
Trailing viewActivity/FragmentsetTrailingView(CallLogsViewHolderListener)See setTrailingView code above
Entire list itemActivity/FragmentsetItemView(CallLogsViewHolderListener)See setItemView code above
Call icon click listenerActivity/FragmentsetOnCallIconClickListener(OnCallIconClick)See setOnCallIconClickListener code above
Refresh call logsActivity/FragmentrefreshCallLogs().refreshCallLogs();
Internal adapter accessActivity/FragmentgetAdapter() / setAdapter()Advanced use only

Accessibility

The component renders a scrollable RecyclerView of interactive call log items. Each call log row responds to tap and long-press gestures. Avatar images include the caller name as content description. Call status icons (incoming, outgoing, missed) provide visual indicators for call direction. For custom views provided via setLeadingView, setTitleView, setTrailingView, or setItemView, ensure you set android:contentDescription on visual-only elements so TalkBack can announce them. The default views handle this automatically. Call direction icons and status indicators are visual-only by default. If screen reader descriptions are needed, provide them via a custom view with appropriate contentDescription attributes.

Next Steps