summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorGigahawk <jasperchan515@gmail.com>2020-01-20 19:40:44 -0800
committerHarsh Shandilya <msfjarvis@gmail.com>2020-01-21 09:10:44 +0530
commit44f0f22574d084b8c2b8ced4c87cb3ba67999c39 (patch)
tree0de929d2e5bb18e5252152f337c3484e71ff40e4 /app/src/main/java
parent81896510d981f9508673d2b918a6d3c5e13bbcc4 (diff)
Fix autofill window size (#611) (#612)
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.kt5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.kt b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.kt
index 3086e297..5862fa91 100644
--- a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.kt
@@ -18,6 +18,7 @@ import android.os.Build
import android.os.Bundle
import android.provider.Settings
import android.util.Log
+import android.view.ViewGroup.LayoutParams.WRAP_CONTENT
import android.view.WindowManager
import android.view.accessibility.AccessibilityEvent
import android.view.accessibility.AccessibilityNodeInfo
@@ -440,12 +441,12 @@ class AutofillService : AccessibilityService() {
dialog = builder.create()
setDialogType(dialog)
dialog?.window?.apply {
- val height = 200
val density = context.resources.displayMetrics.density
addFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE)
+ setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE)
clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND)
// arbitrary non-annoying size
- setLayout((240 * density).toInt(), (height * density).toInt())
+ setLayout((340 * density).toInt(), WRAP_CONTENT)
}
dialog?.show()
}