From 44f0f22574d084b8c2b8ced4c87cb3ba67999c39 Mon Sep 17 00:00:00 2001 From: Gigahawk Date: Mon, 20 Jan 2020 19:40:44 -0800 Subject: Fix autofill window size (#611) (#612) --- app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.kt | 5 +++-- 1 file 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() } -- cgit v1.2.3