Last active
November 19, 2016 13:27
-
-
Save mb-14/e89eb6835bfa8f681980f5f58d030d38 to your computer and use it in GitHub Desktop.
Hide loader onPageStart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int count = 0; | |
webview.setWebViewClient(new WebViewClient(){ | |
@Override | |
public boolean shouldOverrideUrlLoading(WebView view, String url) { | |
return false; | |
} | |
/** | |
* This is called usually in case of network errors | |
*/ | |
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { | |
razorpay.onError(2, description); | |
} | |
@Override | |
public void onPageStarted(WebView view, String url, Bitmap favicon) { | |
if(count++ == 2){ | |
/** | |
* HIDE YOUR LOADER HERE | |
*/ | |
} | |
razorpay.onPageStarted(view, url); | |
} | |
public void onPageFinished(WebView view, String url){ | |
razorpay.onPageFinished(view, url); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment