Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android 15] Add edge-to-edge support #8748

Open
wmontwe opened this issue Jan 14, 2025 · 3 comments
Open

[Android 15] Add edge-to-edge support #8748

wmontwe opened this issue Jan 14, 2025 · 3 comments
Labels
type: platform Issues related to Android platform changes

Comments

@wmontwe
Copy link
Member

wmontwe commented Jan 14, 2025

We want to enable edge-to-edge support for Android 15 compatibility.

See Behavior changes: Edge-to-edge enforcement  |  Android Developers

Tasks:

  1. Fix edge-to-edge Jetpack Compose implementation for Android 15
  2. Add edge-to-edge support for legacy UI
  3. Check all legacy UI screens for issues
  4. Fix legacy UI issues

Resources:

@wmontwe wmontwe added type: bug Something is causing incorrect behavior or errors unconfirmed Newly reported issues awaiting triage or confirmation labels Jan 14, 2025
@wmontwe wmontwe changed the title Add edge-to-edge for Android 15 support [Android 15] Add edge-to-edge support Jan 14, 2025
@cketti
Copy link
Member

cketti commented Jan 21, 2025

Proposed strategy for implementing edge-to-edge:

  • Add horizontal component of "safeDrawing" as padding to all screens. (We currently don't have any screens where we want to stretch to the sides when there's a display cutout on the right or left.)
  • On screens with fixed header, e.g. a toolbar:
    • Add top component of "safeDrawing" to header's top padding.
  • On screens with fixed footer:
    • Add bottom component of "safeDrawing" to footer's bottom padding.
  • On screens without fixed footer:
    • If there's no fixed header, add top component of "safeDrawing" to the top padding of the (scrolling) content
    • Add bottom component of "safeDrawing" to the bottom padding of the (scrolling) content

@wmontwe
Copy link
Member Author

wmontwe commented Jan 23, 2025

I assume you're talking about WindowInsets.safeDrawing() and the suggestion is meant for XML layouts, right?

@wmontwe wmontwe added type: enhancement New features or improvements to existing features. type: platform Issues related to Android platform changes and removed unconfirmed Newly reported issues awaiting triage or confirmation type: bug Something is causing incorrect behavior or errors type: enhancement New features or improvements to existing features. labels Jan 23, 2025
@cketti
Copy link
Member

cketti commented Jan 23, 2025

Yes, I was working off the documentation for WindowInsets.safeDrawing(). I assumed the mechanism used for XML-based layouts has the same concept of "safe drawing" insets.

I tried to word it so the approach can be used for both Compose and XML-based layouts. Do you think the strategy on a high level needs to be different depending on the UI framework?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: platform Issues related to Android platform changes
Projects
None yet
Development

No branches or pull requests

2 participants