material-components-android icon indicating copy to clipboard operation
material-components-android copied to clipboard

Material uses deprecated methods on android api 35

Open LoveMyBaby opened this issue 1 year ago • 15 comments

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

LoveMyBaby avatar Dec 25 '24 03:12 LoveMyBaby

+1

ytheekshana avatar Jan 03 '25 14:01 ytheekshana

+1 Same issue with me

RoyTheReal avatar Feb 06 '25 13:02 RoyTheReal

+1

carlota-may avatar Feb 13 '25 07:02 carlota-may

+1

michael-winkler avatar Feb 13 '25 09:02 michael-winkler

+1

liyuhaolol avatar Feb 19 '25 11:02 liyuhaolol

+1

NilovKirill avatar Feb 20 '25 12:02 NilovKirill

+1

JuanZurit avatar Apr 10 '25 13:04 JuanZurit

+1

jared-loseit avatar Apr 10 '25 16:04 jared-loseit

+1

ihavryliuk-iqmessenger avatar Apr 15 '25 10:04 ihavryliuk-iqmessenger

Official fixes have been made in version 1.14.0-alpha01

LoveMyBaby avatar May 18 '25 00:05 LoveMyBaby

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.

chris-cprosoft avatar May 31 '25 17:05 chris-cprosoft

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!

hunterstich avatar Jun 02 '25 18:06 hunterstich

+1

Bykhkalo avatar Jun 06 '25 07:06 Bykhkalo

+1

samsonpaul87 avatar Jun 10 '25 05:06 samsonpaul87

@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!

samsonpaul87 avatar Jun 11 '25 05:06 samsonpaul87

+1

giveappsoficial avatar Jun 22 '25 23:06 giveappsoficial

+1

Distantman avatar Jul 01 '25 15:07 Distantman

+1

0xDOM avatar Jul 02 '25 17:07 0xDOM

+1

paperrose avatar Jul 03 '25 15:07 paperrose

+1

dmitriy-chernysh avatar Jul 17 '25 16:07 dmitriy-chernysh

+1

MaterialDatePicker.onStart() is using EdgeToEdgeUtils.applyEdgeToEdge() which is using deprecated methods window.setStatusBarColor(statusBarColor); window.setNavigationBarColor(navigationBarColor);

noxo avatar Aug 18 '25 18:08 noxo