[android-components](../index.md) / [mozilla.components.support.ktx.android.view](index.md) / [findViewInHierarchy](./find-view-in-hierarchy.md)

# findViewInHierarchy

`fun <ERROR CLASS>.findViewInHierarchy(predicate: (<ERROR CLASS>) -> `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`): <ERROR CLASS>?` [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/support/ktx/src/main/java/mozilla/components/support/ktx/android/view/View.kt#L109)

Finds the first a view in the hierarchy, for which the provided predicate is true.

