This problem fixed This problem fixed
Add a close button and on its click set: webview. setVisibility(View. INVISIBLE); webview.
It was deprecated in API level 21.
WebView is a view that display web pages inside your application. You can also specify HTML string and can show it inside your application using WebView. WebView makes turns your application to a web application.
If you can redirect on button click something
then
onClick="document.location.href='http://exitme';".
Then in your shouldOverrideUrlLoading method, you can intercept that URL and exit the app.
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url)
{
if (url.contains("http://exitme")
finish(); // close activity
else
view.loadUrl(url);
return true;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With