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

ViewDebug.ExportedProperty

@Target(value = [ElementType.FIELD, ElementType.METHOD])
@Retention(value = RetentionPolicy.RUNTIME)
annotation ViewDebug.ExportedProperty


This annotation can be used to mark fields and methods to be dumped by the view server. Only non-void methods with no arguments can be annotated by this annotation.

Summary

Public functions

abstract String!

Specifies the category the property falls into, such as measurement, layout, drawing, etc.

abstract Boolean

When deep export is turned on, this property is not dumped.

abstract Array<ViewDebug.FlagToString!>!

A flags mapping can be defined to map flags encoded in an integer to specific strings.

abstract Boolean

Indicates whether or not to format an int or byte value as a hex string.

abstract Boolean

Indicates whether or not the key to value mappings are held in adjacent indices.

abstract Array<ViewDebug.IntToString!>!

A mapping can be defined to map array indices to specific strings.

abstract Array<ViewDebug.IntToString!>!

A mapping can be defined to map int values to specific strings.

abstract String!

The prefix to use on child properties when deep export is enabled

abstract Boolean

When resolveId is true, and if the annotated field/method return value is an int, the value is converted to an Android's resource name.

Public functions

category

abstract fun category(): String!

Specifies the category the property falls into, such as measurement, layout, drawing, etc.

Returns
String!

the category as String

deepExport

abstract fun deepExport(): Boolean

When deep export is turned on, this property is not dumped. Instead, the properties contained in this property are dumped. Each child property is prefixed with the name of this property.

Returns
Boolean

true if the properties of this property should be dumped

See also
prefix

flagMapping

abstract fun flagMapping(): Array<ViewDebug.FlagToString!>!

A flags mapping can be defined to map flags encoded in an integer to specific strings. A mapping can be used to see human readable values for the flags of an integer:

@ViewDebug.ExportedProperty(flagMapping = {
    @ViewDebug.FlagToString(mask = ENABLED_MASK, equals = ENABLED,
            name = "ENABLED"),
    @ViewDebug.FlagToString(mask = ENABLED_MASK, equals = DISABLED,
            name = "DISABLED"),
})
private int mFlags;

          
A specified String is output when the following is true:
Returns
Array<ViewDebug.FlagToString!>!

An array of int to String mappings

formatToHexString

abstract fun formatToHexString(): Boolean

Indicates whether or not to format an int or byte value as a hex string.

Returns
Boolean

true if the supported values should be formatted as a hex string.

hasAdjacentMapping

abstract fun hasAdjacentMapping(): Boolean

Indicates whether or not the key to value mappings are held in adjacent indices. Note: Applies only to fields and methods that return String[].

Returns
Boolean

true if the key to value mappings are held in adjacent indices.

indexMapping

abstract fun indexMapping(): Array<ViewDebug.IntToString!>!

A mapping can be defined to map array indices to specific strings. A mapping can be used to see human readable values for the indices of an array:

@ViewDebug.ExportedProperty(indexMapping = {
    @ViewDebug.IntToString(from = 0, to = "INVALID"),
    @ViewDebug.IntToString(from = 1, to = "FIRST"),
    @ViewDebug.IntToString(from = 2, to = "SECOND")
})
private int[] mElements;

          

        
Returns
Array<ViewDebug.IntToString!>!

An array of int to String mappings

mapping

abstract fun mapping(): Array<ViewDebug.IntToString!>!

A mapping can be defined to map int values to specific strings. For instance, View.getVisibility() returns 0, 4 or 8. However, these values actually mean VISIBLE, INVISIBLE and GONE. A mapping can be used to see these human readable values:

@ViewDebug.ExportedProperty(mapping = {
    @ViewDebug.IntToString(from = 0, to = "VISIBLE"),
    @ViewDebug.IntToString(from = 4, to = "INVISIBLE"),
    @ViewDebug.IntToString(from = 8, to = "GONE")
})
public int getVisibility() { ...

          

        
Returns
Array<ViewDebug.IntToString!>!

An array of int to String mappings

prefix

abstract fun prefix(): String!

The prefix to use on child properties when deep export is enabled

Returns
String!

a prefix as a String

See also
deepExport

resolveId

abstract fun resolveId(): Boolean

When resolveId is true, and if the annotated field/method return value is an int, the value is converted to an Android's resource name.

Returns
Boolean

true if the property's value must be transformed into an Android resource name, false otherwise