InspectorNode
class InspectorNode
kotlin.Any | |
↳ | androidx.compose.ui.tooling.inspector.InspectorNode |
Node representing a Composable for the Layout Inspector.
Summary
Properties | |
---|---|
IntArray |
The 4 corners of the node after modifier transformations. |
List<InspectorNode> |
The children nodes of this Composable. |
String |
The fileName where the Composable was called. |
Int |
Width of the Composable in pixels. |
Long |
The associated render node id or 0. |
Int |
Left side of the Composable in pixels. |
Int |
The number of UTF-16 code point comprise the Composable call |
Int |
The line number where the Composable was called. |
String |
The name of the Composable. |
Int |
The UTF-16 offset in the file where the Composable was called |
Int |
A hash of the package name to help disambiguate duplicate fileName values. |
List<RawParameter> |
The parameters of this Composable. |
Int |
Top of the Composable in pixels. |
Int |
Width of the Composable in pixels. |
Properties
bounds
val bounds: IntArray
The 4 corners of the node after modifier transformations. If there are no coordinate transforms the array will be empty. Otherwise the content will be 8 integers representing 4 (x,y) corners in clockwise order of the original, untransformed coordinates.
packageHash
val packageHash: Int
A hash of the package name to help disambiguate duplicate fileName values.
This hash is calculated by,
packageName.fold(0) { hash, current -> hash * 31 + current.toInt() }?.absoluteValue
where the package name is the dotted name of the package. This can be used to disambiguate which file is referenced by fileName. This number is -1 if there was no package hash information generated such as when the file does not contain a package declaration.