Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ContentLoadingProgressBar is never shows

Tags:

I've replaced in my fragment simple ProgressBar with ContentLoadingProgressBar. Now fragment layout looks like this:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
            style="@style/simple_match_parent_style">

<android.support.v4.widget.ContentLoadingProgressBar
            android:id="@+id/progress"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"/>

<TextView
    android:id="@+id/txt_no_songs"
    android:text="@string/txt_no_songs"
    android:layout_centerInParent="true"
    style="@style/txt_no_songs"/>

<ListView
    android:id="@+id/list"
    android:fastScrollEnabled="true"
    android:divider="@null"
    style="@style/simple_match_parent_style"/>

</RelativeLayout>

I show this ProgressBar in onViewCreated:

@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    progressBar = (ContentLoadingProgressBar) view.findViewById(R.id.progress);
    progressBar.show();
    ...
}

For test purpose I've removed progressBar.hide() call to make ProgressBar appear in any case. But the problem is that my ContentLoadingProgressBar is never really shown.

Should I do something else to show ContentLoadingProgressBar? I didn't manage to find any relevant examples of using ContentLoadingProgressBar so any useful examples are also desirable. Thanks in advance.


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!