So I\'ve checked the other questions to hide a progress bar but all seem to suggest doing what I\'m already doing.
I\'m trying to use
mProductListProgres
The problem with this behaviour usually happens when your view which you try to hide is needed / referenced by someone else.
In your case, as you mentioned in the comments, you use mProductListProgressBar
for setEmptyView()
of your GridView
.
Another possibility of running into similar troubles when there other views in your relative container layout which set their position relatively to your mProductListProgressBar
. This setting could be either in the code or in .xml.
Please make sure you don't have any of above and View.GONE should work fine.
As for setEmptyView() - it is only used to show something meaningful to the user when your adapter is empty. I recommend just setting up simple Layout for that with, say, TextView "no items"
, in the middle, and pass it to setEmptyView()
Hope that helps.