Skip to content

Instantly share code, notes, and snippets.

@omayib
Created November 5, 2018 09:08
Show Gist options
  • Save omayib/9a49fd395e5d0cf28df723ed2e5acd05 to your computer and use it in GitHub Desktop.
Save omayib/9a49fd395e5d0cf28df723ed2e5acd05 to your computer and use it in GitHub Desktop.
class PrivacyPolicy : AppCompatActivity() {
val privacyPolicyUrl = "http://hepicar.com/privacy_policy.html"
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_privacy_policy)
title = "Privacy Policy"
val webViewClient = object :WebViewClient(){
override fun onPageStarted(view: WebView?, url: String?, favicon: Bitmap?) {
super.onPageStarted(view, url, favicon)
progressBar.visibility = View.VISIBLE
}
override fun onPageFinished(view: WebView?, url: String?) {
super.onPageFinished(view, url)
progressBar.visibility = View.GONE
}
}
webview_privacy_policy.webViewClient = webViewClient
webview_privacy_policy.loadUrl(privacyPolicyUrl)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment