Android Utililty Methods ViewGroup Get

List of utility methods to do ViewGroup Get

Description

The list of methods to do ViewGroup Get are organized into topic(s).

Method

ArrayListgetSubviewsTree(ViewGroup parentView, Class classOfSubviews)
get Subviews Tree
ArrayList<View> result = new ArrayList<View>();
getSubviewsTree(parentView, classOfSubviews, result);
return result;
voidgetSubviewsTree(ViewGroup parentView, Class classOfSubviews, ArrayList result)
get Subviews Tree
for (int i = 0; i < parentView.getChildCount(); i++) {
    View child = parentView.getChildAt(i);
    if (classOfSubviews.isAssignableFrom(child.getClass()))
        result.add(child);
    if (child instanceof ViewGroup)
        getSubviewsTree((ViewGroup) child, classOfSubviews, result);