Skip to content

Commit

Permalink
Merge pull request #2 from pranaypatel512/master
Browse files Browse the repository at this point in the history
fix: Before refreshing SwipeRefreshLayout check it is not null
  • Loading branch information
TheFinestArtist committed Mar 16, 2016
2 parents b704d71 + 79654af commit 13c3cec
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ public class MyWebChromeClient extends WebChromeClient {

@Override
public void onProgressChanged(WebView view, int progress) {
if (swipeRefreshLayout == null)
return;

if (progress < 100)
swipeRefreshLayout.setRefreshing(true);

Expand Down Expand Up @@ -111,5 +114,6 @@ public boolean shouldOverrideUrlLoading(WebView view, String url) {
protected void onDestroy() {
super.onDestroy();
ButterKnife.unbind(this);
webview.destroy();
}
}

0 comments on commit 13c3cec

Please sign in to comment.