Skip to content

Instantly share code, notes, and snippets.

@mb-14
Last active November 19, 2016 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mb-14/e89eb6835bfa8f681980f5f58d030d38 to your computer and use it in GitHub Desktop.
Save mb-14/e89eb6835bfa8f681980f5f58d030d38 to your computer and use it in GitHub Desktop.
Hide loader onPageStart
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