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

MBL-1673 [Android 15] Update Views to be compatible with edge to edge enforcement #2131

Merged
merged 6 commits into from
Oct 3, 2024

Conversation

jlplks
Copy link
Contributor

@jlplks jlplks commented Sep 18, 2024

📲 What

Modify all the screens to be compatible with Android edge to edge.

🤔 Why

Android 15 introduced edge to edge view enforcement for apps targeting the version (sdk 35). We need to update some views to look normal in this new context.

🛠 How

For the screens that use composable fixed with Modifier.systemBarsPadding(),
For the others screens a utility was created WindowInsetsUtil

Story 📖

[Android 15] Update Views to be compatible with edge to edge enforcement

- Created utility to manage edge to edge on different screens
- fixed composable screens
- fixed other screens with the utility
- Manage edge to edge behavior for all the screens
- modify solution
app/build.gradle Outdated
@@ -52,10 +52,10 @@ if (file('signing.gradle').exists()) {

android {
defaultConfig {
compileSdk 34
compileSdkPreview = "VanillaIceCream"
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you use API level rather than the name? aka: 35

@jlplks jlplks changed the base branch from master to feat/jpulido/MBL-1739/Android-15 September 19, 2024 05:03
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 11.11111% with 56 lines in your changes missing coverage. Please review.

Project coverage is 67.66%. Comparing base (c28b488) to head (cb1cd88).

Files with missing lines Patch % Lines
...arter/ui/activities/compose/ReportProjectScreen.kt 0.00% 36 Missing ⚠️
...ain/java/com/kickstarter/utils/WindowInsetsUtil.kt 0.00% 11 Missing ⚠️
.../ui/activities/compose/projectpage/AddOnsScreen.kt 0.00% 3 Missing ⚠️
...vities/compose/projectpage/RewardCarouselScreen.kt 0.00% 3 Missing ⚠️
...rter/ui/activities/compose/ChangePasswordScreen.kt 0.00% 1 Missing ⚠️
...ckstarter/ui/activities/compose/FormularyScreen.kt 0.00% 1 Missing ⚠️
...i/activities/compose/projectpage/CheckoutScreen.kt 0.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@                          Coverage Diff                           @@
##             feat/jpulido/MBL-1739/Android-15    #2131      +/-   ##
======================================================================
- Coverage                               67.78%   67.66%   -0.13%     
  Complexity                               2226     2226              
======================================================================
  Files                                     368      369       +1     
  Lines                                   22851    22903      +52     
  Branches                                 3280     3280              
======================================================================
+ Hits                                    15490    15497       +7     
- Misses                                   5597     5642      +45     
  Partials                                 1764     1764              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jlplks jlplks removed the WIP 🔨 label Oct 3, 2024
@mtgriego
Copy link
Contributor

mtgriego commented Oct 3, 2024

Screenshot_20241003_125838
Screenshot_20241003_125747
Screenshot_20241003_125703
Screenshot_20241003_125626

Tested a bunch of the screens i pointed out in the ticket as having issues with edge to edge on the branch and I still see the issues. Many of the top bars cant be interacted with now as they are behind the notification bar

@jlplks
Copy link
Contributor Author

jlplks commented Oct 3, 2024

In what device are you testing, @mtgriego ? I test on an emulator targeting Android 15 and it works

EMULATOR SPECTS
Screenshot 2024-10-03 at 1 19 11 p m

SCREENS ON EMULATOR
Screenshot_20241003_132001
Screenshot_20241003_132011
Screenshot_20241003_132020
Screenshot_20241003_131940

@jlplks jlplks merged commit 38c93ea into feat/jpulido/MBL-1739/Android-15 Oct 3, 2024
3 checks passed
@jlplks jlplks deleted the jpulido/MBL-1673 branch October 3, 2024 21:51
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.

4 participants