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

Implement Android edge-to-edge mode #52116

Closed
Julesssss opened this issue Nov 6, 2024 · 9 comments
Closed

Implement Android edge-to-edge mode #52116

Julesssss opened this issue Nov 6, 2024 · 9 comments
Assignees
Labels
Engineering Internal Requires API changes or must be handled by Expensify staff Reviewing Has a PR in review Weekly KSv2

Comments

@Julesssss
Copy link
Contributor

Julesssss commented Nov 6, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


P/S was shared here by @kirillzyusko

Problem:

The android navigation bars (bottom and top) can have a different color than the background color of the app. This happens when the app theme switches (due to change in system appearance), or when the splashscreen hides.

Solution

Trying to fix the existing code with asynchronous updates is hard, as it's almost impossible to perfectly time the update from JS to the UI thread. A 100% reliable approach would be to enable edge-to-edge mode on Android. It'll brings several advantages, such as:

  • such mode fully matches iOS behavior in terms of insets handling -> by default content will be drawn under system bars and if we want we can apply padding/fill the area with background color and do whatever we want. Since we'll have the same mode on both platforms it helps us to reduce code fragmentation, make code consistent and truly crossplatform.
  • since insets handling will not work on Android anymore, it gives us a flexibility in terms of keyboard handling. By default Android handles keyboard appearance out of the box, but such keyboard handling is quite limited, it doesn't have smooth animations etc. When we get a control of keyboard management we can utilize cross-platform behavior.
  • edge-to-edge mode is enabled by default on Android 15 (there is still a way to disable it if the app is not ready to edge-to-edge` mode), but in future Android versions this approach may be totally disabled: https://developer.android.com/about/versions/15/behavior-changes-15#edge-to-edge.
  • Expo (starting from SDK 52) will turn on edge-to-edge mode by default: https://expo.dev/changelog/2024/10-24-sdk-52-beta#highlights;
  • After Expo SDK 52 RN team will see how adoptation is going on and if they will see, that ecosystem and community is ready for this step they will enable edge-to-edge by default as well: Handling Android 15's edge-to-edge enforcement on React Native react-native-community/discussions-and-proposals#827.
Add any screenshot/video evidence

View all open jobs on GitHub

@Julesssss Julesssss added Engineering Daily KSv2 Internal Requires API changes or must be handled by Expensify staff labels Nov 6, 2024
@Julesssss Julesssss self-assigned this Nov 6, 2024
@kirillzyusko
Copy link
Contributor

Kiryl from Margelo expert agency is here 👋

As discussed here I'd like to take care of that 🙌

@zoontek
Copy link
Contributor

zoontek commented Nov 9, 2024

👋 I can do it. I'm the author of react-native-edge-to-edge, knows the subject perfectly.

EDIT: Oops, just saw @kirillzyusko response. Let me know if you need help.

@melvin-bot melvin-bot bot added the Overdue label Nov 11, 2024
Copy link

melvin-bot bot commented Nov 11, 2024

@Julesssss, @kirillzyusko Whoops! This issue is 2 days overdue. Let's get this updated quick!

1 similar comment
Copy link

melvin-bot bot commented Nov 12, 2024

@Julesssss, @kirillzyusko Whoops! This issue is 2 days overdue. Let's get this updated quick!

@kirillzyusko
Copy link
Contributor

@MelvinBot not overdue, I'm planning to start working on it today 👀

Copy link

melvin-bot bot commented Nov 26, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

Copy link

melvin-bot bot commented Nov 26, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

Copy link

melvin-bot bot commented Nov 27, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

Copy link

melvin-bot bot commented Nov 27, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Engineering Internal Requires API changes or must be handled by Expensify staff Reviewing Has a PR in review Weekly KSv2
Projects
Development

No branches or pull requests

3 participants