Im facing one issue in Android 7.0 (moto g4) where im trying to load one url in the webview but it shows a blank white screen.It is working with Android M and below.
public class MainActivity extends Activity {
private String webviewURL="http://henmilholidayhomesgoa.com/player2/documentation/EULA.html";
private WebView wv;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
wv= (WebView) findViewById(R.id.webview);
wv.getSettings().setTextZoom(60);
wv.getSettings().setBuiltInZoomControls(true);
wv.getSettings().setJavaScriptEnabled(true);
wv.loadUrl(webviewURL);
}
}
NOTE:- The url mentioned in the code is not the actual url which unfortunately i cant share :(.Its an url with https. But the given url in the post actually working ,Please let me know if any other input are needed.Thanks in advance
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<WebView
android:id="@+id/webview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center" />
</RelativeLayout>

Try this sample code:
In this there is a webview and a progress bar.In this code url will be loaded as soon as progress bar disappears and if there is any link within the url it will open it as well in the webview.
Below is the java code:
Now below is the respective xml code:
Please check this code in android 7.0. Hope it helps you out !