fix commen, add description

This commit is contained in:
Denis Markwald 2021-05-25 18:22:44 +02:00
parent dc0e6d63cf
commit 18bdc27d59
2 changed files with 7 additions and 1 deletions

View File

@ -124,6 +124,12 @@ open class BaseWebView @JvmOverloads constructor(
binding.webView.onWebViewDisplayedContent = action
}
/**
* loadWithOverviewMode loads the WebView completely zoomed out
* useWideViewPort sets page size to fit screen
* setInitialScale(1) prevents horizontal scrolling when
* page has horizontal paddings
*/
@SuppressLint("SetJavaScriptEnabled")
open fun setWebViewPreferences() {
binding.webView.apply {

View File

@ -63,7 +63,7 @@ open class BaseWebViewClient(private val callback: WebViewCallback, private val
}
/**
* onReceivedError don't calls when url is "about:blank" (url string isBlank)
* onReceivedError isn't called when url is "about:blank" (url string isBlank)
*/
override fun onReceivedError(view: WebView, request: WebResourceRequest, error: WebResourceError) {
if (error.errorCode != -10) {