# ViewDebug.FlagToString

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

# FlagToString

*** ** * ** ***

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

```
@Target([AnnotationTarget.CLASS, AnnotationTarget.FILE]) class FlagToString
```

|----------------------------------------------------------------------------------------------------------------------------|
| [android.view.ViewDebug.FlagToString](https://developer.android.com/reference/kotlin/android/view/ViewDebug.FlagToString#) |

Defines a mapping from a flag to a String. Such a mapping can be used in an @ExportedProperty to provide more meaningful values to the end user.

## Summary

|                                                                                                                                                                                                                                                                                           Public constructors                                                                                                                                                                                                                                                                                            ||
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [FlagToString](https://developer.android.com/reference/kotlin/android/view/ViewDebug.FlagToString#FlagToString(kotlin.Int,%20kotlin.Int,%20kotlin.String,%20kotlin.Boolean))`(`equals:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `mask:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `name:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`, `outputIf:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` Defines a mapping from a flag to a String. |

|                                                                                                                                                                                Properties                                                                                                                                                                                 ||
|------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)         | [equals](https://developer.android.com/reference/kotlin/android/view/ViewDebug.FlagToString#equals:kotlin.Int) The value to compare to the result of:`original value & `[mask()](https://developer.android.com/reference/kotlin/android/view/ViewDebug.FlagToString#mask:kotlin.Int). |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)         | [mask](https://developer.android.com/reference/kotlin/android/view/ViewDebug.FlagToString#mask:kotlin.Int) The mask to apply to the original value.                                                                                                                                   |
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)   | [name](https://developer.android.com/reference/kotlin/android/view/ViewDebug.FlagToString#name:kotlin.String) The String to use in place of the original int value.                                                                                                                   |
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [outputIf](https://developer.android.com/reference/kotlin/android/view/ViewDebug.FlagToString#outputIf:kotlin.Boolean) Indicates whether to output the flag when the test is true, or false.                                                                                          |

## Public constructors

### FlagToString

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

```
FlagToString(
    equals: Int, 
    mask: Int, 
    name: String, 
    outputIf: Boolean)
```

Defines a mapping from a flag to a String. Such a mapping can be used in an @ExportedProperty to provide more meaningful values to the end user.  
**See Also**

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

## Properties

### equals

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

```
val equals: Int
```

The value to compare to the result of:`original value & `[mask()](https://developer.android.com/reference/kotlin/android/view/ViewDebug.FlagToString#mask:kotlin.Int).

|                                             Return                                              ||
|----------------------------------------------------------------------------|---------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | An arbitrary value. |

### mask

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

```
val mask: Int
```

The mask to apply to the original value.

|                                               Return                                                ||
|----------------------------------------------------------------------------|-------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | An arbitrary int value. |

### name

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

```
val name: String
```

The String to use in place of the original int value.

|                                                     Return                                                      ||
|----------------------------------------------------------------------------------|-------------------------------|
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | An arbitrary non-null String. |

### outputIf

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

```
val outputIf: Boolean
```

Indicates whether to output the flag when the test is true, or false. Defaults to true.