SwipeRefreshLayout - Pull From Bottom

给你一囗甜甜゛ 提交于 2019-11-28 08:57:10
AndreyICE

SwipeRefreshLayout from Android Support Library version 21 does not support pull from bottom. I have made modification SwipeRefreshLayoutBottom with is based on original SwipeRefreshLayout code. It is fully based on original Google code with just inversion of coordinates and overridden implementation of canChildScrollDown method. All modification are marked as TODO.

Bitbucker repository

Use this great library: OrangeGangsters SwipyRefreshLayout

So you can swipe both from top and bottom and supports API 9+.

Marie Amida

I've encountered the same problem and I have solved it with a combination of swipeRefreshLayout and a touch event in my list. Here is the link:

https://stackoverflow.com/a/41701320/6144027

Library omadahealth/SwipyRefreshLayout must be the answer for your case.

Below Codes make your Recycler view pull up from bottom to refresh :

<com.omadahealth.github.swipyrefreshlayout.library.SwipyRefreshLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/refresh_layout"
    style="@style/View_MatchParent"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom"
    app:srl_direction="bottom"
    >

    <android.support.v7.widget.RecyclerView
        android:id="@+id/recyclerview"
        style="@style/View_MatchParent"
        android:layout_height="wrap_content"
        android:clipToPadding="true"
        app:layout_behavior="@string/appbar_scrolling_view_behavior"/>

</com.omadahealth.github.swipyrefreshlayout.library.SwipyRefreshLayout>

No, you can't do that with SwipeRefreshLayout. You need to implement your own layout, which is not that hard.

Check this http://erikw.eu/open-source-android-pull-to-refresh-library/ and this http://www.oodlestechnologies.com/blogs/Implementing-Pull-to-refresh-(like-in-Facebook-mobile-app)-for-ANDROID-using-Titanium

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!