Android - ProgressBar setVisibility to GONE not working

后端 未结 5 2377
无人及你
无人及你 2021-02-20 08:59

I\'ve been adding a ProgressBar to the fragments in my app. I\'ve set it up to the two main fragments (used as tabs) as follows:

ProgressBar in

5条回答
  •  逝去的感伤
    2021-02-20 09:36

    It's probably due the fact that View.GONE will prevent the View from being drawn to the screen, while another View android:layout_align[POSITION] component may be defined to that View, so their position can't be calculated.

    View.INVISIBLE will work cause it just make it invisible, but the View is still there and other View can calculate their position if the align is set to it

提交回复
热议问题