77.8 Loading the Web Page into the WebView
Before the web page can be printed, it needs to be loaded into the WebView instance. For the purposes of this tutorial, this will be performed by a call to the loadUrl() method of the WebView instance, which will be placed in a method named configureWebView() and called from within the onStart() method of the MainActivity class. Edit the MainActivity.java file, therefore, and modify it as follows:
package com.ebookfrenzy.webprint;
.
.
import android.view.Menu;
import android.view.MenuItem;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.webkit.WebResourceRequest;
public class MainActivity extends AppCompatActivity {
.
.
@Override
protected void onStart() {
super.onStart();
configureWebView();
&...