{% setvar book_path %}/reference/kotlin/dokkatest/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

ViewDebug

{% setvar page_path %}dokkatest/platform/ViewDebug.html{% endsetvar %} {% setvar can_switch %}1{% endsetvar %} {% include "reference/_kotlin_switcher2.md" %}

class ViewDebug


Various debugging/tracing tools related to View and the view hierarchy.

Summary

Nested types

ViewDebug.CapturedViewProperty

This annotation can be used to mark fields and methods to be dumped whenthe view is captured.

ViewDebug.ExportedProperty

This annotation can be used to mark fields and methods to be dumped bythe view server.

ViewDebug.FlagToString

Defines a mapping from a flag to a String.

ViewDebug.HierarchyHandler

Allows a View to inject custom children into HierarchyViewer.

ViewDebug.HierarchyTraceType

This enum is deprecated.

This enum is now unused

ViewDebug.IntToString

Defines a mapping from an int value to a String.

ViewDebug.RecyclerTraceType

This enum is deprecated.

This enum is now unused

Constants

Boolean

Enables detailed logging of drag/drop operations.

Boolean

Enables detailed logging of task positioning operations.

String

Similar to REMOTE_COMMAND_DUMP but uses ViewHierarchyEncoder instead of flat text

Boolean

This property is deprecated.

This flag is now unused

Boolean

This property is deprecated.

This flag is now unused

Public functions

String
flagsToString(clazz: Class<Any>, field: String, flags: Int)

Converts a set of flags from a field that is mapped with FlagToString to its stringrepresentation.

String
intToString(clazz: Class<Any>, field: String, integer: Int)

Converts an integer from a field that is mapped with IntToString to its stringrepresentation.

Constants

DEBUG_DRAG

val DEBUG_DRAGBoolean

Enables detailed logging of drag/drop operations.

DEBUG_POSITIONING

val DEBUG_POSITIONINGBoolean

Enables detailed logging of task positioning operations.

REMOTE_COMMAND_DUMP_ENCODED

val REMOTE_COMMAND_DUMP_ENCODEDString

Similar to REMOTE_COMMAND_DUMP but uses ViewHierarchyEncoder instead of flat text

TRACE_HIERARCHY

val TRACE_HIERARCHYBoolean

TRACE_RECYCLER

val TRACE_RECYCLERBoolean

Public functions

flagsToString

fun flagsToString(clazz: Class<Any>, field: String, flags: Int): String

Converts a set of flags from a field that is mapped with FlagToString to its stringrepresentation.

Parameters
clazz: Class<Any>

The class the field is defined on.

field: String

The field on which the ExportedProperty is defined on.

flags: Int

The flags to convert.

Returns
String

The flags converted into their string representations.

intToString

fun intToString(clazz: Class<Any>, field: String, integer: Int): String

Converts an integer from a field that is mapped with IntToString to its stringrepresentation.

Parameters
clazz: Class<Any>

The class the field is defined on.

field: String

The field on which the ExportedProperty is defined on.

integer: Int

The value to convert.

Returns
String

The value converted into its string representation.