From 2dd072a50a7656278457a1b9c25874ca5457eca6 Mon Sep 17 00:00:00 2001 From: Rohit Kushwaha Date: Sat, 6 Jun 2026 17:38:13 +0530 Subject: [PATCH 1/2] fix: removed keyboard resize animations --- .../com/foxdebug/system/SoftInputAssist.java | 48 ++----------------- 1 file changed, 5 insertions(+), 43 deletions(-) diff --git a/src/plugins/system/android/com/foxdebug/system/SoftInputAssist.java b/src/plugins/system/android/com/foxdebug/system/SoftInputAssist.java index 90b8d9ca4..210ad18da 100644 --- a/src/plugins/system/android/com/foxdebug/system/SoftInputAssist.java +++ b/src/plugins/system/android/com/foxdebug/system/SoftInputAssist.java @@ -2,65 +2,27 @@ import android.app.Activity; import android.view.View; -import java.util.List; import androidx.core.graphics.Insets; import androidx.core.view.ViewCompat; import androidx.core.view.WindowInsetsCompat; -import androidx.core.view.WindowInsetsAnimationCompat; public class SoftInputAssist { - private boolean animationRunning = false; - public SoftInputAssist(Activity activity) { View contentView = activity.findViewById(android.R.id.content); ViewCompat.setOnApplyWindowInsetsListener(contentView, (v, insets) -> { + Insets ime = insets.getInsets(WindowInsetsCompat.Type.ime()); + Insets nav = insets.getInsets(WindowInsetsCompat.Type.navigationBars()); - if (!animationRunning) { - Insets ime = insets.getInsets(WindowInsetsCompat.Type.ime()); - Insets nav = insets.getInsets(WindowInsetsCompat.Type.navigationBars()); - - int keyboardHeight = Math.max(0, ime.bottom - nav.bottom); + int keyboardHeight = Math.max(0, ime.bottom - nav.bottom); - v.setPadding(0, 0, 0, keyboardHeight); - } + v.setPadding(0, 0, 0, keyboardHeight); return insets; }); - ViewCompat.setWindowInsetsAnimationCallback( - contentView, - new WindowInsetsAnimationCompat.Callback( - WindowInsetsAnimationCompat.Callback.DISPATCH_MODE_CONTINUE_ON_SUBTREE - ) { - - @Override - public void onPrepare(WindowInsetsAnimationCompat animation) { - animationRunning = true; - } - - @Override - public void onEnd(WindowInsetsAnimationCompat animation) { - animationRunning = false; - } - - @Override - public WindowInsetsCompat onProgress( - WindowInsetsCompat insets, - List runningAnimations) { - - Insets ime = insets.getInsets(WindowInsetsCompat.Type.ime()); - Insets nav = insets.getInsets(WindowInsetsCompat.Type.navigationBars()); - - int keyboardHeight = Math.max(0, ime.bottom - nav.bottom); - - contentView.setPadding(contentView.getPaddingLeft(), contentView.getPaddingTop(), contentView.getPaddingRight(), keyboardHeight); - - return insets; - } - } - ); + ViewCompat.requestApplyInsets(contentView); } } \ No newline at end of file From b030b10b2fd9c08605591cbeadd4ad2080dbe1c3 Mon Sep 17 00:00:00 2001 From: Rohit Kushvaha Date: Sun, 7 Jun 2026 14:07:41 +0530 Subject: [PATCH 2/2] Update SoftInputAssist.java --- .../system/android/com/foxdebug/system/SoftInputAssist.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/system/android/com/foxdebug/system/SoftInputAssist.java b/src/plugins/system/android/com/foxdebug/system/SoftInputAssist.java index 210ad18da..6f6fb14e4 100644 --- a/src/plugins/system/android/com/foxdebug/system/SoftInputAssist.java +++ b/src/plugins/system/android/com/foxdebug/system/SoftInputAssist.java @@ -25,4 +25,4 @@ public SoftInputAssist(Activity activity) { ViewCompat.requestApplyInsets(contentView); } -} \ No newline at end of file +}