This questions asked multiply times ,but I have never find the clear answer and please do not down vote, If the ViewStub is measured 0 and we can inflate view when we needed, For the first time to show the view(progress) of ViewStub we inflate it, and when we want to hide it we set Visibility.GONE, and then we need it ,we set Visibility.VISIBLE. I want to understand the purpose of viewStub if for further use we set visibility VISIBLE/GONE and besides that if the height of ViewStub is 0, the height of View with Visibility GONE is 0 as well, I mean there is no inflation.