update readme

This commit is contained in:
Max 2018-09-11 01:20:27 +02:00 committed by GitHub
parent 290bcbbc0d
commit 1141d137a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,14 +10,14 @@ If you want to create an app that displays the contents of a remote website
1. uncomment lines **30** and **31** in `MainActivity.java` and replace `http://example.com` with your remote source 1. uncomment lines **30** and **31** in `MainActivity.java` and replace `http://example.com` with your remote source
``` ```java
mWebView.loadUrl("http://example.com"); mWebView.loadUrl("http://example.com");
mWebView.setWebViewClient(new MyWebViewClient()); mWebView.setWebViewClient(new MyWebViewClient());
``` ```
2. open the `MyWebViewClient.java` file and replace `example.com` on line **12** with your custom hostname 2. open the `MyWebViewClient.java` file and replace `example.com` on line **12** with your custom hostname
``` ```java
if (Uri.parse(url).getHost().endsWith("example.com")) { if (Uri.parse(url).getHost().endsWith("example.com")) {
``` ```
@ -27,7 +27,7 @@ If you want to create a local HTML5 android app
1. uncomment line **34** in `MainActivity.java` 1. uncomment line **34** in `MainActivity.java`
``` ```java
mWebView.loadUrl("file:///android_asset/index.html"); mWebView.loadUrl("file:///android_asset/index.html");
``` ```