title: Android Kotlin - WebView shows blank page
body: <p>I have tried everything but still no luck. My webview always shows a blank screen.
  My main motive is to load pdf files from the server.</p>
  
  <p>activity_web_view.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      tools:context=".activities.WebViewActivity"&gt;
  
      &lt;WebView
          android:id="@+id/webView"
          android:layout_width="match_parent"
          android:layout_height="match_parent" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>WebViewActivity.kt</p>
  
  <pre><code>class WebViewActivity : AppCompatActivity() {
      private val url: String = "https://www.google.co.in/"
      override fun onCreate(savedInstanceState: Bundle?, persistentState: PersistableBundle?) {
          super.onCreate(savedInstanceState, persistentState)
          setContentView(R.layout.activity_web_view)
  
          initWebView()
          setWebClient()
          loadUrl(url)
  
      }
  
      @SuppressLint("SetJavaScriptEnabled")
      private fun initWebView() {
          webView.settings.javaScriptEnabled = true
          webView.settings.loadWithOverviewMode = true
          webView.settings.useWideViewPort = true
          webView.settings.domStorageEnabled = true
          webView.webViewClient = object : WebViewClient() {
              override
              fun onReceivedSslError(view: WebView?, handler: SslErrorHandler?, error: SslError?) {
                  handler?.proceed()
              }
          }
      }
  
      private fun setWebClient() {
          webView.webChromeClient = object : WebChromeClient() {
              override fun onProgressChanged(
                  view: WebView,
                  newProgress: Int
              ) {
                  super.onProgressChanged(view, newProgress)
              }
          }
      }
  
      private fun loadUrl(pageUrl: String) {
          webView.loadUrl(pageUrl)
      }
  }
  </code></pre>
  
  <p>Invocation from Main Activity</p>
  
  <pre><code> val intent = Intent(this, WebViewActivity::class.java)
                  startActivity(intent)
  </code></pre>
  
  <p>I don't know what I am doing wrong. Help is much appreciated.</p>
  
  <p>Thanks in advance.</p>