Fix webview navigation close button not exiting webview

Also fix webview's nav tooltip text
This commit is contained in:
Jays2Kings 2022-05-16 16:35:31 -04:00
parent ef5a05050d
commit 5ce3610b45
2 changed files with 5 additions and 0 deletions

View file

@ -54,6 +54,10 @@ open class WebViewActivity : BaseWebViewActivity() {
binding.swipeRefresh.isEnabled = false
backPressedCallback = onBackPressedDispatcher.addCallback { backCallback() }
binding.toolbar.setNavigationOnClickListener {
backPressedCallback?.isEnabled = false
onBackPressedDispatcher.onBackPressed()
}
if (bundle == null) {
val source = sourceManager.get(intent.extras!!.getLong(SOURCE_KEY)) as? HttpSource ?: return
val url = intent.extras!!.getString(URL_KEY) ?: return

View file

@ -19,6 +19,7 @@
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
app:navigationContentDescription="@string/close"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorSurface"
android:theme="?attr/actionBarTheme"