DescendantOffsetUtils

Utility class for descendant Rect calculations.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open fun getDescendantRect(@NonNull parent: ViewGroup, @NonNull descendant: View, @NonNull out: Rect)
Retrieve the transformed bounding rect of an arbitrary descendant view.
Link copied to clipboard
open fun offsetDescendantRect(@NonNull parent: ViewGroup, @NonNull descendant: View, @NonNull rect: Rect)
This is a port of the common offsetDescendantRectToMyCoords from the framework, but adapted to take transformations into account.