Stay organized with collections
Save and categorize content based on your preferences.
FlagToString
@Target([AnnotationTarget.CLASS, AnnotationTarget.FILE]) class 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 |
Defines a mapping from a flag to a String.
|
Properties |
Int |
The value to compare to the result of: original value & mask() .
|
Int |
The mask to apply to the original value.
|
String |
The String to use in place of the original int value.
|
Boolean |
Indicates whether to output the flag when the test is true, or false.
|
Public constructors
FlagToString
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.
Properties
equals
val equals: Int
The value to compare to the result of: original value & mask()
.
Return |
Int |
An arbitrary value. |
mask
val mask: Int
The mask to apply to the original value.
Return |
Int |
An arbitrary int value. |
name
val name: String
The String to use in place of the original int value.
Return |
String |
An arbitrary non-null String. |
outputIf
val outputIf: Boolean
Indicates whether to output the flag when the test is true, or false. Defaults to true.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# ViewDebug.FlagToString\n\nAdded in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nFlagToString\n============\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/view/ViewDebug.FlagToString \"View this page in Java\") \n\n```\n@Target([AnnotationTarget.CLASS, AnnotationTarget.FILE]) class FlagToString\n```\n\n|------------------------------------------|\n| [android.view.ViewDebug.FlagToString](#) |\n\nDefines 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.\n\nSummary\n-------\n\n| Public constructors ||\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [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. |\n\n| Properties ||\n|------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [equals](#equals:kotlin.Int) The value to compare to the result of: `original value & `[mask()](#mask:kotlin.Int). |\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [mask](#mask:kotlin.Int) The mask to apply to the original value. |\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [name](#name:kotlin.String) The String to use in place of the original int value. |\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [outputIf](#outputIf:kotlin.Boolean) Indicates whether to output the flag when the test is true, or false. |\n\nPublic constructors\n-------------------\n\n### FlagToString\n\nAdded in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nFlagToString(\n equals: Int, \n mask: Int, \n name: String, \n outputIf: Boolean)\n```\n\nDefines 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. \n**See Also**\n\n- [android.view.ViewDebug.ExportedProperty](/reference/kotlin/android/view/ViewDebug.ExportedProperty)\n\nProperties\n----------\n\n### equals\n\nAdded in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nval equals: Int\n```\n\nThe value to compare to the result of: `original value & `[mask()](#mask:kotlin.Int).\n\n| Return ||\n|----------------------------------------------------------------------------|---------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | An arbitrary value. |\n\n### mask\n\nAdded in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nval mask: Int\n```\n\nThe mask to apply to the original value.\n\n| Return ||\n|----------------------------------------------------------------------------|-------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | An arbitrary int value. |\n\n### name\n\nAdded in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nval name: String\n```\n\nThe String to use in place of the original int value.\n\n| Return ||\n|----------------------------------------------------------------------------------|-------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | An arbitrary non-null String. |\n\n### outputIf\n\nAdded in [API level 4](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nval outputIf: Boolean\n```\n\nIndicates whether to output the flag when the test is true, or false. Defaults to true."]]