Search code examples
androidandroid-view

Example usage for ContentLoadingProgressBar


I just found the ContentLoadingProgressBar class from the Android developer site. I searched but couldn't find any usage or explanation for the class. I've listed down a few questions on the class and it would be great if someone answers them.

  1. How is it different from ProgressBar?
  2. Should we show/hide the ProgressBar ourself?
  3. Styling the ProgressBar?

https://developer.android.com/reference/android/support/v4/widget/ContentLoadingProgressBar.html


Solution

  • I had tried this :

    <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" />
    

    And it works on Android 5.0. I think the style matters after my test.

    And the display effect of this widget depends on the Theme of your App, I'm afraid.