omadahealth / SwipyRefreshLayout

A SwipeRefreshLayout extension that allows to swipe in both direction
MIT License
963 stars 218 forks source link

not work with coordinatorLayout #33

Closed chenqian-dev closed 8 years ago

chenqian-dev commented 8 years ago

hello , Im using this with CoordinatorLayout

<android.support.design.widget.CoordinatorLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

    <android.support.design.widget.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">

        <LinearLayout
            android:id="@+id/ll_info"
            app:layout_scrollFlags="scroll|exitUntilCollapsed|snap"
            android:background="@android:color/white"
            android:orientation="horizontal"
            android:gravity="center_vertical"
            android:padding="@dimen/padding_horizontal"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <ImageView
                android:src="@mipmap/ic_arrow_right_grey"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content" />

        </LinearLayout>

        <android.support.design.widget.TabLayout
            android:id="@+id/tab"
            android:background="@android:color/white"
            app:tabTextColor="@color/color_text_grey"
            app:tabSelectedTextColor="@color/colorPrimary"
            app:tabIndicatorColor="@color/colorPrimary"
            app:tabIndicatorHeight="2dp"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />

    </android.support.design.widget.AppBarLayout>

    <android.support.v4.view.ViewPager
        android:id="@+id/view_pager"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</android.support.design.widget.CoordinatorLayout>

in viewpager xml

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">

<com.xisz.mybaby.util.refresh.SwipyRefreshLayout
    android:id="@+id/swipe_refresh_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <android.support.v7.widget.RecyclerView
        android:id="@+id/rv"
        android:padding="5dp"
        android:clipToPadding="false"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>

</com.xisz.mybaby.util.refresh.SwipyRefreshLayout>

</FrameLayout>

android the SwipyRefreshLayoutDirection is BOTH

there is some problem when I scroll down ,it begin to refresh,but what I want is let the coordinatorLayout to scroll my header down,please check it ,thanks!

oliveeyay commented 8 years ago

We do not support CoordinatorLayout yet. If you want you can do a pull request, if you find a solution by forking the library and handling this specific use case.

Thank you in advance.

Cheers,

Olivier