Skip to content

Commit 17be264

Browse files
Add debugging logs and documentation for keyboard positioning fix
Co-authored-by: Ayush0Chaudhary <95746190+Ayush0Chaudhary@users.noreply.github.com>
1 parent 8b24102 commit 17be264

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/src/main/java/com/blurr/voice/utilities/VisualFeedbackManager.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,9 @@ class VisualFeedbackManager private constructor(private val context: Context) {
227227
onSubmit: (String) -> Unit,
228228
onOutsideTap: () -> Unit
229229
) {
230+
// This method creates an overlay input box that appears over other apps
231+
// Key fix: Proper keyboard positioning using WindowInsetsCompat to prevent
232+
// the input box from being hidden behind the keyboard when it appears
230233
mainHandler.post {
231234
if (inputBoxView?.isAttachedToWindow == true) {
232235
// If already showing, just ensure focus
@@ -325,6 +328,8 @@ class VisualFeedbackManager private constructor(private val context: Context) {
325328

326329
try {
327330
windowManager.addView(inputBoxView, params)
331+
Log.d(TAG, "Input box added with initial y position: ${params.y}")
332+
328333
// **IMPROVEMENT**: Explicitly request focus and show the keyboard
329334
inputField?.requestFocus()
330335
val imm = context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager

0 commit comments

Comments
 (0)