mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2026-12-05 00:02:27 -08:00
fix: Keyboard view update #2539
This commit is contained in:
6 files changed
+31
-24
No files matched your search
@@ -1,5 +1,6 @@
|
||||
KeePassDX(4.4.4)
|
||||
* Fix back to previous keyboard #2529
|
||||
* Fix return to previous keyboard #2529
|
||||
* Fix keyboard view update #2539
|
||||
|
||||
KeePassDX(4.4.3)
|
||||
* Fix a Passkey reference #2554
|
||||
|
||||
+3
-2
@@ -661,8 +661,9 @@ public class KeyboardView extends View implements View.OnClickListener {
|
||||
}
|
||||
|
||||
private void onBufferDraw() {
|
||||
if (mBuffer == null || mKeyboardChanged) {
|
||||
if (mBuffer == null || mKeyboardChanged &&
|
||||
if (mBuffer == null || mKeyboardChanged ||
|
||||
(mBuffer.getWidth() != getWidth() || mBuffer.getHeight() != getHeight())) {
|
||||
if (mBuffer == null ||
|
||||
(mBuffer.getWidth() != getWidth() || mBuffer.getHeight() != getHeight())) {
|
||||
// Make sure our bitmap is at least 1x1
|
||||
final int width = Math.max(1, getWidth());
|
||||
|
||||
+21
-17
@@ -95,6 +95,7 @@ class MagikeyboardService : InputMethodService(),
|
||||
private var mDatabaseTaskProvider: DatabaseTaskProvider? = null
|
||||
private var mDatabase: ContextualDatabase? = null
|
||||
|
||||
private var rootView: View? = null
|
||||
private var keyboardView: KeyboardView? = null
|
||||
private var entryContainer: View? = null
|
||||
private var databaseText: TextView? = null
|
||||
@@ -228,20 +229,21 @@ class MagikeyboardService : InputMethodService(),
|
||||
|
||||
override fun onCreateInputView(): View {
|
||||
|
||||
val rootKeyboardView = layoutInflater.inflate(R.layout.keyboard_container, null)
|
||||
entryContainer = rootKeyboardView.findViewById(R.id.magikeyboard_entry_container)
|
||||
entryListView = rootKeyboardView.findViewById(R.id.magikeyboard_entry_list)
|
||||
databaseText = rootKeyboardView.findViewById(R.id.magikeyboard_database_text)
|
||||
databaseColorView = rootKeyboardView.findViewById(R.id.magikeyboard_database_color)
|
||||
containerPackageText = rootKeyboardView.findViewById(R.id.magikeyboard_container_package)
|
||||
containerShareText = rootKeyboardView.findViewById(R.id.magikeyboard_share_browser)
|
||||
shareBrowserText = rootKeyboardView.findViewById(R.id.magikeyboard_share_browser_text)
|
||||
packageText = rootKeyboardView.findViewById(R.id.magikeyboard_package_text)
|
||||
appIdIcon = rootKeyboardView.findViewById(R.id.magikeyboard_app_id_icon)
|
||||
webDomainIcon = rootKeyboardView.findViewById(R.id.magikeyboard_web_domain_icon)
|
||||
keyboardView = rootKeyboardView.findViewById(R.id.magikeyboard_view)
|
||||
screenshotModeView = rootKeyboardView.findViewById(R.id.screenshot_mode_banner)
|
||||
timeoutProgressBar = rootKeyboardView.findViewById(R.id.magikeyboard_timeout_progress)
|
||||
rootView = layoutInflater.inflate(R.layout.keyboard_container, null)
|
||||
val root = rootView!!
|
||||
entryContainer = root.findViewById(R.id.magikeyboard_entry_container)
|
||||
entryListView = root.findViewById(R.id.magikeyboard_entry_list)
|
||||
databaseText = root.findViewById(R.id.magikeyboard_database_text)
|
||||
databaseColorView = root.findViewById(R.id.magikeyboard_database_color)
|
||||
containerPackageText = root.findViewById(R.id.magikeyboard_container_package)
|
||||
containerShareText = root.findViewById(R.id.magikeyboard_share_browser)
|
||||
shareBrowserText = root.findViewById(R.id.magikeyboard_share_browser_text)
|
||||
packageText = root.findViewById(R.id.magikeyboard_package_text)
|
||||
appIdIcon = root.findViewById(R.id.magikeyboard_app_id_icon)
|
||||
webDomainIcon = root.findViewById(R.id.magikeyboard_web_domain_icon)
|
||||
keyboardView = root.findViewById(R.id.magikeyboard_view)
|
||||
screenshotModeView = root.findViewById(R.id.screenshot_mode_banner)
|
||||
timeoutProgressBar = root.findViewById(R.id.magikeyboard_timeout_progress)
|
||||
|
||||
if (keyboardView != null) {
|
||||
keyboard = Keyboard(this, R.xml.keyboard_password)
|
||||
@@ -283,10 +285,10 @@ class MagikeyboardService : InputMethodService(),
|
||||
assignKeyboardView()
|
||||
keyboardView?.onKeyboardActionListener = this
|
||||
|
||||
return rootKeyboardView
|
||||
return root
|
||||
}
|
||||
|
||||
return rootKeyboardView
|
||||
return root
|
||||
}
|
||||
|
||||
private fun getEntryInfo(entryId: UUID? = entriesAdapter?.selectedEntry?.id): EntryInfo? {
|
||||
@@ -346,6 +348,8 @@ class MagikeyboardService : InputMethodService(),
|
||||
}
|
||||
setDatabaseViews()
|
||||
entriesAdapter?.notifyDataSetChanged()
|
||||
// To fix height calculation
|
||||
rootView?.post { rootView?.requestLayout() }
|
||||
}
|
||||
|
||||
private fun setDatabaseViews() {
|
||||
@@ -777,4 +781,4 @@ class MagikeyboardService : InputMethodService(),
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,8 +22,7 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:fitsSystemWindows="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:background="@color/grey_blue_deep"
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
* Fix back to previous keyboard #2529
|
||||
* Fix return to previous keyboard #2529
|
||||
* Fix keyboard view update #2539
|
||||
@@ -1 +1,2 @@
|
||||
* Correction retour au clavier précédent #2529
|
||||
* Correction retour au clavier précédent #2529
|
||||
* Correction de la mise à jour de la vue de clavier #2539
|
||||
Reference in new issue
Block a user