DefaultViewBoundsResolver - DataDog/dd-sdk-android GitHub Wiki
object DefaultViewBoundsResolver : ViewBoundsResolver
View utility methods needed in the Session Replay Wireframe Mappers. This class is meant for internal usage so please use it with careful as it might change in time.
Functions
resolveViewGlobalBounds
open override fun resolveViewGlobalBounds(view: View, screenDensity: Float): GlobalBounds
Resolves the View bounds in device space, and normalizes them based on the screen density. Example: if a device has a DPI = 2, the value of the dimension or position is divided by 2 to get a normalized value.
Return
the computed view bounds
Parameters
view | the View |
screenDensity | the current device screen density |
resolveViewPaddedBounds
open override fun resolveViewPaddedBounds(view: View, screenDensity: Float): GlobalBounds
Resolves the View bounds in device space excluding the padding, and normalizes them based on the screen density. Example: if a device has a DPI = 2, the value of the padding is divided by 2 to get a normalized value.
Return
the computed view padding
Parameters
view | the View |
screenDensity | the current device screen density |