This repository was archived by the owner on Feb 8, 2025. It is now read-only.
Webview_MainActivity.xml #233
Nandani321
started this conversation in
Show and tell
Replies: 1 comment
-
Dude what's the deal¿ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.webkit.WebView
import android.webkit.WebViewClient
class MainActivity : AppCompatActivity() {
lateinit var mWebView : WebView
override fun onCreate(savedInstanceState:Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
}
override fun onBackPressed() {
if(mWebView.canGoBack())
{
mWebView.goBack()
}
else
{
super.onBackPressed()
}
}
}
Beta Was this translation helpful? Give feedback.
All reactions