fix:WebView登录 界面bug

pull/1842/head
Xwite 3 years ago
parent 1b0515ee90
commit 20f4f450e9
  1. 2
      app/src/main/java/io/legado/app/ui/browser/WebViewActivity.kt
  2. 2
      app/src/main/java/io/legado/app/ui/login/WebViewLoginFragment.kt
  3. 13
      app/src/main/res/menu/source_webview_login.xml

@ -69,7 +69,7 @@ class WebViewActivity : VMBaseActivity<ActivityWebViewBinding, WebViewModel>() {
R.id.menu_ok -> {
if (viewModel.sourceVerificationEnable) {
binding.titleBar.snackbar(R.string.ok)
activity?.finish()
finish()
}
}
}

@ -35,7 +35,7 @@ class WebViewLoginFragment : BaseFragment(R.layout.fragment_web_view_login) {
}
override fun onCompatCreateOptionsMenu(menu: Menu) {
menuInflater.inflate(R.menu.source_login, menu)
menuInflater.inflate(R.menu.source_webview_login, menu)
}
override fun onCompatOptionsItemSelected(item: MenuItem) {

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:ignore="AlwaysShowAction">
<item
android:id="@+id/menu_ok"
android:icon="@drawable/ic_check"
android:title="@string/ok"
app:showAsAction="always" />
</menu>
Loading…
Cancel
Save