mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
Fix webview navigation close button not exiting webview
Also fix webview's nav tooltip text
This commit is contained in:
parent
ef5a05050d
commit
5ce3610b45
2 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue