List of utility methods to do ViewGroup Get
ArrayList | getSubviewsTree(ViewGroup parentView, Class> classOfSubviews) get Subviews Tree ArrayList<View> result = new ArrayList<View>(); getSubviewsTree(parentView, classOfSubviews, result); return result; |
void | getSubviewsTree(ViewGroup parentView, Class> classOfSubviews, ArrayList 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); |