ContentLoadingProgressBar

ContentLoadingProgressBar

本文介绍了ContentLoadingProgressBar的实际用法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在浏览android的开发人员站点,发现一个名为 ContentLoadingProgressBar .通过看这节课,我想到了一些问题.如果有人回答我的问题,那就太好了.

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. It would be great if someone answers my questions.

  1. 普通ProgressBarContentLoadingProgressbar有什么区别?
  2. ContentLoadingProgressBar的实际用法是什么?
  3. 我们可以根据需要显示/隐藏此进度栏吗?

  1. What is the difference between Normal ProgressBar and ContentLoadingProgressbar?
  2. What is the practical usage of ContentLoadingProgressBar?
  3. Can we show/hide this progressbar according to our requirement?

如何为该ProgressBar自定义样式?

How can I custom style this progressBar?

感谢您对Advance的帮助.如果有人使用代码和示例对其进行解释,那将是很好的.谢谢.

Thanks for your help in Advance. It would be great if someone explain it using codes and examples. Thank you.

推荐答案

这是我的答案!

ContentLoadingProgressbar等待最短的时间被消散,然后在0.5秒内使用hide()进行显示,因此即使show()被调用,也可以在显示在屏幕上之前将其消灭.

ContentLoadingProgressbar waits a minimum time to be dismissed before showing using hide() like with-in 0.5 seconds.So even the show() gets called this can be dismissed before it appear on the screen.

它可以防止在幼稚"的实现中很快出现的闪烁现象.

It prevents very fast flickering stuff that you might see with "naive" implementations.

<android.support.v4.widget.ContentLoadingProgressBar
        android:id="@+id/address_looking_up"
        style="?android:attr/progressBarStyleLarge"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_horizontal"
        android:visibility="visible" />

使用android:theme替换样式 https://stackoverflow.com/a/38282149/5188159

这篇关于ContentLoadingProgressBar的实际用法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-18 16:47