Skip to content

fix(MainActivity): restore bottom margin after IME hides - #2061

Merged
WhiredPlanck merged 1 commit into
osfans:developfrom
WhiredPlanck:fix/main-activity-bottom-margin
Aug 1, 2026
Merged

fix(MainActivity): restore bottom margin after IME hides#2061
WhiredPlanck merged 1 commit into
osfans:developfrom
WhiredPlanck:fix/main-activity-bottom-margin

Conversation

@WhiredPlanck

Copy link
Copy Markdown
Collaborator

Pull request

Issue tracker

Fixes will automatically close the related issues

Fixes # N/A

Feature

Describe features of this pull request

Code of conduct

Code style

Build pass

  • make debug

Manually test

  • Done

Code Review

  1. No wildcards import
  2. Manual build and test pass
  3. GitHub Action CI pass
  4. At least one contributor review and approve
  5. Merged clean without conflicts
  6. PR will be merged by rebase upstream base

Daily build

Login and download artifact at https://github.com/osfans/trime/actions

Additional Info

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates MainActivity’s window insets handling so the root view’s bottom margin is correctly restored when the IME (keyboard) hides, while still accounting for system bars.

Changes:

  • Capture IME insets alongside system bar insets in the initial setOnApplyWindowInsetsListener.
  • Set binding.root’s bottomMargin to maxOf(systemBars.bottom, ime.bottom) so it reflects whichever inset is larger.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@WhiredPlanck
WhiredPlanck merged commit bb7d01f into osfans:develop Aug 1, 2026
4 checks passed
@WhiredPlanck
WhiredPlanck deleted the fix/main-activity-bottom-margin branch August 1, 2026 15:24
@WhiredPlanck

Copy link
Copy Markdown
Collaborator Author

This is a small patch so I merge it directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants