Stay organized with collections
Save and categorize content based on your preferences.
CapturedViewProperty
@Target([AnnotationTarget.FIELD, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER]) class CapturedViewProperty
This annotation can be used to mark fields and methods to be dumped when the view is captured. Methods with this annotation must have no arguments and must return a valid type of data.
Summary
Public constructors |
This annotation can be used to mark fields and methods to be dumped when the view is captured.
|
Properties |
Boolean |
When retrieveReturn is true, we need to retrieve second level methods e.
|
Public constructors
CapturedViewProperty
CapturedViewProperty(retrieveReturn: Boolean)
This annotation can be used to mark fields and methods to be dumped when the view is captured. Methods with this annotation must have no arguments and must return a valid type of data.
Properties
retrieveReturn
val retrieveReturn: Boolean
When retrieveReturn is true, we need to retrieve second level methods e.g., we need myView.getFirstLevelMethod().getSecondLevelMethod() we will set retrieveReturn = true on the annotation of myView.getFirstLevelMethod()
Return |
Boolean |
true if we need the second level methods |
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.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# ViewDebug.CapturedViewProperty\n\nAdded in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nCapturedViewProperty\n====================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/view/ViewDebug.CapturedViewProperty \"View this page in Java\") \n\n```\n@Target([AnnotationTarget.FIELD, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER]) class CapturedViewProperty\n```\n\n|--------------------------------------------------|\n| [android.view.ViewDebug.CapturedViewProperty](#) |\n\nThis annotation can be used to mark fields and methods to be dumped when the view is captured. Methods with this annotation must have no arguments and must return a valid type of data.\n\nSummary\n-------\n\n| Public constructors ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [CapturedViewProperty](#CapturedViewProperty(kotlin.Boolean))`(`retrieveReturn:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` This annotation can be used to mark fields and methods to be dumped when the view is captured. |\n\n| Properties ||\n|------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [retrieveReturn](#retrieveReturn:kotlin.Boolean) When retrieveReturn is true, we need to retrieve second level methods e. |\n\nPublic constructors\n-------------------\n\n### CapturedViewProperty\n\nAdded in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nCapturedViewProperty(retrieveReturn: Boolean)\n```\n\nThis annotation can be used to mark fields and methods to be dumped when the view is captured. Methods with this annotation must have no arguments and must return a valid type of data.\n\nProperties\n----------\n\n### retrieveReturn\n\nAdded in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nval retrieveReturn: Boolean\n```\n\nWhen retrieveReturn is true, we need to retrieve second level methods e.g., we need myView.getFirstLevelMethod().getSecondLevelMethod() we will set retrieveReturn = true on the annotation of myView.getFirstLevelMethod()\n\n| Return ||\n|------------------------------------------------------------------------------------|------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | true if we need the second level methods |"]]