Created
April 15, 2021 18:44
-
-
Save crystalz411/40a4bf6b11a0795fd77da11c8a9dfafe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setContentView(R.layout.activity_main) | |
setSupportActionBar(findViewById(R.id.toolbar)) | |
val myWebView = findViewById<WebView>(R.id.webView) | |
myWebView.webViewClient = object : WebViewClient() { | |
override fun shouldOverrideUrlLoading( | |
view: WebView?, | |
request: WebResourceRequest?): Boolean { | |
return false | |
} | |
} | |
myWebView.loadUrl("https://www.google.com") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment