Docs (4.0.0)
class Activity method

findViewContent

Searches the view hierarchy for view objects of the provided type.

findViewContent<T extends View>(type: ViewClass<T>): T[]

Summary

This method looks for matching view objects in the current view structure — including the activity’s view itself. If a component is an instance of the provided class, it’s added to the list. Components within matching components aren’t searched for further matches.

Parameters

  • type — A view class

Return value

An array with instances of the provided view class; may be empty but never undefined.

Related

  • class ActivityA class that represents a part of the application that can be activated when the user navigates to it.