void (View view) { if (view instanceof ImageView) { Image image = ((ImageView)view).getImage(); if (image != null) { myImages.add(image); } } int childCount = view.getViewCount(); for (int i = 0; i < childCount; i++) { collectImages(view.getView(i)); } }