findChild

open fun findChild(predicate: Predicate<View>): ImmutableList<View>

Find a view in the hierarchy for which the given predicate is true

Return

null if no such view is found, or a list showing the path in the hierarchy to the view for which the predicate holds

Parameters

predicate

the predicate to find a view upholding


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

Return

null if no such view is found, or a list showing the path in the hierarchy to the view for which the predicate holds

Parameters

predicate

the predicate to find a view upholding

shouldCheckChildren

a predicate to decide whether to