Skip to content Skip to sidebar Skip to footer

Cannot Hide Progressbar Programmatically In Android

I am attempting to hide a ProgressBar after I load data to a ListView. However, the ProgressBar does not seem to be effected by the view change. I get no errors (activityIndicato

Solution 1:

Well, I think this is rather ridiculous, but here is how I fixed it.

In my xml for the ProgressBar, I added android:visibility="gone" to hide it by default. Then, in my code, I first told it to display (View.VISIBLE) before it tried getting the server list, then I told it to hide (View.GONE) after it was done. This worked (I could see the progress indicator while the data loaded, then it went away). So I suppose I couldn't get it to hide in the code because the code is not what forced it to be visible to begin with... That seems like a bug to me.

Post a Comment for "Cannot Hide Progressbar Programmatically In Android"