Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
slymax committed Jan 22, 2019
1 parent 5c8b528 commit 37ec256
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ If you want to create an app that displays the content of a remote website
mWebView.setWebViewClient(new MyWebViewClient());
```

2. open the `MyWebViewClient.java` file and replace `example.com` on line **14** with your custom hostname
2. open the `MyWebViewClient.java` file and replace `example.com` on line **15** with your custom hostname

```java
if (Objects.requireNonNull(Uri.parse(url).getHost()).endsWith("example.com")) {
Expand Down
1 change: 1 addition & 0 deletions app/src/main/java/com/example/app/MyWebViewClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

class MyWebViewClient extends WebViewClient {

@SuppressWarnings("deprecation")
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
if (Objects.requireNonNull(Uri.parse(url).getHost()).endsWith("example.com")) {
Expand Down

0 comments on commit 37ec256

Please sign in to comment.