omadahealth / SwipyRefreshLayout

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

Issues when using within a NestedScrollView #50

Closed grote closed 8 years ago

grote commented 8 years ago

RecyclerViews can now be used with height="wrap_content" within a NestedScrollView to scroll the entire layout. Unfortunately, this doesn't work when the RecyclerView is within a SwipyRefreshLayout. Looks like the height calculation breaks and is 0.

Here's an example:

<android.support.v4.widget.NestedScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <com.orangegangsters.github.swipyrefreshlayout.library.SwipyRefreshLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <android.support.v7.widget.RecyclerView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"/>

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

</android.support.v4.widget.NestedScrollView>
oliveeyay commented 8 years ago

Hello @grote

Unfortunately the SwipyRefreshLayout is not meant to be used that way yet. If you find a solution, don't hesitate to do a pull request.

Cheers,

Olivier

johnernest02 commented 7 years ago

Did you find a way around this?

grote commented 7 years ago

No, unfortunately not. Would still be interested in solutions/workarounds.