-
- All Implemented Interfaces:
-
com.datadog.android.sessionreplay.utils.ViewBoundsResolver
public class DefaultViewBoundsResolver implements 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.
-
-
Field Summary
Fields Modifier and Type Field Description public final static DefaultViewBoundsResolverINSTANCE
-
Method Summary
Modifier and Type Method Description GlobalBoundsresolveViewGlobalBounds(View view, Float screenDensity)Resolves the View bounds in device space, and normalizes them based on the screen density. GlobalBoundsresolveViewPaddedBounds(View view, Float screenDensity)Resolves the View bounds in device space excluding the padding, and normalizes them based on the screen density. -
-
Method Detail
-
resolveViewGlobalBounds
GlobalBounds resolveViewGlobalBounds(View view, Float screenDensity)
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.
- Parameters:
view- the ViewscreenDensity- the current device screen density
-
resolveViewPaddedBounds
GlobalBounds resolveViewPaddedBounds(View view, Float screenDensity)
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.
- Parameters:
view- the ViewscreenDensity- the current device screen density
-
-
-
-