I have a many activities with many different widgets, from textviews to buttons. Most of these activities save entered data to a server.
While the data is transfering the user may not press a button.
One solution i found is a non general one: put all buttons that need to be disabled in button array and loop through that array and disable/enable the buttons.
Problem here is i have to define such button array for all activities and when i add a button in layout xml in also need to add the new button to the array. This can become a bit boring.
When using swing i just put up a glasspane in front of the window. But android doesn't know such a thing. So i was wondering if i can loop through the widgets defined in the layout xml.
findViewById returns a object (a widget) but i was looking for something like getviewcount() and getchildview(int index). This way i could loop through the widgets, see if they are a button and disable/enable.
But i couldn't find such functions Is there maybe something i overlooked or is there another way to accomplish this?