简体   繁体   中英

Android Pull To Refresh Demo On Fragment

I have implemented pull to refresh using an library from https://github.com/chrisbanes/Android-PullToRefresh but when i call the demo function(mylistview.demo()) on my listview object from my fragment,the function doesn't execute.

The demo function works when i call it from an onclicklistener so I think the problem has to do with the function being executed before the fragment is loaded. How can I solve this problem?

If you are making the call in OnCreate(), that is probably too early. Try calling it in OnStart() instead.

I can only assume where you are calling it since you haven't specified it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM