vendredi 8 mai 2015

Call ActionBar-PullToRefresh.SetRefreshComplete from WebviewClient declared in another class

I have implemented Chris Banes ActionBar-PullToRefresh which is working, however when I refresh a page for a second time the load bar gets stuck on.

I have found I need to use the following line in order to stop it:

mPullToRefreshLayout.setRefreshComplete();

The problem is my WebViewClient is not created in the Fragment I'm using, but is instead in its own class in use by multiple fragments. Putting That line in the onPageFinished of my WebViewClient does not work as it does not know the mPullToRefreshLayout exists.

I was wondering if there is any way of making this call work?

Many thanks.

Aucun commentaire:

Enregistrer un commentaire