Google is committed to advancing racial equity for Black communities. See how.

InspectorNode

class InspectorNode
kotlin.Any
   ↳ androidx.ui.tooling.inspector.InspectorNode

Node representing a Composable for the Layout Inspector.

Summary

Properties
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<NodeParameter>

The parameters of this Composable.

Int

Top of the Composable in pixels.

Int

Width of the Composable in pixels.

Properties

children

val children: List<InspectorNode>

The children nodes of this Composable.

fileName

val fileName: String

The fileName where the Composable was called.

height

val height: Int

Width of the Composable in pixels.

id

val id: Long

The associated render node id or 0.

left

val left: Int

Left side of the Composable in pixels.

length

val length: Int

The number of UTF-16 code point comprise the Composable call

lineNumber

val lineNumber: Int

The line number where the Composable was called.

name

val name: String

The name of the Composable.

offset

val offset: Int

The UTF-16 offset in the file where the Composable was called

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.

parameters

val parameters: List<NodeParameter>

The parameters of this Composable.

top

val top: Int

Top of the Composable in pixels.

width

val width: Int

Width of the Composable in pixels.