Skip to content

Commit 5c79129

Browse files
Revert VisualFeedbackManager changes and fix CreateTriggerActivity keyboard handling
Co-authored-by: Ayush0Chaudhary <95746190+Ayush0Chaudhary@users.noreply.github.com>
1 parent fb31d5e commit 5c79129

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
</activity>
7474

7575
<activity android:name=".triggers.ui.TriggersActivity" android:exported="false" android:label="Triggers" android:theme="@style/Theme.Blurr" />
76-
<activity android:name=".triggers.ui.CreateTriggerActivity" android:exported="false" android:label="Create Trigger" android:theme="@style/Theme.Blurr" android:windowSoftInputMode="adjustResize" />
76+
<activity android:name=".triggers.ui.CreateTriggerActivity" android:exported="false" android:label="Create Trigger" android:theme="@style/Theme.Blurr" android:windowSoftInputMode="adjustPan" />
7777
<activity android:name=".triggers.ui.ChooseTriggerTypeActivity" android:exported="false" android:label="Choose Trigger Type" android:theme="@style/Theme.Blurr" />
7878

7979

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -254,12 +254,12 @@ class VisualFeedbackManager private constructor(private val context: Context) {
254254
WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY,
255255
WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN or
256256
WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH or
257-
WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL or
258-
WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM,
257+
WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL,
259258
PixelFormat.TRANSLUCENT
260259
).apply {
261-
gravity = Gravity.CENTER_VERTICAL
262-
softInputMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN
260+
gravity = Gravity.TOP
261+
// Top margin with sufficient space
262+
y = (80 * context.resources.displayMetrics.density).toInt() // 80dp top margin
263263
}
264264

265265
inputField?.setOnEditorActionListener { v, actionId, _ ->
@@ -294,7 +294,7 @@ class VisualFeedbackManager private constructor(private val context: Context) {
294294

295295
try {
296296
windowManager.addView(inputBoxView, params)
297-
Log.d(TAG, "Input box added with center-vertical positioning")
297+
Log.d(TAG, "Input box added with initial y position: ${params.y}")
298298

299299
// **IMPROVEMENT**: Explicitly request focus and show the keyboard
300300
inputField?.requestFocus()

0 commit comments

Comments
 (0)