瀏覽代碼

Show URL in Webview subtitle

arkon 5 年之前
父節點
當前提交
1b0c13a417
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt

+ 3 - 0
app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt

@@ -57,6 +57,8 @@ class WebViewActivity : BaseActivity() {
             val url = intent.extras!!.getString(URL_KEY) ?: return
             val headers = source.headers.toMultimap().mapValues { it.value.getOrNull(0) ?: "" }
 
+            supportActionBar?.subtitle = url
+
             webview.settings.javaScriptEnabled = true
             webview.settings.userAgentString = source.headers["User-Agent"]
 
@@ -81,6 +83,7 @@ class WebViewActivity : BaseActivity() {
                     super.onPageFinished(view, url)
                     invalidateOptionsMenu()
                     title = view?.title
+                    supportActionBar?.subtitle = url
                     swipe_refresh.isEnabled = true
                     swipe_refresh?.isRefreshing = false
                 }