is there a way to get every view that is inside my activity?
I have over 200 views including buttons, and images, so i want to be able to access them by using a loop
for example something like
for (View v : this)
{
//do something with the views
//depending on the types (button, image , etc)
}
Get your root
View, cast it to aViewGroup, callgetChildCount()andgetChildAt(), and recurse as needed.That is a rather large number of
Views.