Practical usage of ContentLoadingProgressBar

后端 未结 4 1516
死守一世寂寞
死守一世寂寞 2021-02-01 01:34

I was going through developer site of android and I found a class named ContentLoadingProgressBar. By seeing this class I come up with some questions in my mind

4条回答
  •  时光说笑
    2021-02-01 01:56

    According to the docs :

    ContentLoadingProgressBar implements a ProgressBar that waits a minimum time to be dismissed before showing. Once visible, the progress bar will be visible for a minimum amount of time to avoid "flashes" in the UI when an event could take a largely variable time to complete (from none, to a user perceivable amount)

    This clearly mentions its no different from a regular ProgressBar . Furthermore this is a UI tweak to be precise. ie ContentLoadingProgressBar wouldn't show up if hide() is called in less than 0.5s after executing show(), thus preventing from quick flickering in the UI . Hope it helps.

提交回复
热议问题