Skip to content

Fix: remove keyboard animations#2162

Merged
RohitKushvaha01 merged 3 commits into
Acode-Foundation:mainfrom
RohitKushvaha01:main
Jun 7, 2026
Merged

Fix: remove keyboard animations#2162
RohitKushvaha01 merged 3 commits into
Acode-Foundation:mainfrom
RohitKushvaha01:main

Conversation

@RohitKushvaha01
Copy link
Copy Markdown
Member

No description provided.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Jun 7, 2026

Greptile Summary

This PR removes the WindowInsetsAnimationCompat.Callback that was smoothly animating the content view's bottom padding as the soft keyboard appeared and disappeared, replacing it with a simple setOnApplyWindowInsetsListener that always applies the final keyboard height immediately.

  • The animationRunning flag and all three animation-callback overrides (onPrepare, onEnd, onProgress) are deleted; insets are now applied in one place with no animation gating.
  • ViewCompat.requestApplyInsets(contentView) is added at the end of the constructor to force an immediate inset dispatch so the listener fires with the current keyboard state on first setup.
  • Unused imports (java.util.List, WindowInsetsAnimationCompat) are cleaned up.

Confidence Score: 4/5

The change is safe to merge — it intentionally trades smooth keyboard animation for an immediate layout jump, which is the stated goal.

The logic reduction is straightforward and correct: the single listener path was already present in the old code for the non-animation case, so the only behavioural change is that intermediate inset frames are no longer applied. The only defect is a missing trailing newline at EOF.

No files require special attention beyond the missing EOF newline in SoftInputAssist.java.

Important Files Changed

Filename Overview
src/plugins/system/android/com/foxdebug/system/SoftInputAssist.java Removes WindowInsetsAnimationCompat.Callback and the animationRunning guard, replacing the two-path (animation + static) inset handling with a single direct listener; adds ViewCompat.requestApplyInsets to force an initial dispatch. Missing trailing newline at EOF.

Sequence Diagram

sequenceDiagram
    participant System as Android System
    participant Listener as OnApplyWindowInsetsListener
    participant View as contentView

    Note over System,View: NEW behaviour (this PR)
    System->>Listener: dispatchApplyWindowInsets(finalInsets)
    Listener->>Listener: compute keyboardHeight
    Listener->>View: setPadding(0, 0, 0, keyboardHeight)

    Note over System,View: OLD behaviour (removed)
    System->>Listener: dispatchApplyWindowInsets(finalInsets)
    alt "animationRunning == false"
        Listener->>View: setPadding(0, 0, 0, keyboardHeight)
    end
    System->>AnimCB: "onPrepare() → animationRunning = true"
    loop each animation frame
        System->>AnimCB: onProgress(intermediateInsets)
        AnimCB->>View: setPadding(left, top, right, intermediateHeight)
    end
    System->>AnimCB: "onEnd() → animationRunning = false"
Loading

Reviews (1): Last reviewed commit: "Merge branch 'Acode-Foundation:main' int..." | Re-trigger Greptile

Comment thread src/plugins/system/android/com/foxdebug/system/SoftInputAssist.java Outdated
@RohitKushvaha01 RohitKushvaha01 merged commit ab035f7 into Acode-Foundation:main Jun 7, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant