-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebView.java
More file actions
30 lines (23 loc) · 819 Bytes
/
webView.java
File metadata and controls
30 lines (23 loc) · 819 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package com.example.readit;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import android.content.Intent;
import android.os.Bundle;
import android.webkit.WebView;
import android.webkit.WebViewClient;
public class webView extends AppCompatActivity {
Toolbar toolbar;
WebView webView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_web_view);
toolbar = findViewById(R.id.toolbar);
webView = findViewById(R.id.webView);
setSupportActionBar(toolbar);
Intent intent = getIntent();
String url = intent.getStringExtra("url");
webView.setWebViewClient(new WebViewClient());
webView.loadUrl(url);
}
}