-
public interface ViewBoundsResolverA utility interface to extract a View's bounds relative to the device's screen, and scaled according to the screen's density. This interface is meant for internal usage, please use it carefully.
-
-
Method Summary
Modifier and Type Method Description abstract GlobalBoundsresolveViewGlobalBounds(View view, Float screenDensity)Resolves the View bounds in device space, and normalizes them based on the screen density. abstract 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
abstract 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
abstract 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
-
-
-
-