Skip to content

Support edge-to-edge display in authentication WebView #320

@andrii-bodnar

Description

@andrii-bodnar

The authentication WebView does not properly handle edge-to-edge display requirements, causing the Crowdin logo and other UI elements to be obscured by the system status bar on Android 15+ devices.

Current Behavior

When opening the authentication flow:

  • The WebView content extends behind the system status bar
  • The Crowdin logo is covered by the status bar (time, notification icons, etc.)
  • Important UI elements in the authentication page are not fully visible
  • When dragging down the status bar, the logo becomes visible, confirming the content is behind system UI

Expected Behavior

The authentication WebView should:

  • Respect window insets and system bars
  • Apply proper padding to keep content in the safe drawing area
  • Ensure all UI elements (logo, buttons, text) remain visible and not obscured by system bars, navigation bars, or display cutouts

Technical Details

Root Cause:

  • Starting with Android 15 (API 35), edge-to-edge display is enforced by default
  • The AuthActivity and its layout do not implement window insets handling
  • The WebView doesn't apply padding for system bars

Affected Component:

  • AuthActivity (crowdin/src/main/java/com/crowdin/platform/auth/AuthActivity.kt)
  • auth_layout.xml (crowdin/src/main/res/layout/auth_layout.xml)

Proposed Solution

Implement window insets handling in AuthActivity:

  1. Enable edge-to-edge in the activity:
WindowCompat.setDecorFitsSystemWindows(window, false)
  1. Apply window insets to the WebView or root layout:
ViewCompat.setOnApplyWindowInsetsListener(webView) { view, windowInsets ->
    val insets = windowInsets.getInsets(WindowInsetsCompat.Type.systemBars())
    view.updatePadding(
        top = insets.top,
        bottom = insets.bottom,
        left = insets.left,
        right = insets.right
    )
    WindowInsetsCompat.CONSUMED
}

Environment

  • SDK Version: 1.15.0
  • Target SDK: 35 (Android 15)
  • Min SDK: 16

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions