fix(ADFA-3943): Avoid collapsing the toolbar when in windowed mode#1332
fix(ADFA-3943): Avoid collapsing the toolbar when in windowed mode#1332dara-abijo-adfa wants to merge 1 commit into
Conversation
dara-abijo-adfa
commented
May 22, 2026
- Remove the scroll flags from the toolbar when app is in not in fullscreen mode
- Re-add the scroll flags before toggling fullscreen mode on
📝 WalkthroughRelease NotesBug Fixes
Technical Changes
Risks & Best Practices Considerations
WalkthroughFullscreenManager enhances AppBar scroll behavior by introducing fallback logic for scroll range calculations in the offset listener and integrating scroll flag setup into fullscreen transitions. The listener now computes an effective scroll range to handle edge cases and manages flag clearing when the app bar is fully expanded. ChangesAppBar Scroll and Fullscreen Behavior
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
app/src/main/java/com/itsaky/androidide/activities/editor/FullscreenManager.kt (1)
133-139: ⚡ Quick winConsider adding a comment to explain the scroll flag clearing logic.
The logic correctly pins the toolbar once fully expanded in windowed mode, but the intent could be clearer for future maintainers. A brief comment explaining that this prevents the toolbar from collapsing again until entering fullscreen would improve readability.
📝 Suggested comment
if (verticalOffset == 0) { + // Pin the toolbar in windowed mode by clearing scroll flags once fully expanded. + // Flags are restored when entering fullscreen (see applyFullscreen). val params = appBarContent.layoutParams as AppBarLayout.LayoutParams if (params.scrollFlags != 0) { params.scrollFlags = 0🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@app/src/main/java/com/itsaky/androidide/activities/editor/FullscreenManager.kt` around lines 133 - 139, Add a brief inline comment above the verticalOffset == 0 branch in FullscreenManager (where appBarContent.layoutParams is cast to AppBarLayout.LayoutParams and params.scrollFlags is set to 0) explaining that clearing params.scrollFlags pins the toolbar when the AppBar is fully expanded (verticalOffset == 0) to prevent it from collapsing again in windowed mode until entering fullscreen; reference appBarContent, params.scrollFlags, AppBarLayout.LayoutParams and verticalOffset in the comment so future maintainers understand the intent.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In
`@app/src/main/java/com/itsaky/androidide/activities/editor/FullscreenManager.kt`:
- Around line 133-139: Add a brief inline comment above the verticalOffset == 0
branch in FullscreenManager (where appBarContent.layoutParams is cast to
AppBarLayout.LayoutParams and params.scrollFlags is set to 0) explaining that
clearing params.scrollFlags pins the toolbar when the AppBar is fully expanded
(verticalOffset == 0) to prevent it from collapsing again in windowed mode until
entering fullscreen; reference appBarContent, params.scrollFlags,
AppBarLayout.LayoutParams and verticalOffset in the comment so future
maintainers understand the intent.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c4a6b8ea-e350-482e-8dcb-e75aef8f8e1c
📒 Files selected for processing (1)
app/src/main/java/com/itsaky/androidide/activities/editor/FullscreenManager.kt