mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-10 20:57:24 +01:00
Show URL in Webview subtitle
This commit is contained in:
parent
abb2e231f6
commit
1b0c13a417
@ -57,6 +57,8 @@ class WebViewActivity : BaseActivity() {
|
|||||||
val url = intent.extras!!.getString(URL_KEY) ?: return
|
val url = intent.extras!!.getString(URL_KEY) ?: return
|
||||||
val headers = source.headers.toMultimap().mapValues { it.value.getOrNull(0) ?: "" }
|
val headers = source.headers.toMultimap().mapValues { it.value.getOrNull(0) ?: "" }
|
||||||
|
|
||||||
|
supportActionBar?.subtitle = url
|
||||||
|
|
||||||
webview.settings.javaScriptEnabled = true
|
webview.settings.javaScriptEnabled = true
|
||||||
webview.settings.userAgentString = source.headers["User-Agent"]
|
webview.settings.userAgentString = source.headers["User-Agent"]
|
||||||
|
|
||||||
@ -81,6 +83,7 @@ class WebViewActivity : BaseActivity() {
|
|||||||
super.onPageFinished(view, url)
|
super.onPageFinished(view, url)
|
||||||
invalidateOptionsMenu()
|
invalidateOptionsMenu()
|
||||||
title = view?.title
|
title = view?.title
|
||||||
|
supportActionBar?.subtitle = url
|
||||||
swipe_refresh.isEnabled = true
|
swipe_refresh.isEnabled = true
|
||||||
swipe_refresh?.isRefreshing = false
|
swipe_refresh?.isRefreshing = false
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user