ExportedProperty
@Target([AnnotationTarget.FIELD, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER]) class ExportedProperty
android.view.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 constructors | |
---|---|
ExportedProperty(resolveId: Boolean, mapping: Array<ViewDebug.IntToString>, indexMapping: Array<ViewDebug.IntToString>, flagMapping: Array<ViewDebug.FlagToString>, deepExport: Boolean, prefix: String, category: String, formatToHexString: Boolean, hasAdjacentMapping: Boolean) This annotation can be used to mark fields and methods to be dumped by the view server. |
Properties | |
---|---|
String |
Specifies the category the property falls into, such as measurement, layout, drawing, etc. |
Boolean |
When deep export is turned on, this property is not dumped. |
Array<ViewDebug.FlagToString> |
A flags mapping can be defined to map flags encoded in an integer to specific strings. |
Boolean |
Indicates whether or not to format an |
Boolean |
Indicates whether or not the key to value mappings are held in adjacent indices. |
Array<ViewDebug.IntToString> |
A mapping can be defined to map array indices to specific strings. |
Array<ViewDebug.IntToString> |
A mapping can be defined to map int values to specific strings. |
String |
The prefix to use on child properties when deep export is enabled |
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 constructors
ExportedProperty
ExportedProperty(
resolveId: Boolean,
mapping: Array<ViewDebug.IntToString>,
indexMapping: Array<ViewDebug.IntToString>,
flagMapping: Array<ViewDebug.FlagToString>,
deepExport: Boolean,
prefix: String,
category: String,
formatToHexString: Boolean,
hasAdjacentMapping: Boolean)
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.
Properties
category
val category: String
Specifies the category the property falls into, such as measurement, layout, drawing, etc.
Return | |
---|---|
String |
the category as String |
deepExport
val 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.
Return | |
---|---|
Boolean |
true if the properties of this property should be dumped |
See Also
flagMapping
val 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; <pre> A specified String is output when the following is true:</pre>
Return | |
---|---|
Array<ViewDebug.FlagToString> |
An array of int to String mappings |
formatToHexString
val formatToHexString: Boolean
Indicates whether or not to format an int
or byte
value as a hex string.
Return | |
---|---|
Boolean |
true if the supported values should be formatted as a hex string. |
hasAdjacentMapping
val 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[].
Return | |
---|---|
Boolean |
true if the key to value mappings are held in adjacent indices. |
indexMapping
val 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; <pre></pre>
Return | |
---|---|
Array<ViewDebug.IntToString> |
An array of int to String mappings |
mapping
val 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() { ... <pre></pre>
Return | |
---|---|
Array<ViewDebug.IntToString> |
An array of int to String mappings |
See Also
prefix
val prefix: String
The prefix to use on child properties when deep export is enabled
Return | |
---|---|
String |
a prefix as a String |
See Also
resolveId
val 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.
Return | |
---|---|
Boolean |
true if the property's value must be transformed into an Android resource name, false otherwise |