Skip to content

Add window insets handling for navigation bar in translation view#3601

Merged
ahmedre merged 1 commit intomainfrom
claude/fix-nav-bottom-insets-7jygc
Mar 28, 2026
Merged

Add window insets handling for navigation bar in translation view#3601
ahmedre merged 1 commit intomainfrom
claude/fix-nav-bottom-insets-7jygc

Conversation

@ahmedre
Copy link
Copy Markdown
Contributor

@ahmedre ahmedre commented Mar 28, 2026

Summary

Added proper window insets handling to account for the navigation bar when displaying translation content, ensuring UI elements don't get hidden behind system navigation.

Key Changes

  • Added imports for ViewCompat, WindowInsetsCompat, and updatePadding from androidx.core.view
  • Implemented setOnApplyWindowInsetsListener to listen for window insets changes
  • Applied bottom padding to both translationControls and translationView based on navigation bar insets
  • This ensures the translation content and controls remain visible and properly positioned above the navigation bar

Implementation Details

The window insets listener extracts the navigation bar insets and applies the bottom inset value as padding to the translation UI components. This approach follows modern Android best practices for handling system UI elements and provides a better user experience by preventing content overlap with system navigation.

https://claude.ai/code/session_01GxdJL743Qbjj4G57gCJ1xP

Apply navigation bar window insets to the next/previous ayah controls
and the translation scroll view so they aren't obscured by the three-
button navigation bar in edge-to-edge mode.

https://claude.ai/code/session_01GxdJL743Qbjj4G57gCJ1xP
@ahmedre ahmedre enabled auto-merge March 28, 2026 14:19
@ahmedre ahmedre added this pull request to the merge queue Mar 28, 2026
@github-actions
Copy link
Copy Markdown

OLD: app-madani-debug.apk (signature: V1, V2)
NEW: app-madani-debug.apk (signature: V1, V2)

          │            compressed             │           uncompressed           
          ├───────────┬───────────┬───────────┼───────────┬───────────┬──────────
 APK      │ old       │ new       │ diff      │ old       │ new       │ diff     
──────────┼───────────┼───────────┼───────────┼───────────┼───────────┼──────────
      dex │  20.3 MiB │  20.3 MiB │    +572 B │  51.3 MiB │  51.3 MiB │ +1.4 KiB 
     arsc │   2.1 MiB │   2.1 MiB │       0 B │   2.1 MiB │   2.1 MiB │      0 B 
 manifest │   5.7 KiB │   5.7 KiB │       0 B │  26.6 KiB │  26.6 KiB │      0 B 
      res │   1.8 MiB │   1.8 MiB │       0 B │     2 MiB │     2 MiB │      0 B 
   native │  81.4 KiB │ 112.3 KiB │ +30.9 KiB │  36.5 KiB │  36.5 KiB │      0 B 
    asset │   1.8 MiB │   1.8 MiB │       0 B │   4.1 MiB │   4.1 MiB │      0 B 
    other │ 200.1 KiB │ 200.1 KiB │      -4 B │ 501.8 KiB │ 501.8 KiB │      0 B 
──────────┼───────────┼───────────┼───────────┼───────────┼───────────┼──────────
    total │  26.2 MiB │  26.3 MiB │ +31.4 KiB │    60 MiB │    60 MiB │ +1.4 KiB 

Merged via the queue into main with commit 4de4bd8 Mar 28, 2026
2 checks passed
@ahmedre ahmedre deleted the claude/fix-nav-bottom-insets-7jygc branch March 28, 2026 14:26
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