I’m working on a game for Android. To help implement it, my idea is to create a subclass of a view. I would then insert several instances of this class as children of the ma
Try this. Takes all views inside a parent layout & returns an array list of views.
public List getAllViews(ViewGroup layout){
List views = new ArrayList<>();
for(int i =0; i< layout.getChildCount(); i++){
views.add(layout.getChildAt(i));
}
return views;
}