# ViewDebug.ExportedProperty

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Methods](https://developer.android.com/reference/android/view/ViewDebug.ExportedProperty#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/view/ViewDebug.ExportedProperty#inhmethods)  

# ViewDebug.ExportedProperty

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/view/ViewDebug.ExportedProperty "View this page in Kotlin")\|Java

`
public
static

abstract
@interface
ViewDebug.ExportedProperty
`  
`


implements

`[Annotation](https://developer.android.com/reference/java/lang/annotation/Annotation)`


`

|-----------------------------------------|
| android.view.ViewDebug.ExportedProperty |

<br />

*** ** * ** ***

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 methods                                                                                                                                                                     ||
|--------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` `[String](https://developer.android.com/reference/java/lang/String)                            | ` `[category](https://developer.android.com/reference/android/view/ViewDebug.ExportedProperty#category())`() ` Specifies the category the property falls into, such as measurement, layout, drawing, etc.                                                |
| ` boolean`                                                                                       | ` `[deepExport](https://developer.android.com/reference/android/view/ViewDebug.ExportedProperty#deepExport())`() ` When deep export is turned on, this property is not dumped.                                                                           |
| ` `[FlagToString[]](https://developer.android.com/reference/android/view/ViewDebug.FlagToString) | ` `[flagMapping](https://developer.android.com/reference/android/view/ViewDebug.ExportedProperty#flagMapping())`() ` A flags mapping can be defined to map flags encoded in an integer to specific strings.                                              |
| ` boolean`                                                                                       | ` `[formatToHexString](https://developer.android.com/reference/android/view/ViewDebug.ExportedProperty#formatToHexString())`() ` Indicates whether or not to format an`int`or`byte`value as a hex string.                                                |
| ` boolean`                                                                                       | ` `[hasAdjacentMapping](https://developer.android.com/reference/android/view/ViewDebug.ExportedProperty#hasAdjacentMapping())`() ` Indicates whether or not the key to value mappings are held in adjacent indices.                                      |
| ` `[IntToString[]](https://developer.android.com/reference/android/view/ViewDebug.IntToString)   | ` `[indexMapping](https://developer.android.com/reference/android/view/ViewDebug.ExportedProperty#indexMapping())`() ` A mapping can be defined to map array indices to specific strings.                                                                |
| ` `[IntToString[]](https://developer.android.com/reference/android/view/ViewDebug.IntToString)   | ` `[mapping](https://developer.android.com/reference/android/view/ViewDebug.ExportedProperty#mapping())`() ` A mapping can be defined to map int values to specific strings.                                                                             |
| ` `[String](https://developer.android.com/reference/java/lang/String)                            | ` `[prefix](https://developer.android.com/reference/android/view/ViewDebug.ExportedProperty#prefix())`() ` The prefix to use on child properties when deep export is enabled                                                                             |
| ` boolean`                                                                                       | ` `[resolveId](https://developer.android.com/reference/android/view/ViewDebug.ExportedProperty#resolveId())`() ` 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. |

| ### Inherited methods |
|-----------------------|---|
| From interface` `[java.lang.annotation.Annotation](https://developer.android.com/reference/java/lang/annotation/Annotation)` ` |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract `[Class](https://developer.android.com/reference/java/lang/Class)`<? extends `[Annotation](https://developer.android.com/reference/java/lang/annotation/Annotation)`>` | ` `[annotationType](https://developer.android.com/reference/java/lang/annotation/Annotation#annotationType())`() ` Returns the annotation interface of this annotation.                                                                                                                            | | ` abstract boolean`                                                                                                                                                               | ` `[equals](https://developer.android.com/reference/java/lang/annotation/Annotation#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Returns true if the specified object represents an annotation that is logically equivalent to this one. | | ` abstract int`                                                                                                                                                                   | ` `[hashCode](https://developer.android.com/reference/java/lang/annotation/Annotation#hashCode())`() ` Returns the hash code of this annotation.                                                                                                                                                   | | ` abstract `[String](https://developer.android.com/reference/java/lang/String)                                                                                                    | ` `[toString](https://developer.android.com/reference/java/lang/annotation/Annotation#toString())`() ` Returns a string representation of this annotation.                                                                                                                                         | ||

## Public methods

### category

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public String category ()
```

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

<br />

|                                              Returns                                              ||
|--------------------------------------------------------------------|-------------------------------|
| [String](https://developer.android.com/reference/java/lang/String) | the category as String <br /> |

### deepExport

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public boolean deepExport ()
```

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.

<br />

|                                  Returns                                   ||
|-----------|-----------------------------------------------------------------|
| `boolean` | true if the properties of this property should be dumped <br /> |

**See also:**

- [prefix()](https://developer.android.com/reference/android/view/ViewDebug.ExportedProperty#prefix())  

### flagMapping

Added in[API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public FlagToString[] flagMapping ()
```

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:

<br />



<br />



    
|                                                                 Returns                                                                  ||
|-----------------------------------------------------------------------------------------------|-------------------------------------------|
| [FlagToString[]](https://developer.android.com/reference/android/view/ViewDebug.FlagToString) | An array of int to String mappings <br /> |



```  

### formatToHexString

Added in[API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean formatToHexString ()
```

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

<br />

|                                       Returns                                       ||
|-----------|--------------------------------------------------------------------------|
| `boolean` | true if the supported values should be formatted as a hex string. <br /> |

### hasAdjacentMapping

Added in[API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public boolean hasAdjacentMapping ()
```

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

<br />

|                                      Returns                                      ||
|-----------|------------------------------------------------------------------------|
| `boolean` | true if the key to value mappings are held in adjacent indices. <br /> |

### indexMapping

Added in[API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public IntToString[] indexMapping ()
```

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;
 <br />



<br />



    
|                                                                Returns                                                                 ||
|---------------------------------------------------------------------------------------------|-------------------------------------------|
| [IntToString[]](https://developer.android.com/reference/android/view/ViewDebug.IntToString) | An array of int to String mappings <br /> |


  

      See also:

      

- https://developer.android.com/reference/android/view/ViewDebug.IntToString

- https://developer.android.com/reference/android/view/ViewDebug.ExportedProperty#mapping()

      
  

```  

### mapping

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public IntToString[] mapping ()
```

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() { ...
 <br />



<br />



    
|                                                                Returns                                                                 ||
|---------------------------------------------------------------------------------------------|-------------------------------------------|
| [IntToString[]](https://developer.android.com/reference/android/view/ViewDebug.IntToString) | An array of int to String mappings <br /> |


  

      See also:

      

- https://developer.android.com/reference/android/view/ViewDebug.IntToString

      
  

```  

### prefix

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String prefix ()
```

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

<br />

|                                             Returns                                             ||
|--------------------------------------------------------------------|-----------------------------|
| [String](https://developer.android.com/reference/java/lang/String) | a prefix as a String <br /> |

**See also:**

- [deepExport()](https://developer.android.com/reference/android/view/ViewDebug.ExportedProperty#deepExport())  

### resolveId

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public boolean resolveId ()
```

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.

<br />

|                                                      Returns                                                      ||
|-----------|--------------------------------------------------------------------------------------------------------|
| `boolean` | true if the property's value must be transformed into an Android resource name, false otherwise <br /> |