public final class TreeIterables
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
TreeIterables.ViewAndDistance
Represents the distance a given view is from the root view.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.Iterable<android.view.View> |
breadthFirstViewTraversal(android.view.View root)
Returns an iterable which iterates thru the provided view and its children in a
breadth-first, row-level-order traversal.
|
static java.lang.Iterable<android.view.View> |
depthFirstViewTraversal(android.view.View root)
Returns an iterable which iterates thru the provided view and its children in a
depth-first, in-order traversal.
|
static java.lang.Iterable<TreeIterables.ViewAndDistance> |
depthFirstViewTraversalWithDistance(android.view.View root)
Creates an iterable that traverses the tree formed by the given root.
|
public static java.lang.Iterable<TreeIterables.ViewAndDistance> depthFirstViewTraversalWithDistance(android.view.View root)
root
- the root view to track from.public static java.lang.Iterable<android.view.View> depthFirstViewTraversal(android.view.View root)
root
- the non-null, root view.public static java.lang.Iterable<android.view.View> breadthFirstViewTraversal(android.view.View root)
root
- the non-null, root view.