I have a listadapter as an inner class of my activity. Inside of the getView() I inflate a layout file which has a few different views inside of it. I save one of those views (a progress bar) to a
Map<String,ProgressBar> progBars
which is defined in my activity. Later I want to update the progress bar when I click a button. So I find the progress bar,
ProgressBar pb = progBars.get("key");
Now I specifically check
if(pb!=null)
and it is NOT null. I try to set the progress on it and nothing changes. BUT if I go to a new activity and then come back OR if I go back to the previous activity (back button) and then return to this one and I click the button the progress bar correctly updates to the value. This makes absolutely no sense to me. Any thoughts?