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

onRefresh() is not called when I force it with setRefreshing() #21

Closed
alebrot opened this issue Mar 7, 2013 · 3 comments
Closed

onRefresh() is not called when I force it with setRefreshing() #21

alebrot opened this issue Mar 7, 2013 · 3 comments

Comments

@alebrot
Copy link

alebrot commented Mar 7, 2013

I assume that it should be called but instead only the progress bar continues spinning.
It seems you have a bug in the method

public void setRefreshing(){
state = State.REFRESHING;
scrollTo(0, 0);
setUiRefreshing();
setHeaderPadding(0);

}

This method should be changed to:

public void setRefreshing(){
setState(State.REFRESHING);
scrollTo(0, 0);
setUiRefreshing();
setHeaderPadding(0);

}

By setting the state this way the onRefreshListener.onRefresh(); is called.

@erikwt
Copy link
Owner

erikwt commented Mar 8, 2013

Actually, setRefreshing(..) is supposed to only be an UI action. The use case for this is, for example, on application start. The service has already begun loading (manually) and the UI needs to be updated accordingly.

@alebrot
Copy link
Author

alebrot commented Mar 8, 2013

Thank you for the response, It would be nice to have a method that forces calling onRefresh().
Let's say setRefreshing() for UI and refresh() for real refreshing that includes UI refreshing as well.

@erikwt
Copy link
Owner

erikwt commented Mar 8, 2013

Thanks for your feedback, if there is more demand for this I will add it soon. Cheers!

@erikwt erikwt closed this as completed Mar 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants