-
Notifications
You must be signed in to change notification settings - Fork 313
Update part 2: updating for Android 15 (sdk 35) compatibility #1737
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
Conversation
Generated by 🚫 Danger |
|
📲 You can test the changes from this Pull Request in Simplenote Android by scanning the QR code below to install the corresponding build.
|
… behind the status bar since the deprecated statusBarColor API no longer works. By ensuring the AppBarLayout has the proper background color and extends behind the status bar, the blue system background is no longer visible.
…activities. Also fixed insets in About screen
…z/update-targetsdk-35
…oid 15 edge-to-edge
|
Thanks for updating Simplenote! Using the pull request APK above for testing, I saw some oddities that might be good to address before merging these changes. The floating action button on the Collaborators and Edit Tags screens overlaps the system navigation bar. It's a little easier to see with three-button navigation, but it still happens with gesture navigation since the button shadow is clipped for API 32. I created #1739 and targeted the When tapping the Add Collaborator floating action button on the Collaborators screen, the transition from floating action button to dialog no longer animates. The transition animation still occurs for the Add Tag floating action button on the Edit Tags screen though. See the videos below for illustration.
|
| Collaborators | Edit Tags |
|---|---|
collaborators.mp4 |
tags.mp4 |
When logged out, the Log In button is behind the system navigation bar on API 36, but not API 32. See the screenshots below for illustration.
If the device has a cutout, then multiple screens are displayed behind it in landscape orientation. Also, the ellipsis/overflow button in the top app bar is behind the system navigation bar on the note editor screen as shown in the first screenshot. See the screenshots below for illustration.
Note
The screenshots below are from a Pixel 9 API 36.
…rators and Edit Tags Screens (#1739)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the Simplenote Android app for Android 15 (API level 35) compatibility by addressing deprecated system bar APIs and implementing edge-to-edge display. The changes ensure compatibility with Android 15's enforcement of edge-to-edge design and removal of deprecated status bar and navigation bar color APIs.
- Updates target SDK version from 34 to 35 for both main app and Wear module
- Creates API 35-specific style resources that remove deprecated navigationBarColor and statusBarColor attributes
- Implements comprehensive edge-to-edge display support with proper WindowInsets handling across all activities
Reviewed Changes
Copilot reviewed 30 out of 31 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| Simplenote/build.gradle | Updates targetSdkVersion to 35 |
| Wear/build.gradle | Updates targetSdkVersion to 35 |
| Simplenote/src/main/res/values-v35/styles.xml | API 35 compatible styles with deprecated attributes removed |
| Simplenote/src/main/res/values-night-v35/styles.xml | Night theme API 35 compatible styles |
| SystemBarUtils.java | New utility class for edge-to-edge display and system bar handling |
| DisplayUtils.java | Added WindowInsets support for FloatingActionButton positioning |
| Multiple activity files | Integration of edge-to-edge display with proper insets handling |
| Multiple layout files | Layout adjustments for edge-to-edge compatibility |
Comments suppressed due to low confidence (5)
Simplenote/src/main/java/com/automattic/simplenote/utils/SystemBarUtils.java:40
- Build.VERSION_CODES.VANILLA_ICE_CREAM does not exist in the Android SDK. Android 15 uses API level 35, but this constant is not available. Use Build.VERSION_CODES.UPSIDE_DOWN_CAKE (API 34) + 1 or the numeric value 35 instead.
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.VANILLA_ICE_CREAM) {
Simplenote/src/main/java/com/automattic/simplenote/utils/SystemBarUtils.java:63
- Build.VERSION_CODES.VANILLA_ICE_CREAM does not exist in the Android SDK. Use the numeric value 35 or Build.VERSION_CODES.UPSIDE_DOWN_CAKE + 1 instead.
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.VANILLA_ICE_CREAM) {
Simplenote/src/main/java/com/automattic/simplenote/authentication/SimplenoteAuthenticationActivity.java:68
- Build.VERSION_CODES.VANILLA_ICE_CREAM does not exist in the Android SDK. Use the numeric value 35 for Android 15 instead.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM) {
Simplenote/src/main/java/com/automattic/simplenote/AddTagActivity.kt:45
- Build.VERSION_CODES.VANILLA_ICE_CREAM does not exist in the Android SDK. Use the numeric value 35 for Android 15 instead.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM) {
PasscodeLock/src/main/java/org/wordpress/passcodelock/PasscodeManagePasswordActivity.java:26
- Build.VERSION_CODES.VANILLA_ICE_CREAM does not exist in the Android SDK. Use the numeric value 35 for Android 15 instead.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM) {
Simplenote/src/main/java/com/automattic/simplenote/utils/DisplayUtils.java
Show resolved
Hide resolved
Simplenote/src/main/java/com/automattic/simplenote/utils/DisplayUtils.java
Show resolved
Hide resolved
…'t show too close to the sign up and login butons
Since this also occurs in Simplenote 2.35, the bug wasn't introduced with these changes. So, I created a new issue (#1740) to fix that separately. There is something different with the Add Tag transition animation that is due to these changes. The dialog is not centered in the resized window when the virtual keyboard is shown. See the videos below for illustration.
|
| Before | After |
|---|---|
before.mp4 |
after.mp4 |
That's most likely due to the window insets. It's not really a problem on some devices like the Pixel 9 in the videos above, but it may be a problem with shorter devices if the dialog is obscured behind the keyboard and the dialog buttons can't be tapped.
|
No problem, @mzorz! I'm so glad you're updating Simplenote. I tested I don't think that should hold up these changes though. So, it looks good to me! Approved! |
Another great catch 🙌 - addressed in e387f83 ❤️
😄 thanks much Tyler! You're awesome 😍 |
|
One thing @Twinsen81 caught in testing:
I'm working on it, it may require changing things in the Simperium library. |
|
Tracking the above separately in #1741 to produce another PR to keep this PR more contained. |
Oook, what you did here @mzorz is a brilliant, brilliant idea, thank you for posting the recording! ❤️ 🥇 💯 |
|
👋 @theck13 so nice to hear from you, it's been a while, plus, many thanks for all the help! ❤️ 🙇 ❤️ |
ParaskP7
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👋 @mzorz !
I have (quickly) reviewed and (quickly) tested this PR, I'll just leave a 👍 here and move my focus on #1738 leaving the primary review and ✅ to the other reviewers. Great job with making this app work on Android 15, adding edge-to-edge support and all, this is awesome! 🌟 x 🌟 ^ 🌟
Just an FYI that during testing I noticed the following, which I am pretty sure you're already aware of:
- The logged-out screens are a bit off, theme-wise, especially the login screen (context). 🤔
- While trying to
Publisha test note, I got an error at first, then noticed that the note is published anyway, then tried to unpublish/publish again and everything worked as expected this time around. Not sure if that's related to any changes you did here, most likely not, just just wanted to live a trace... 🤷
Simplenote/src/main/java/com/automattic/simplenote/utils/SystemBarUtils.java
Outdated
Show resolved
Hide resolved
Simplenote/src/main/java/com/automattic/simplenote/utils/SystemBarUtils.java
Outdated
Show resolved
Hide resolved
|
Thank you for your testing here @ParaskP7 !
Yes, that's being tackled separately in #1741 and will involve making changes to the Simperium library since it hosts the base authentication screens
That must be a backend issue 👍 - let's file it if we find it again |
…rwise the nested scrollbars can't figure out tto update themselves
Nicely done @mzorz , I just tested it and it works as expected, thank YOU! 🙇 ❤️ 🚀 |
obsantos
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all the changes, tested and works! 💯





This PR sits on top of #1733
Fix
Checked the migration tool (Android SDK upgrade assistant) on Android Studio, the path "Android 14 / API level 34 -> Android 15 / API level 35"
These are the checcks performed.
Open JDK API:
SequencedCollectioncollisionsWe don't use those methods so all good.
Since it will fail at compile time, it's fine atm.
Secured background activity launches
Safer intents
The most important from what I could consider was edge to edge enforcement , and the deprecation of the folowing APIs:
ViewCompat.setOnApplyWindowInsetsListener.Window inset changes: stable configuration
elegant TextHeight attribute defaults to true
TextView width changes for complex letter shapes
Locale-aware default line height for EditText
Test
See a video testing dark mode, light mode, different settings, 3-button navigation, gesture navigation etc. here:
https://cloudup.com/c9IM1DZks44
Smoke test on Android 15 and Android < 15, visit all the screens:
Review
Release