I want to show a progress bar at the end of the list when loading more data using RecyclerView. Just for the sake of the test I set it to always visible but it's not visible at all. I tried to put it inside a LinearLayout but that wasn't helpful.
Here is my fragment:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_gravity="center_vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:minWidth="25px"
android:minHeight="25px">
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/latestnews_swipe_refresh_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView_latestnews"
android:scrollbars="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</android.support.v4.widget.SwipeRefreshLayout>
<ProgressBar
android:id="@+id/loadmore_progressBar"
android:layout_width="45dp"
android:layout_height="45dp"
android:indeterminate="true"
android:layout_gravity="center"
android:visibility="visible" />
</LinearLayout>
Fragment is loaded inside a viewpager:
<LinearLayout
android:id="@+id/content_frame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.design.widget.TabLayout
android:id="@+id/sliding_tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<android.support.v4.view.ViewPager
android:id="@+id/viewpager"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>