ViewTree
class ViewTree
This is a helper class to allow asserting on view trees and recursively verify predicates on its nodes within the narrow abilities that Robolectric affords us.
Functions
Link copied to clipboard
Find a view in the hierarchy for which the given predicate is true
open fun findChild(predicate: Predicate<View>, shouldCheckChildren: Predicate<in ViewGroup>): ImmutableList<View>
Find a view in the hierarchy for which the given predicate is true, while only check children of nodes as directed by the additional shouldCheckChildren predicate
Link copied to clipboard
Generates a string describing the views tree using the views' toString methods and an extra information function.
Generates a string describing the views tree using the views' toString methods and an extra information function with formatting starting at the given depth.