enable-file-upload-in-webview-android-studio
enable-file-upload-in-webview-android-studio copied to clipboard
Loading Message
If the page gives an error while loading, let's raise a toast warning :)
`webView.setWebViewClient(new xWebViewClient() {
// If it gives an error
public void onReceivedError(WebView view, int errorCode,
String description, String failingUrl) {
Toast.makeText(getApplicationContext(), "Uygulama Açılamadı!",
Toast.LENGTH_SHORT).show();
}
// When the page is finished loading, we close the progressDialog.
@Override
public void onPageFinished(WebView view, String url) {
super.onPageFinished(view, url);
if (progressDialog.isShowing())
progressDialog.dismiss();
}
});`