Android - Can't hide progress bar

后端 未结 4 980
误落风尘
误落风尘 2021-01-21 05:19

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         


        
4条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-21 05:35

    I don't know how your code is written but had similar problem and resolved by removing the view object from declaration

    like

    mProductListProgressBar = (ProgressBar) mRoot.findViewById(R.id.product_list_progressbar);
    

    should be

    mProductListProgressBar = (ProgressBar) findViewById(R.id.product_list_progressbar);
    

    Try it and check

    Reason is the progress bar is on the top of every view in the hierarchy and it's not belong to any root view.

提交回复
热议问题