Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OnRefreshListener getting triggered only once #12

Open
Parag2385 opened this issue Jul 6, 2020 · 4 comments
Open

OnRefreshListener getting triggered only once #12

Parag2385 opened this issue Jul 6, 2020 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@Parag2385
Copy link

Hello,

Thank you for this awesome library, it works just fine. but when I'm using RefreshbarLayout and RefreshHeaderView, the onRefreshListener is getting triggered only once, for the first time. After that on pulling it down, the loading view just stays there and does not get a callback.

Following is how I'm using it:

Layout:

    <com.todou.nestrefresh.RefreshBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/colorWhite"
        android:fitsSystemWindows="true">

        <com.todou.nestrefresh.RefreshHeaderView
            android:id="@+id/refresh_header_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:nr_layout_scrollFlags="flag_refresh_header" />

        <com.todou.nestrefresh.NRCollapsingToolbarLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:fitsSystemWindows="true"
            app:layout_scrollFlags="scroll|exitUntilCollapsed"
            app:nr_layout_scrollFlags="flag_collapse">

           

        </com.todou.nestrefresh.NRCollapsingToolbarLayout>

    </com.todou.nestrefresh.RefreshBarLayout>

In code:

    mRefreshListener = object : OnRefreshListener {
        override fun onRefresh() {
            mBinding.refreshHeaderView.stopRefresh()
            Log.e("CustomerWalletFragment", "onRefresh: ")
        }

    }

    mBinding.refreshHeaderView.setOnRefreshListener(mRefreshListener!!)

Is this bug? or am I doing something wrong?

Thanks again.

@ToDou
Copy link
Owner

ToDou commented Jul 7, 2020 via email

@ToDou
Copy link
Owner

ToDou commented Jul 7, 2020 via email

@ToDou ToDou added the bug Something isn't working label Jul 7, 2020
@ToDou ToDou self-assigned this Jul 7, 2020
@ToDou
Copy link
Owner

ToDou commented Jul 7, 2020

Fix in 0.0.8

@Parag2385
Copy link
Author

Yeah It's working fine now, thank you very much @ToDou

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants