mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2026-12-05 16:22:31 -08:00
fix: Entry validation button not accessible with the keyboard open #1770
This commit is contained in:
1 parent
f50a6a8416
commit
ffa32a5501
4 files changed
+56
-50
No files matched your search
@@ -179,7 +179,7 @@ class EntryEditActivity : DatabaseLockActivity(),
|
||||
|
||||
// To apply fit window with transparency
|
||||
setTransparentNavigationBar(applyToStatusBar = true) {
|
||||
container?.applyWindowInsets(WindowInsetPosition.TOP)
|
||||
container?.applyWindowInsets(WindowInsetPosition.TOP_BOTTOM_IME)
|
||||
footer?.applyWindowInsets(WindowInsetPosition.BOTTOM)
|
||||
}
|
||||
|
||||
|
||||
@@ -350,9 +350,19 @@ fun View.applyWindowInsets(position: WindowInsetPosition = WindowInsetPosition.B
|
||||
}
|
||||
}
|
||||
WindowInsetPosition.BOTTOM -> {
|
||||
val imeHeight = windowInsets.getInsets(WindowInsetsCompat.Type.ime()).bottom
|
||||
if (view.layoutParams is ViewGroup.MarginLayoutParams) {
|
||||
view.updateLayoutParams<ViewGroup.MarginLayoutParams> {
|
||||
bottomMargin = insets.bottom
|
||||
bottomMargin = if (imeHeight > 1) 0 else insets.bottom
|
||||
}
|
||||
}
|
||||
}
|
||||
WindowInsetPosition.TOP_BOTTOM_IME -> {
|
||||
val imeHeight = windowInsets.getInsets(WindowInsetsCompat.Type.ime()).bottom
|
||||
if (view.layoutParams is ViewGroup.MarginLayoutParams) {
|
||||
view.updateLayoutParams<ViewGroup.MarginLayoutParams> {
|
||||
topMargin = insets.top
|
||||
bottomMargin = if (imeHeight > 1) imeHeight else 0
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -363,5 +373,5 @@ fun View.applyWindowInsets(position: WindowInsetPosition = WindowInsetPosition.B
|
||||
}
|
||||
|
||||
enum class WindowInsetPosition {
|
||||
TOP, BOTTOM, LEGIT_TOP
|
||||
TOP, BOTTOM, LEGIT_TOP, TOP_BOTTOM_IME
|
||||
}
|
||||
Reference in new issue
Block a user