Skip to content

fix(ADFA-3093): Add bottom padding to prevent overlap on system navigation bar#1021

Merged
dara-abijo-adfa merged 3 commits intostagefrom
ADFA-3093-cta-overlaps-nav-buttons
Feb 27, 2026
Merged

fix(ADFA-3093): Add bottom padding to prevent overlap on system navigation bar#1021
dara-abijo-adfa merged 3 commits intostagefrom
ADFA-3093-cta-overlaps-nav-buttons

Conversation

@dara-abijo-adfa
Copy link
Contributor

@dara-abijo-adfa dara-abijo-adfa commented Feb 26, 2026

Make room for system navigation bar on Project Template List and Project Template Details screens.

Screenshot 2026-02-26 at 15 02 13

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 26, 2026

📝 Walkthrough

Walkthrough

Both TemplateDetailsFragment and TemplateListFragment are updated to handle system window insets. Each fragment now applies system bars insets as bottom padding to its root view using ViewCompat and WindowInsetsCompat listeners, ensuring content avoids system UI overlays.

Changes

Cohort / File(s) Summary
System Insets Handling
app/src/main/java/com/itsaky/androidide/fragments/TemplateDetailsFragment.kt, app/src/main/java/com/itsaky/androidide/fragments/TemplateListFragment.kt
Added window insets listeners to apply system bars insets as bottom padding via ViewCompat.setOnApplyWindowInsetsListener and WindowInsetsCompat.getInsets. Imports ViewCompat, WindowInsetsCompat, and updatePadding added to support insets handling.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Suggested reviewers

  • itsaky-adfa
  • jatezzz
  • Daniel-ADFA

Poem

🐰 Two fragments, now padded with grace,
System bars find their rightful place,
With insets applied, content won't hide,
Below the UI, there's plenty of side!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The description is related to the changeset, explaining that the PR makes room for the system navigation bar on template screens and includes a before/after screenshot demonstrating the layout adjustment.
Title check ✅ Passed The title directly and clearly describes the main change: adding bottom padding to prevent UI overlap with the system navigation bar, which aligns with the file-level changes in both fragments.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ADFA-3093-cta-overlaps-nav-buttons

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
app/src/main/java/com/itsaky/androidide/fragments/TemplateDetailsFragment.kt (1)

69-73: Consider preserving initial padding from the layout.

The current implementation directly sets bottom = insets.bottom, which will overwrite any existing bottom padding defined in the XML layout. If the layout changes in the future to include bottom padding, it would be lost.

A more robust pattern captures the initial padding before setting the listener:

♻️ Suggested improvement
+        val initialPaddingBottom = binding.root.paddingBottom
         ViewCompat.setOnApplyWindowInsetsListener(binding.root) { v, windowInsets ->
             val insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars())
-            v.updatePadding(bottom = insets.bottom)
+            v.updatePadding(bottom = initialPaddingBottom + insets.bottom)
             windowInsets
         }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/src/main/java/com/itsaky/androidide/fragments/TemplateDetailsFragment.kt`
around lines 69 - 73, The current onApplyWindowInsets listener in
TemplateDetailsFragment overwrites any XML bottom padding; capture the view's
original padding before calling ViewCompat.setOnApplyWindowInsetsListener (e.g.,
read binding.root.paddingBottom into a local like initialBottomPadding) and then
inside the listener call v.updatePadding(bottom = initialBottomPadding +
insets.bottom) so you preserve existing layout padding while still applying
system inset adjustments.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In
`@app/src/main/java/com/itsaky/androidide/fragments/TemplateDetailsFragment.kt`:
- Around line 69-73: The current onApplyWindowInsets listener in
TemplateDetailsFragment overwrites any XML bottom padding; capture the view's
original padding before calling ViewCompat.setOnApplyWindowInsetsListener (e.g.,
read binding.root.paddingBottom into a local like initialBottomPadding) and then
inside the listener call v.updatePadding(bottom = initialBottomPadding +
insets.bottom) so you preserve existing layout padding while still applying
system inset adjustments.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0d0c583 and 2590ecf.

📒 Files selected for processing (2)
  • app/src/main/java/com/itsaky/androidide/fragments/TemplateDetailsFragment.kt
  • app/src/main/java/com/itsaky/androidide/fragments/TemplateListFragment.kt

@dara-abijo-adfa dara-abijo-adfa changed the title fix(ADFA-3093): Adjust view layout based on system bars fix(ADFA-3093): Add bottom padding to prevent overlap on system navigation bar Feb 26, 2026
@dara-abijo-adfa dara-abijo-adfa merged commit 4003920 into stage Feb 27, 2026
2 checks passed
@dara-abijo-adfa dara-abijo-adfa deleted the ADFA-3093-cta-overlaps-nav-buttons branch February 27, 2026 16:08
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.

3 participants