{% setvar book_path %}/reference/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/_java_switcher2.md" %}

public 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

static final @NonNull boolean

Enables detailed logging of drag/drop operations.

static final @NonNull boolean

Enables detailed logging of task positioning operations.

static final @NonNull String

Similar to REMOTE_COMMAND_DUMP but uses ViewHierarchyEncoder instead of flat text

static final @NonNull boolean

This field is deprecated.

This flag is now unused

static final @NonNull boolean

This field is deprecated.

This flag is now unused

Public methods

static @NonNull String
flagsToString(
    @NonNull Class<@NonNull Object> clazz,
    @NonNull String field,
    @NonNull int flags
)

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

static @NonNull String
intToString(
    @NonNull Class<@NonNull Object> clazz,
    @NonNull String field,
    @NonNull int integer
)

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

Constants

DEBUG_DRAG

@NonNull
public static final @NonNull boolean DEBUG_DRAG

Enables detailed logging of drag/drop operations.

DEBUG_POSITIONING

@NonNull
public static final @NonNull boolean DEBUG_POSITIONING

Enables detailed logging of task positioning operations.

REMOTE_COMMAND_DUMP_ENCODED

@NonNull
public static final @NonNull String REMOTE_COMMAND_DUMP_ENCODED

Similar to REMOTE_COMMAND_DUMP but uses ViewHierarchyEncoder instead of flat text

TRACE_HIERARCHY

@NonNull
public static final @NonNull boolean TRACE_HIERARCHY

TRACE_RECYCLER

@NonNull
public static final @NonNull boolean TRACE_RECYCLER

Public methods

flagsToString

@NonNull
public static String flagsToString(
    @NonNull Class<@NonNull Object> clazz,
    @NonNull String field,
    @NonNull int flags
)

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

Parameters
@NonNull Class<@NonNull Object> clazz

The class the field is defined on.

@NonNull String field

The field on which the ExportedProperty is defined on.

@NonNull int flags

The flags to convert.

Returns
String

The flags converted into their string representations.

intToString

@NonNull
public static String intToString(
    @NonNull Class<@NonNull Object> clazz,
    @NonNull String field,
    @NonNull int integer
)

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

Parameters
@NonNull Class<@NonNull Object> clazz

The class the field is defined on.

@NonNull String field

The field on which the ExportedProperty is defined on.

@NonNull int integer

The value to convert.

Returns
String

The value converted into its string representation.