Skip to content

BaseAsyncBackgroundWireframeMapper

Xavier F. Gouchet edited this page Sep 4, 2024 · 1 revision

abstract class BaseAsyncBackgroundWireframeMapper<in T : View> : BaseWireframeMapper<T>

A basic abstract WireframeMapper that provides some helpful utilities to resolve the background drawable of the View on a background thread, allowing tracking actual images.

Parameters

T the type of the View to map
viewIdentifierResolver the ViewIdentifierResolver (to resolve a view or children stable id)
colorStringFormatter the ColorStringFormatter to transform Color into HTML hex strings
viewBoundsResolver the ViewBoundsResolver to get a view boundaries in density independent units
drawableToColorMapper the DrawableToColorMapper to convert a background drawable into a solid color

Inheritors

BaseViewGroupMapper
TextViewMapper

Types

BaseAsyncBackgroundWireframeMapper.Companion

Functions

map

@UiThread

open override fun map(view: T, mappingContext: MappingContext, asyncJobStatusCallback: AsyncJobStatusCallback, internalLogger: InternalLogger): List<MobileSegment.Wireframe>

Maps a View to a List in order to be rendered in the Session Replay player.

Parameters
view as the View instance that will be mapped
mappingContext in which we provide useful information regarding the current
asyncJobStatusCallback a callback that can be called when the mapper starts or finishes processing an async job. By calling this whenever a job started (in the caller thread) and finished (in the background thread) will make sure that the List<Wireframe> will not be consumed until all the wireframes are updated by the async jobs. It can be used to offload heavy work from the calling thread (main) to a background thread while mapping some view properties.
internalLogger the logger to log internal warnings
See also
MobileSegment.Wireframe
SystemInformation
Clone this wiki locally