Material uses deprecated methods on android api 35
com.google.android.material:material:1.12.0
Is your feature request related to a problem? Please describe. When I adapted EdgeToEdge to publish to the Play Store, I received a prompt: your app uses deprecated APIs or parameters for borderless design One or more APIs you used or parameters you set for borderless design and window display have been deprecated in Android 15. Your app uses the following deprecated APIs or parameters: android.view.Window.setStatusBarColor android.view.Window.setNavigationBarColor LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES These APIs or parameters start at the following location: com.google.android.material.datepicker.MaterialDatePicker.onStart
Describe the solution you'd like Please fix it
+1
+1 Same issue with me
+1
+1
+1
+1
+1
+1
+1
Official fixes have been made in version 1.14.0-alpha01
Using version 1.14.0-alpha01 and upload this to Google Play still gives me:
Your app uses deprecated APIs or parameters for edge-to-edge
One or more of the APIs you use or parameters that you set for edge-to-edge and window display have been deprecated in Android 15. Your app uses the following deprecated APIs or parameters:
android.view.Window.setStatusBarColor
android.view.Window.setNavigationBarColor
These start in the following places:
com.google.android.material.bottomsheet.a.onCreate
com.google.android.material.internal.c.a
To fix this, migrate away from these APIs or parameters.
Even tough 1.14.0-alpha01 release notes mention "BottomSheet Deprecated enableEdgeToEdge for bottom sheet dialogs on API 35+. (https://github.com/material-components/material-components-android/commit/603f1ef9d5223fc06fa432c4175473eda2138330)" this seems not to be resolved.
Hi,
Sorry! This was fixed and then reverted in https://github.com/material-components/material-components-android/commit/aaa40dbc4e217103a9d05425e27548beee3394d0 after causing a few issues.
We're working on how to fix this moving forward while not triggering Play's static analysis and not breaking existing behavior. Thanks for the patience!
+1
+1
@LoveMyBaby , @hunterstich
I noticed the ticket was marked as resolved and closed, stating that the fix is available in version 1.14.0-alpha01. However, the warning still persists in the latest release (e.g., 1.13.0-alpha14). I have verified this in my app, and it seems the underlying issue remains.
I can also see that others have commented similarly.
Could you please consider reopening this ticket or let me know if a new one should be created to track the ongoing issue?
Thanks!
+1
+1
+1
+1
+1
+1
MaterialDatePicker.onStart() is using EdgeToEdgeUtils.applyEdgeToEdge() which is using deprecated methods window.setStatusBarColor(statusBarColor); window.setNavigationBarColor(navigationBarColor);