How to show ContentLoadingProgressBar with horizontal indeterminate style

I’m trying to achieve horizontal indeterminate style of progress bar with ContentLoadingProgressBar. Below is the xml layout

 <android.support.v4.widget.ContentLoadingProgressBar
                android:id="@+id/pbar_Cloud"
                style="?android:attr/progressBarStyleHorizontal"
                android:layout_width="match_parent"
                android:layout_height="10dp"
                android:layout_gravity="bottom"
                android:visibility="visible" />

The progress bar is displayed as empty horizontal line with no progress.
By setting

style="?android:attr/progressBarStyleLarge"

Circular indeterminate progress is shown fine. What am I missing, I have even tried

ContentLoadingProgressBar bar = (ContentLoadingProgressBar) findViewById(R.id.pbar_Cloud);
bar.setActivated(true);
bar.show();

Still no luck.


Source: android

Leave a Reply