Stay organized with collections
Save and categorize content based on your preferences.
class TreeIterables.ViewAndDistance
Represents the distance a given view is from the root view.
Summary
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-05-15 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-05-15 UTC."],[],[],null,["# TreeIterables.ViewAndDistance\n=============================\n\nArtifact: [androidx.test.espresso:espresso-core](/jetpack/androidx/releases/test-espresso) \n[View Source](https://cs.android.com/search?q=file:androidx/test/espresso/util/TreeIterables.java+class:androidx.test.espresso.util.TreeIterables.ViewAndDistance)\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/androidx/test/espresso/util/TreeIterables.ViewAndDistance \"View this page in Java\")\n\n\n```\nclass TreeIterables.ViewAndDistance\n```\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nRepresents the distance a given view is from the root view.\n\nSummary\n-------\n\n| ### Public properties |\n|-----------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------|\n| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [distanceFromRoot](/reference/kotlin/androidx/test/espresso/util/TreeIterables.ViewAndDistance#distanceFromRoot()) |\n| [View](https://developer.android.com/reference/android/view/View.html)`!` | [view](/reference/kotlin/androidx/test/espresso/util/TreeIterables.ViewAndDistance#view()) |\n\nPublic properties\n-----------------\n\n### distanceFromRoot\n\n```\nval distanceFromRoot: Int\n``` \n\n### view\n\n```\nval view: View!\n```"]]