Package com.castlabs.android.utils
Class ViewScanner
java.lang.Object
com.castlabs.android.utils.ViewScanner
Utility class to scan views in a ViewGroup
- Since:
- 4.2.2
- 
Method SummaryModifier and TypeMethodDescriptionstatic Collection<Pair<Integer,View>> scanComponentView(ViewGroup container, int viewId, Class viewClass) Scans the given ViewGroup to find aViewwith the provided id.
- 
Method Details- 
scanComponentViewpublic static Collection<Pair<Integer,View>> scanComponentView(@NonNull ViewGroup container, @IdRes int viewId, @NonNull Class viewClass) Scans the given ViewGroup to find aViewwith the provided id. Such View must be of the indicated Class. Otherwise aIllegalArgumentExceptionwill be thrown.- Parameters:
- container- the container where to look for the View
- viewId- the id the to-be-found View has
- viewClass- the- Classof the View to find
- Returns:
- a Collectioncontaining the View, or an empty one if not found.
 
 
-