Swipe down to refresh is available in other activities.

This commit is contained in:
Alex Ning
2019-11-19 16:23:45 +08:00
parent 47b57fd50f
commit ca81ec49cf
13 changed files with 178 additions and 127 deletions

View File

@@ -38,22 +38,19 @@
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" >
<com.lsjwzh.widget.materialloadingprogressbar.CircleProgressBar
android:id="@+id/progress_bar_view_message_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
app:mlpb_progress_stoke_width="3dp"
app:mlpb_progress_color="@color/colorAccent"
app:mlpb_background_color="?attr/circularProgressBarBackground" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view_view_message_activity"
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/swipe_refresh_layout_view_message_activity"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"/>
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view_view_message_activity"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"/>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
<LinearLayout
android:id="@+id/fetch_messages_info_linear_layout_view_message_activity"

View File

@@ -33,19 +33,19 @@
</com.google.android.material.appbar.AppBarLayout>
<ProgressBar
android:id="@+id/progress_bar_view_post_detail_activity"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="gone" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view_view_post_detail"
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/swipe_refresh_layout_view_post_detail_activity"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view_view_post_detail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
<LinearLayout
android:id="@+id/fetch_post_info_linear_layout_view_post_detail_activity"

View File

@@ -7,22 +7,18 @@
android:id="@+id/coordinator_layout_comments_listing_fragment"
tools:application="ml.docilealligator.infinityforreddit.Fragment.CommentsListingFragment">
<com.lsjwzh.widget.materialloadingprogressbar.CircleProgressBar
android:id="@+id/progress_bar_comments_listing_fragment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
app:mlpb_progress_stoke_width="3dp"
app:mlpb_progress_color="@color/colorAccent"
app:mlpb_background_color="?attr/circularProgressBarBackground"
android:layout_gravity="center_horizontal"/>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view_comments_listing_fragment"
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/swipe_refresh_layout_view_comments_listing_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false" />
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view_comments_listing_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
<LinearLayout
android:id="@+id/fetch_comments_info_linear_layout_comments_listing_fragment"

View File

@@ -8,8 +8,7 @@
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/swipe_refresh_layout_post_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/backgroundColor">
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view_post_fragment"

View File

@@ -7,22 +7,18 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:application=".SubredditListingFragment">
<com.lsjwzh.widget.materialloadingprogressbar.CircleProgressBar
android:id="@+id/progress_bar_subreddit_listing_fragment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
app:mlpb_progress_stoke_width="3dp"
app:mlpb_progress_color="@color/colorAccent"
app:mlpb_background_color="?attr/circularProgressBarBackground"
android:layout_gravity="center_horizontal"/>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view_subreddit_listing_fragment"
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/swipe_refresh_layout_subreddit_listing_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false" />
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view_subreddit_listing_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
<LinearLayout
android:id="@+id/fetch_subreddit_listing_info_linear_layout_subreddit_listing_fragment"

View File

@@ -7,22 +7,18 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:application=".UserListingFragment">
<com.lsjwzh.widget.materialloadingprogressbar.CircleProgressBar
android:id="@+id/progress_bar_user_listing_fragment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
app:mlpb_progress_stoke_width="3dp"
app:mlpb_progress_color="@color/colorAccent"
app:mlpb_background_color="?attr/circularProgressBarBackground"
android:layout_gravity="center_horizontal"/>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view_user_listing_fragment"
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/swipe_refresh_layout_user_listing_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false" />
android:layout_height="match_parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler_view_user_listing_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
<LinearLayout
android:id="@+id/fetch_user_listing_info_linear_layout_user_listing_fragment"

View File

@@ -3,6 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardBackgroundColor="?attr/cardViewBackgroundColor"
xmlns:tools="http://schemas.android.com/tools">
<LinearLayout