مواد را بنویسید

رابط کاربری Jetpack Compose را با اجزای طراحی مواد آماده برای استفاده بسازید. این نقطه ورود سطح بالاتر Compose است که برای ارائه مؤلفه هایی مطابق با آنچه در www.material.io توضیح داده شده است طراحی شده است.
آخرین به روز رسانی انتشار پایدار نامزد انتشار نسخه بتا انتشار آلفا
24 جولای 2024 1.6.8 - 1.7.0-بتا06 -

ساختار

Compose ترکیبی از 7 شناسه گروه Maven در androidx است. هر گروه شامل یک زیرمجموعه هدفمند از عملکرد است که هر کدام مجموعه ای از یادداشت های انتشار خود را دارند.

این جدول گروه ها و پیوندهای هر مجموعه از یادداشت های انتشار را توضیح می دهد.

گروه شرح
آهنگسازی.انیمیشن انیمیشن هایی را در برنامه های Jetpack Compose خود بسازید تا تجربه کاربر را غنی تر کنید.
compose.compiler توابع @Composable را تغییر دهید و بهینه سازی ها را با افزونه کامپایلر Kotlin فعال کنید.
تألیف.بنیاد برنامه های Jetpack Compose را با بلوک های ساختمانی آماده بنویسید و پایه را گسترش دهید تا قطعات سیستم طراحی خود را بسازید.
آهنگسازی.مواد رابط کاربری Jetpack Compose را با اجزای طراحی مواد آماده برای استفاده بسازید. این نقطه ورود سطح بالاتر Compose است که برای ارائه مؤلفه هایی مطابق با آنچه در www.material.io توضیح داده شده است طراحی شده است.
نوشتن.مواد3 ایجاد رابط کاربری Jetpack Compose با 3 مؤلفه طراحی متریال، تکامل بعدی طراحی متریال. Material 3 شامل قالب‌ها و اجزای به‌روز شده و ویژگی‌های شخصی‌سازی Material You مانند رنگ پویا است و به گونه‌ای طراحی شده است که با سبک بصری جدید Android 12 و رابط کاربری سیستم هماهنگ باشد.
نوشتن. زمان اجرا بلوک‌های بنیادی مدل برنامه‌نویسی Compose و مدیریت حالت، و زمان اجرا اصلی برای هدف قرار دادن افزونه Compose Compiler.
compose.ui مؤلفه‌های اساسی نوشتن رابط کاربر برای تعامل با دستگاه، از جمله طرح‌بندی، طراحی، و ورودی مورد نیاز است.

اعلام وابستگی ها

برای افزودن وابستگی به Compose، باید مخزن Google Maven را به پروژه خود اضافه کنید. برای اطلاعات بیشتر ، مخزن Maven Google را بخوانید.

وابستگی‌های مصنوعات مورد نیاز خود را در فایل build.gradle برای برنامه یا ماژول خود اضافه کنید:

Groovy

dependencies {
    implementation "androidx.compose.material:material:1.6.8"
}

android {
    buildFeatures {
        compose true
    }

    composeOptions {
        kotlinCompilerExtensionVersion = "1.5.14"
    }

    kotlinOptions {
        jvmTarget = "1.8"
    }
}

Kotlin

dependencies {
    implementation("androidx.compose.material:material:1.6.8")
}

android {
    buildFeatures {
        compose = true
    }

    composeOptions {
        kotlinCompilerExtensionVersion = "1.5.14"
    }

    kotlinOptions {
        jvmTarget = "1.8"
    }
}

برای اطلاعات بیشتر درباره وابستگی‌ها، به افزودن وابستگی‌های ساخت نگاه کنید.

بازخورد

بازخورد شما به بهتر شدن Jetpack کمک می کند. اگر مسائل جدیدی کشف کردید یا ایده هایی برای بهبود این کتابخانه دارید، به ما اطلاع دهید. لطفاً قبل از ایجاد کتابخانه جدید، به مسائل موجود در این کتابخانه نگاهی بیندازید. با کلیک کردن روی دکمه ستاره می توانید رای خود را به یک موضوع موجود اضافه کنید.

یک شماره جدید ایجاد کنید

برای اطلاعات بیشتر به مستندات ردیاب مشکل مراجعه کنید.

نسخه 1.7

نسخه 1.7.0-beta06

24 جولای 2024

androidx.compose.material:material-*:1.7.0-beta06 منتشر شد. نسخه 1.7.0-beta06 حاوی این تعهدات است.

نسخه 1.7.0-beta05

10 جولای 2024

androidx.compose.material:material-*:1.7.0-beta05 منتشر شد. نسخه 1.7.0-beta05 حاوی این تعهدات است.

نسخه 1.7.0-beta04

26 ژوئن 2024

androidx.compose.material:material-*:1.7.0-beta04 منتشر شد. نسخه 1.7.0-beta04 حاوی این تعهدات است.

نسخه 1.7.0-beta03

12 ژوئن 2024

androidx.compose.material:material-*:1.7.0-beta03 منتشر شد. نسخه 1.7.0-beta03 حاوی این تعهدات است.

نسخه 1.7.0-beta02

29 مه 2024

androidx.compose.material:material-*:1.7.0-beta02 منتشر شد. نسخه 1.7.0-beta02 حاوی این تعهدات است.

تغییرات API

  • به‌روزرسانی API برای استایل کردن پیوندها: TextLinkStyles به TextStyle منتقل کرد و TextDefaults از مواد حذف کرد ( I5477b )

نسخه 1.7.0-beta01

14 مه 2024

androidx.compose.material:material-*:1.7.0-beta01 منتشر شد. نسخه 1.7.0-beta01 حاوی این تعهدات است.

تغییرات API

  • API را برای دریافت پیوندهایی با موضوع مواد در متن به‌روزرسانی کرد. به طور خاص، روش‌ها را از TextDefaults برای ساخت LinkAnnotations با مضمون حذف کرد و HTML را با پیوندهای مضمون تجزیه کرد. در عوض، یک کلاس TextLinkStyles اضافه کرد که اجازه می دهد تا به پیوندها به عنوان یک پارامتر به Text composable استایل دهید. ( I31b93 )

نسخه 1.7.0-alpha08

1 مه 2024

androidx.compose.material:material-*:1.7.0-alpha08 منتشر شد. نسخه 1.7.0-alpha08 حاوی این commit ها است.

تغییرات API

  • عدم اعمال backgroundColor به TextFieldDecorationBox و OutlinedTextFieldDecorationBox را برطرف کنید. جعبه های دکوراسیون اکنون یک پارامتر shape را می پذیرند. ( I371c2 , b/307694651 )
  • RippleConfiguration#isEnabled حذف شده است و LocalRippleConfiguration پوچ شده است. برای غیرفعال کردن ریپل، به جای ارائه یک RippleConfiguration با isEnabled = false ، null به LocalRippleConfiguration ارائه کنید. ( I22725 )
  • پیوندهای متنی علاوه بر یک ظاهر طراحی معمولی، دارای یک گزینه استایل حالت فشرده، شناور و فوکوس هستند. متدهای TextDefaults هر کدام یک آرگومان pressedStyle برای پشتیبانی از آن دارند. ( IC473f , b/139312671 )

رفع اشکال

  • لایه بالای OutlinedTextField برای برچسب اکنون اندازه فونت سیستم را به خود اختصاص می دهد. ( IDc781 )

نسخه 1.7.0-alpha07

17 آوریل 2024

androidx.compose.material:material-*:1.7.0-alpha07 منتشر شد. نسخه 1.7.0-alpha07 حاوی این تعهدات است.

تغییرات API

  • پیوندهای متنی علاوه بر استایل معمولی، گزینه استایل حالت فشرده را نیز دریافت کردند، شناور و فوکوس شدند. ( I5f864 , b/139312671 )
  • یک شی TextDefaults اضافه کرد که حاوی متدهایی برای ساخت LinkAnnotation و تجزیه رشته با برچسب HTML است که MaterialTheme روی پیوندها اعمال می کند. ( I98532 , b/139312671 )

نسخه 1.7.0-alpha06

3 آوریل 2024

androidx.compose.material:material-*:1.7.0-alpha06 منتشر شد. نسخه 1.7.0-alpha06 حاوی این تعهدات است.

اعلامیه

  • androidx.compose.material دیگر نیازی به استفاده از همان نسخه از هر مصنوع این گروه maven ندارد. کاربران می توانند نسخه های کتابخانه های بنیاد Compose ( Ie5fba ) را ترکیب و مطابقت دهند.

تغییرات API

  • پیش‌فرض‌های ModalDrawer و BottomDrawer بیشتری را به شیء DrawerDefaults منتقل کرد. ( Ib5b2e )

نسخه 1.7.0-alpha05

20 مارس 2024

androidx.compose.material:material-*:1.7.0-alpha05 منتشر شد. نسخه 1.7.0-alpha05 حاوی این تعهدات است.

تغییرات API

  • پرچم ScaffoldSubcomposeInMeasureFix حذف شده است. ( I67363 )

نسخه 1.7.0-alpha04

6 مارس 2024

androidx.compose.material:material-*:1.7.0-alpha04 منتشر شد. نسخه 1.7.0-alpha04 حاوی این تعهدات است.

ویژگی های جدید

نسخه 1.7.0-alpha03

21 فوریه 2024

androidx.compose.material:material-*:1.7.0-alpha03 منتشر شد. نسخه 1.7.0-alpha03 حاوی این commit ها است.

تغییرات API

  • BottomDrawer از آزمایشی به پایدار ارتقا یافته است. اکنون BottomDrawerState پیشرفت را به عنوان یک تابع نشان می دهد و امکان جستجوی پیشرفت بین اهداف خاص را فراهم می کند. BottomDrawerState اکنون اجازه سفارشی کردن مشخصات انیمیشن را می دهد، و confirmStateChange دیگر یک لامبدای آخر نیست. ( I9c029 , b/261423850 )
  • BackdropScaffold از آزمایشی به پایدار ارتقا یافته است. مشخصات انیمیشن در حال حاضر مطابق با دستورالعمل ها یک مشخصات tween است. پارامتر snackbarHost از BackdropScaffold دیگر آخرین پارامتر برای جلوگیری از اشتباه گرفتن با لامبداهای دنباله دار نیست. BackdropScaffoldState یک API progress(from, to) برای جستجوی پیشرفت بین لنگرها نشان می دهد. ( I73f48 , b/261423218 )
  • ورق های پایین استاندارد از آزمایشی به پایدار ارتقا یافته اند. سازنده های منسوخ حذف شده اند. مشخصات انیمیشن در حال حاضر مطابق با دستورالعمل ها یک مشخصات بین المللی است. ( I3c1a8 , b/278692145 , b/261409034 )
  • ورق های پایینی مدال از آزمایشی به پایدار ارتقا یافته اند. سازنده های منسوخ حذف شده اند. مشخصات انیمیشن در حال حاضر مطابق با دستورالعمل ها یک مشخصات tween است. ( Ic53f4 , b/278692145 , b/266780235 , b/261409034 )

رفع اشکال

  • مشکلی که در آن BackdropScaffold می‌توانست در سناریوهای خاص در ترکیب با LookaheadScope خراب شود، برطرف شد. ( I51396 )
  • برای بهبود عملکرد، ترکیب فرعی داخل BottomSheetScaffold حذف شد. مشکلی که در آن BottomSheetScaffold در سناریوهای خاص در ترکیب با LookaheadScope از کار می افتاد، برطرف شد. ( I2f90c )
  • ترکیب فرعی در ModalBottomSheetLayout حذف شد و عملکرد را بهبود بخشید. ( I7a025 )

نسخه 1.7.0-alpha02

7 فوریه 2024

androidx.compose.material:material-*:1.7.0-alpha02 منتشر شد. نسخه 1.7.0-alpha02 حاوی این commit ها است.

نسخه 1.7.0-alpha01

24 ژانویه 2024

androidx.compose.material:material-*:1.7.0-alpha01 منتشر شد. نسخه 1.7.0-alpha01 حاوی این commit ها است.

تغییرات رفتار

  • اجزای متریال برای استفاده از APIهای ریپل جدید منتقل شده اند و دیگر RippleTheme پرس و جو نمی کنند.

تغییرات API

  • rememberRipple و RippleTheme از Material-ripple منسوخ شده‌اند و API‌های Ripple و RippleConfiguration جدید به کتابخانه‌های متریال و سایر سیستم‌های طراحی اضافه شده‌اند.

  • مؤلفه‌های موادی که قبلاً یک MutableInteractionSource را می‌پذیرفتند و به‌طور پیش‌فرض { MutableInteractionSource() } را به خاطر می‌آوردند، اکنون یک MutableInteractionSource ته‌پذیر را می‌پذیرند و به‌جای آن به‌طور پیش‌فرض null می‌شوند. اگر در حال بالا بردن و استفاده از MutableInteractionSource نیستید، باید null را پاس کنید. این به برخی از مؤلفه‌ها اجازه می‌دهد تا تنها در صورت نیاز یک نمونه را ایجاد کنند و عملکرد را بهبود بخشند. همچنین توصیه می شود که تغییرات مشابهی را در اجزای خود ایجاد کنید.

نسخه 1.6

نسخه 1.6.8

12 ژوئن 2024

androidx.compose.material:material-*:1.6.8 منتشر شد. نسخه 1.6.8 شامل این commit ها است.

نسخه 1.6.7

1 مه 2024

androidx.compose.material:material-*:1.6.7 منتشر شد. نسخه 1.6.7 حاوی این commit ها است.

نسخه 1.6.6

17 آوریل 2024

androidx.compose.material:material-*:1.6.6 منتشر شد. از آخرین نسخه تغییری نکرده است.

نسخه 1.6.5

3 آوریل 2024

androidx.compose.material:material-*:1.6.5 منتشر شد. نسخه 1.6.5 حاوی این commit ها است.

نسخه 1.6.4

20 مارس 2024

androidx.compose.material:material-*:1.6.4 منتشر شد. نسخه 1.6.4 حاوی این commit ها است.

نسخه 1.6.3

6 مارس 2024

androidx.compose.material:material-*:1.6.3 منتشر شد. نسخه 1.6.3 شامل این commit ها است.

رفع اشکال

  • رگرسیون را در ExposedDropdownMenu رفع کنید تا دوباره قابل فوکوس شود. ( c0e0ed , b/323694447 )

نسخه 1.6.2

21 فوریه 2024

androidx.compose.material:material-*:1.6.2 منتشر شد. نسخه 1.6.2 حاوی این commit ها است.

نسخه 1.6.1

7 فوریه 2024

androidx.compose.material:material-*:1.6.1 منتشر شد. نسخه 1.6.1 حاوی این commit ها است.

نسخه 1.6.0

24 ژانویه 2024

androidx.compose.material:material-*:1.6.0 منتشر شد. نسخه 1.6.0 حاوی این commit ها است.

نسخه 1.6.0-rc01

10 ژانویه 2024

androidx.compose.material:material-*:1.6.0-rc01 منتشر شد. نسخه 1.6.0-rc01 حاوی این commit ها است.

نسخه 1.6.0-beta03

13 دسامبر 2023

androidx.compose.material:material-*:1.6.0-beta03 منتشر شد. نسخه 1.6.0-beta03 حاوی این تعهدات است.

نسخه 1.6.0-beta02

29 نوامبر 2023

androidx.compose.material:material-*:1.6.0-beta02 منتشر شد. نسخه 1.6.0-beta02 حاوی این تعهدات است.

نسخه 1.6.0-beta01

15 نوامبر 2023

androidx.compose.material:material-*:1.6.0-beta01 منتشر شد. نسخه 1.6.0-beta01 حاوی این تعهدات است.

نسخه 1.6.0-alpha08

18 اکتبر 2023

androidx.compose.material:material-*:1.6.0-alpha08 منتشر شد. نسخه 1.6.0-alpha08 حاوی این commit ها است.

تغییرات API

  • یک تابع materialIcon را به نفع اضافه بار آن که یک پارامتر autoMirror می گیرد، منسوخ کنید. ( Ia338d )

رفع اشکال - افزایش خودکار ارتفاع مورد ناوبری برای محتوای بزرگ. ( 0c4ecc , b/272336962 )

نسخه 1.6.0-alpha07

4 اکتبر 2023

androidx.compose.material:material-*:1.6.0-alpha07 منتشر شد. نسخه 1.6.0-alpha07 حاوی این commit ها است.

  • به روز رسانی وابستگی

نسخه 1.6.0-alpha06

20 سپتامبر 2023

androidx.compose.material:material-*:1.6.0-alpha06 منتشر شد. نسخه 1.6.0-alpha06 حاوی این commit ها است.

تغییر رفتار

  • عملکرد مربوط به کشو از BottomSheetScaffold حذف شد. برای دستیابی به عملکرد قبلی، BottomSheetScaffold خود را در یک کشو قابل ترکیب بپیچید. برای مثال به BottomSheetScaffoldWithDrawerSample مراجعه کنید. ( I1dcc8 )

تغییرات API

  • یک پرچم موقت برای کنترل اینکه آیا Scaffold باید فرزندان خود را در حین اندازه گیری یا در حین قرار دادن اندازه گیری کند، معرفی کرد. به طور پیش فرض، این در اندازه گیری اندازه گیری می شود. اگر در رابطه با رفتار جدید با مشکلاتی روبرو هستید، لطفاً مشکلی را ثبت کنید. ( If6e3b )

نسخه 1.6.0-alpha05

6 سپتامبر 2023

androidx.compose.material:material-*:1.6.0-alpha05 منتشر شد. نسخه 1.6.0-alpha05 حاوی این commit ها است.

ویژگی های جدید

  • هنگامی که در طرح‌بندی‌های راست به چپ ارائه می‌شوند، پشتیبانی از آیکون‌های آینه‌ای خودکار اضافه شد. آیکون‌های موجود در ماژول‌های material-icons-core و material-icons-extended هم‌اکنون مجموعه‌های آیکون اضافی را برای پشتیبانی از آینه‌سازی خودکار در زمانی که نماد اجازه می‌دهد، ارائه می‌کنند. مجموعه‌های جدید با Icons.AutoMirrored.Filled... و غیره پیشوند دارند و نمادهایی را نگه می‌دارند که به صورت خودکار در طرح‌بندی‌های RTL منعکس می‌شوند. برای لیست نمادهایی که می توانند (و باید) به صورت خودکار آینه شوند، به لیست نمادهای مواد مراجعه کنید.

تغییرات API

  • هنگامی که در طرح‌بندی‌های راست به چپ ارائه می‌شوند، پشتیبانی از آیکون‌های آینه‌ای خودکار اضافه شد. آیکون‌های موجود در ماژول‌های material-icons-core و material-icons-extended هم‌اکنون مجموعه‌های آیکون اضافی را برای پشتیبانی از آینه‌سازی خودکار در زمانی که نماد اجازه می‌دهد، ارائه می‌کنند. مجموعه‌های جدید با Icons.AutoMirrored.Filled... و غیره پیشوند دارند و نمادهایی را نگه می‌دارند که به صورت خودکار در طرح‌بندی‌های RTL منعکس می‌شوند. برای لیست نمادهایی که می توانند (و باید) به صورت خودکار آینه شوند، به لیست نمادهای مواد مراجعه کنید. ویژگی‌های نماد قبلاً ارائه‌شده برای آن نمادها اکنون به‌عنوان منسوخ علامت‌گذاری شده‌اند و یک پیشنهاد بلوک جایگزین برای کمک به انتقال ارائه می‌دهند. در صورتی که کنترل خاصی برای بازتاب آیکون ها در RTL ندارید، توصیه می کنیم به مجموعه جدید آیکون ها مهاجرت کنید. برای مثال، Icons.Filled.ArrowBack باید دوباره به Icons.AutoMirrored.Filled.ArrowBack تبدیل شود. ( I4b511 )

نسخه 1.6.0-alpha04

23 آگوست 2023

androidx.compose.material:material-*:1.6.0-alpha04 منتشر شد. نسخه 1.6.0-alpha04 حاوی این commit ها است.

رفع اشکال

  • مشکلی را برطرف کرد که در آن برخی از مؤلفه‌ها با استفاده از Subcomposition (مثلاً BottomSheetScaffold ) در داخل یک داربست در یک LookaheadScope سعی داشتند اندازه خود را خیلی زود بخوانند. ( If2c5d )
  • محاسبه offset DropdownMenu ثابت شد، بنابراین افست های x صرفاً به جهت طرح بندی محلی بستگی دارد، و زمانی که منو نزدیک به پایین صفحه باشد، افست های y دیگر برعکس نمی شوند. ( Iccc74 , b/294103942 )
  • ساختار داخلی BottomSheetScaffold را بهینه کرد و مشکل احتمالی BottomSheetScaffold را در داخل LookaheadLayout برطرف کرد. ( Ic0afa )

نسخه 1.6.0-alpha03

9 آگوست 2023

androidx.compose.material:material-*:1.6.0-alpha03 منتشر شد. نسخه 1.6.0-alpha03 حاوی این commit ها است.

تغییرات API

  • اجزای Material2 اکنون یک API جداگانه برای عبور windowInsets برای پشتیبانی از عملکرد لبه به لبه در اندروید دارند. برخلاف مولفه های material3، کامپوننت های material2 به طور پیش فرض از inset ها پشتیبانی نمی کنند و مقدار باید به صورت دستی ارسال شود. برای راهنمایی به نمونه های مربوطه مراجعه کنید. ( I655e8 )

نسخه 1.6.0-alpha02

26 جولای 2023

androidx.compose.material:material-*:1.6.0-alpha02 منتشر شد. نسخه 1.6.0-alpha02 حاوی این commit ها است.

تغییرات API

  • ما وابستگی چگالی را به سطح جزء منتقل می کنیم. این برای مؤلفه‌های زیر اعمال می‌شود: SwipeToDismiss و مؤلفه‌های مبتنی بر برگه. لطفاً از اضافه بار جدید ارائه شده در جایی که چگالی یک پارامتر است استفاده کنید. ( I1846e )
  • حاشیه نویسی های اضافی برای تعیین ورودی های مجاز به composable ها ( I51109 )
  • فایل های API به روز شده برای حاشیه نویسی حذف سازگاری ( I8e87a , b/287516207 )
  • تراز شروع جدید برای FabPosition اضافه شد ( Ib7aea , b/170592777 )
  • TextFieldColorsWithIcons در Material 2 به نفع TextFieldColors منسوخ شده است. هنگام نادیده گرفتن leadingIconColor یا trailingIconColor ، اضافه بار را نیز با interactionSource لغو کنید. ( Id57ed , b/199377790 )

نسخه 1.6.0-alpha01

21 ژوئن 2023

androidx.compose.material:material-*:1.6.0-alpha01 منتشر شد. نسخه 1.6.0-alpha01 حاوی این commit ها است.

تغییرات رفتار

  • includeFontPadding اکنون به طور پیش فرض در تایپوگرافی Material 2 false است. سبک ارتفاع خط پیش‌فرض نیز به Trim.None و Alignment.Center تغییر یافته است و lineHeight صریح (در sp) به TextStyle Typography اضافه شده است. اگر می‌خواهید این مقادیر را سفارشی کنید، با اسناد API مشورت کنید و برای توضیح عمیق این تغییرات ، پست وبلاگ را ببینید. ( Icabc3 , I3f801 , I04c03 )

تغییرات API

  • APIهای Swipeable Material منسوخ شده‌اند. لطفاً به APIهای AnchoredDraggable Foundation مراجعه کنید که برای موارد استفاده ساده و پیچیده بهینه شده اند. ( I732e0 )

رفع اشکال

  • BottomSheetState ، ModalBottomSheetState و BottomDrawerState اکنون یک ویژگی پیشرفت را نشان می دهند که نشان دهنده پیشرفت بین لنگر فعلی (ته نشین شده) و نزدیکترین لنگر در جهت کشیدن انگشت است. ( I1b317 , b/271169225 , b/276375124 , b/276776071 , b/270066861 )

نسخه 1.5

نسخه 1.5.4

18 اکتبر 2023

androidx.compose.material:material-*:1.5.4 منتشر شد. نسخه 1.5.4 حاوی این commit ها است.

نسخه 1.5.3

4 اکتبر 2023

androidx.compose.material:material-*:1.5.3 منتشر شد. این نسخه هیچ تغییری ندارد

نسخه 1.5.2

27 سپتامبر 2023

androidx.compose.material:material-*:1.5.2 منتشر شد. نسخه 1.5.2 حاوی این commit ها است.

نسخه 1.5.1

6 سپتامبر 2023

androidx.compose.material:material-*:1.5.1 بدون هیچ تغییری منتشر شد. نسخه 1.5.1 حاوی این commit ها است.

نسخه 1.5.0

9 آگوست 2023

androidx.compose.material:material-*:1.5.0 منتشر شد. نسخه 1.5.0 حاوی این commit ها است.

تغییرات مهم از 1.4.0

تغییرات API

  • تغییرات در APIهای Swipeable1 در BottomSheetScaffold گنجانده شده است. پارامتر confirmStateChange BottomSheetState به confirmValueChange تغییر نام داده است. progress اکنون به عنوان یک مقدار شناور نمایش داده می شود. animateTo و snapTo داخلی هستند. به جای آن expand() و collapse() استفاده کنید. direction و overflow حذف شده است. offset با requireOffset() جایگزین شده است. I323b4
  • عملکرد snapTo را در کشو به عنوان API غیر آزمایشی علامت گذاری کنید. ( Ib9c18 , b/261425368 )
  • یک پارامتر رنگ مسیر برای نشانگرهای پیشرفت دایره ای، و یک پارامتر سرپوش برای هر دو شاخص پیشرفت دایره ای و خطی اضافه شده است. ( Ie668c , b/216325962 , b/222964817 )
  • تغییر نام به ModalBottomSheetState ، ModalBottomSheetState.Saver و rememberModalBottomSheetState 's confirmStateChange to confirmValueChange . ( Ib48d1 )
  • Modifier.minimumInteractiveComponentSize را اضافه کنید. اگر عنصر کوچکتر باشد، می توان از آن برای رزرو حداقل 48.dp در اندازه برای رفع ابهام از تعاملات لمسی استفاده کرد. ( I33f58 , b/258495559 )
  • تغییرات در APIهای Swipeable در ModalBottomSheetLayout گنجانده شده است. ModalBottomSheetState animateTo دیگر پارامتر animationSpec را نمی گیرد و افست در معرض نمایش اکنون قابل تهی است. برای نیاز به افست از requireOffset استفاده کنید. ( Ia2e79 )
  • افزودن حاشیه نویسی @JvmDefaultWithCompatibility ( I8f206 )
  • تغییرات در APIهای Swipeable در ModalDrawer. DrawerState animateTo در ModalDrawer. DrawerState با متدهای باز و بسته جایگزین شده است و افست اکنون باطل است. برای نیاز به افست از requireOffset استفاده کنید. ( I3de9e )
  • کشوها و برگه‌ها برای تأخیر صحیح فشارها در صورتی که حرکات ممکن است به رویدادهای پیمایش تبدیل شوند، به‌روزرسانی شدند.
  • اضافه شدن پارامتر minLines به متریال و متریال3 Text، TextField و OutlinedTextField که امکان تنظیم حداقل ارتفاع جزء بر حسب تعداد خطوط را فراهم می کند ( I4af1d )

رفع اشکال

  • مشکلی را برطرف می‌کند که در آن pullRefresh سرعت را مصرف نمی‌کرد و باعث نمایش Overscroll می‌شد. همچنین امضای API لامبدا onRelease را در Modifier.pullRefresh تغییر داد تا یک Float برای سرعت مصرف شده برگرداند ( I7db65 , b/266874741 )
  • BottomSheetState ، ModalBottomSheetState و BottomDrawerState اکنون یک ویژگی پیشرفت را نشان می دهند که نشان دهنده پیشرفت بین لنگر فعلی (ته نشین شده) و نزدیکترین لنگر در جهت کشیدن انگشت است. ( I1b317 , b/271169225 , b/276375124 , b/276776071 , b/270066861 )
  • عمل رد کردن AlertDialog را برطرف کرد تا زمانی که کنش‌ها روی هم قرار می‌گیرند تا در عرض گفتگو قرار گیرند، در زیر عمل تأیید ظاهر شود. این اصلاح پیاده سازی را با مشخصات طراحی متریال هماهنگ می کند. ( I029de , b/235454277 )
  • وقتی gesturesEnabled روی false تنظیم شود، BottomSheetScaffold دیگر در پیمایش تودرتو شرکت نخواهد کرد. ( I634f3 , b/215403277 )
  • رفع اشکالی که در آن BottomSheetScaffold در صورت ارائه محتوای خالی برای اسلات ها خراب می شد. ( Ib24a5 , b/235588730 )
  • PullRefreshIndicator رهگیری کلیک ها/رویدادهای اشاره گر را رفع می کند. ( 2494256 , b/271777421 )
  • مشکلی که در آن ModalBottomSheetLayout در یک مورد لبه در تغییر جهت از کار می افتاد، برطرف شد. انیمیشن های چیدمان (مانند Modifier.animateContentSize ) در/روی محتوای برگه اکنون به راحتی کار می کنند. ( I2f981 , b/266780234 )

نسخه 1.5.0-rc01

26 جولای 2023

androidx.compose.material:material-*:1.5.0-rc01 منتشر شد. نسخه 1.5.0-rc01 حاوی این commit ها است.

نسخه 1.5.0-beta03

28 ژوئن 2023

androidx.compose.material:material-*:1.5.0-beta03 منتشر شد. نسخه 1.5.0-beta03 حاوی این تعهدات است.

رفع اشکال

  • BottomSheetState ، ModalBottomSheetState و BottomDrawerState اکنون یک ویژگی پیشرفت را نشان می دهند که نشان دهنده پیشرفت بین لنگر فعلی (ته نشین شده) و نزدیکترین لنگر در جهت کشیدن انگشت است. ( I1b317 , b/271169225 , b/276375124 , b/276776071 , b/270066861 )

نسخه 1.5.0-beta02

7 ژوئن 2023

androidx.compose.material:material-*:1.5.0-beta02 منتشر شد. نسخه 1.5.0-beta02 حاوی این تعهدات است.

نسخه 1.5.0-beta01

24 مه 2023

androidx.compose.material:material-*:1.5.0-beta01 منتشر شد. نسخه 1.5.0-beta01 حاوی این تعهدات است.

تغییرات API

  • افست های DrawerState و BottomDrawerState دیگر باطل نمی شوند. آنها در عوض Float.NaN را برای نشان دادن عدم وجود افست برمی گردانند. ( Ie9855 )
  • برای کنترل وضعیت اسکرول عمودی آیتم های منوی نمایش داده شده، گزینه ای برای عبور در یک ScrollState هنگام ساخت یک DropdownMenu یا یک ExposedDropdownMenu اضافه شده است. ( Idb009 , b/185304441 )
  • پشتیبانی برای فعال/غیرفعال کردن ژست ModalBottomSheetLayout اضافه کنید تا کاربر بتواند این را برای صفحه پایینی برجسته تر پیکربندی کند ( I40af0 )
  • یک پارامتر رنگ را به BasicText اضافه کرد تا امکان متحرک سازی کارآمد یا تنظیم رنگ متن را فراهم کند. ( Iffd88 , b/246961787 )
  • تغییر نام ویژگی Semantics isContainer به isTraversalGroup ( I121f6 )

رفع اشکال

  • عمل رد کردن AlertDialog را برطرف کرد تا زمانی که کنش‌ها روی هم قرار می‌گیرند تا در عرض گفتگو قرار گیرند، در زیر عمل تأیید ظاهر شود. این اصلاح پیاده سازی را با مشخصات طراحی متریال هماهنگ می کند. ( I029de , b/235454277 )

نسخه 1.5.0-alpha04

10 مه 2023

androidx.compose.material:material-*:1.5.0-alpha04 منتشر شد. نسخه 1.5.0-alpha04 حاوی این commit ها است.

تغییرات API

  • ما وابستگی چگالی را به سطح جزء منتقل می کنیم. این برای اجزای زیر اعمال می‌شود: BottomDrawer ، ModalBottomSheetLayout ، BottomSheetScaffold ، Switch ، ModalDrawer . لطفاً از اضافه بار جدید ارائه شده در جایی که چگالی یک پارامتر است استفاده کنید. ( I8fbd8 )

نسخه 1.5.0-alpha03

19 آوریل 2023

androidx.compose.material:material-*:1.5.0-alpha03 منتشر شد. نسخه 1.5.0-alpha03 حاوی این commit ها است.

تغییرات API

  • برای استفاده از SwipeableV2 APIهای داخلی BottomDrawer را به روز کنید. به دلیل این که BottomDrawerState اکنون فقط دارای APIS تعریف شده در سطح کلاس خواهد بود، روش ها/ویژگی ها را از SwipeableState به ارث نمی برد. ما از ترکیب با SwipeableV2State داخلی استفاده می کنیم. Offset اکنون یک ویژگی ممیز شناور قابل تهی است، مقدار فعلی و مقدار هدف Swipe هنوز هم از طریق ویژگی های currentValue و targetValue قابل دسترسی هستند. روش‌های سطح کلاس قبلی مانند open/expand/close و ویژگی‌هایی مانند isOpen/isClosed همچنان پشتیبانی می‌شوند. ( Iad40c , b/178529942 , b/220676296 )

رفع اشکال

  • داخلی های مؤلفه سوئیچ به روز شده است. سوئیچ اکنون نزدیکترین (وضعیت هدف) را هنگام کشیدن پیش نمایش می کند. ( ID90d4 )
  • محتوای صفحه متحرک (به عنوان مثال Modifier.animateContentSize در محتوای برگه) در BottomSheetScaffold بهینه شده است و اکنون به راحتی کار می کند. ( Ia913c , b/270518202 , b/254446195 )
  • وقتی gesturesEnabled روی false تنظیم شود، BottomSheetScaffold دیگر در پیمایش تودرتو شرکت نخواهد کرد. ( I634f3 , b/215403277 )

نسخه 1.5.0-alpha02

5 آوریل 2023

androidx.compose.material:material-*:1.5.0-alpha02 منتشر شد. نسخه 1.5.0-alpha02 حاوی این commit ها است.

رفع اشکال

  • رفع اشکالی که در آن BottomSheetScaffold در صورت ارائه محتوای خالی برای اسلات ها خراب می شد. ( Ib24a5 , b/235588730 )
  • PullRefreshIndicator رهگیری کلیک ها/رویدادهای اشاره گر را رفع می کند ( 2494256 , b/271777421 )

نسخه 1.5.0-alpha01

22 مارس 2023

androidx.compose.material:material-*:1.5.0-alpha01 منتشر شد. نسخه 1.5.0-alpha01 حاوی این commit ها است.

رفع اشکال

  • یک نمونه جریان مجدد گروه تراشه اضافه کنید. بالشتک افقی بین تراشه های فرزند را در نمونه گروه تراشه تک خطی به روز کنید تا با مشخصات مطابقت داشته باشد. ( I3b155 )
  • مشکلی که در آن ModalBottomSheetLayout در یک مورد لبه در تغییر جهت از کار می افتاد، برطرف شد. انیمیشن های چیدمان (مانند Modifier.animateContentSize ) در/روی محتوای برگه اکنون به راحتی کار می کنند. ( I2f981 , b/266780234 )

نسخه 1.4

نسخه 1.4.3

3 مه 2023

androidx.compose.material:material-*:1.4.3 بدون هیچ تغییری منتشر شد (فقط یک نسخه برآمده).

نسخه 1.4.2

19 آوریل 2023

androidx.compose.material:material-*:1.4.2 منتشر شد. نسخه 1.4.2 حاوی این commit ها است.

نسخه 1.4.1

5 آوریل 2023

androidx.compose.material:material-*:1.4.1 منتشر شد. نسخه 1.4.1 حاوی این commit ها است.

نسخه 1.4.0

22 مارس 2023

androidx.compose.material:material-*:1.4.0 منتشر شد. نسخه 1.4.0 حاوی این commit ها است.

تغییرات مهم از 1.3.0

تغییرات API

  • Modifier.minimumInteractiveComponentSize را اضافه کنید. اگر عنصر کوچکتر باشد، می توان از آن برای رزرو حداقل 48.dp در اندازه برای رفع ابهام از تعاملات لمسی استفاده کرد. ( I33f58 , b/258495559 )
  • تغییرات در APIهای Swipeable در ModalDrawer گنجانده شده است. animateTo در DrawerState با متدهای باز و بسته جایگزین شده است و افست اکنون باطل است. برای نیاز به افست از requireOffset استفاده کنید. ( I3de9e )
  • اضافه شدن پارامتر minLines به متریال و متریال3 Text، TextField و OutlinedTextField که امکان تنظیم حداقل ارتفاع جزء بر حسب تعداد خطوط را فراهم می کند ( I4af1d )
  • پارامتر minLines به BasicText و BasicTextField اضافه شد. این اجازه می دهد تا حداقل ارتفاع این ترکیبات را از نظر تعداد خطوط تنظیم کنید ( I24294 , b/122476634 )

نسخه 1.4.0-rc01

8 مارس 2023

androidx.compose.material:material-*:1.4.0-rc01 بدون هیچ تغییری منتشر شد. نسخه 1.4.0-rc01 حاوی این commit ها است.

نسخه 1.4.0-beta02

22 فوریه 2023

androidx.compose.material:material-*:1.4.0-beta02 منتشر شد. نسخه 1.4.0-beta02 حاوی این تعهدات است.

تغییرات API

  • تغییرات در APIهای Swipeable در BottomSheetScaffold گنجانده شده است. پارامتر confirmStateChange BottomSheetState به confirmValueChange تغییر نام داده است. progress اکنون به عنوان یک مقدار شناور نمایش داده می شود. animateTo و snapTo داخلی هستند. به جای آن expand() و collapse() استفاده کنید. direction و overflow حذف شده است. offset با requireOffset() جایگزین شده است. ( I323b4 )

رفع اشکال

  • نقش‌های معنایی را از سطوح قابل کلیک و انتخاب حذف کرد، مؤلفه‌های به‌روزرسانی شد که از آنها برای تنظیم نقش‌ها با استفاده از modifier.semantics استفاده می‌کردند ( Ibb4ba )
  • به‌روزرسانی جزئی برای نمادهای متریال توسعه‌یافته که آیکون‌های desktop_mac پر شده، directions و kitchen را تغییر می‌دهد. ( I65f5e )

نسخه 1.4.0-beta01

8 فوریه 2023

androidx.compose.material:material-*:1.4.0-beta01 منتشر شد. نسخه 1.4.0-beta01 حاوی این تعهدات است.

تغییرات API

  • مشکلی را برطرف می‌کند که در آن pullRefresh سرعت را مصرف نمی‌کرد و باعث نمایش Overscroll می‌شد. همچنین امضای API لامبدا onRelease را در Modifier.pullRefresh تغییر داد تا یک Float برای سرعت مصرف شده برگرداند ( I7db65 , b/266874741 )
  • گیرنده ویژگی بازیابی LocalMinimuTouchTargetEnforcement و علامت گذاری آن به عنوان منسوخ شده و هدایت به LocalMinimumInteractiveComponentEnforcement . ( I60dd5 )

نسخه 1.4.0-alpha05

25 ژانویه 2023

androidx.compose.material:material-*:1.4.0-alpha05 منتشر شد. نسخه 1.4.0-alpha05 حاوی این commit ها است.

رفع اشکال

  • مشکلی که در آن حالت ModalBottomSheetLayout's HalfExpanded اشتباه محاسبه شده بود و به نظر می‌رسید که برگه شناور است، برطرف شد. ( I8c615 , b/265610459 )
  • یک اشکال در ModalBottomSheetLayout که در آن ورق هنگام رفتن از حالت پنهان به حالت قابل مشاهده در برخی شرایط خراب می شد، رفع شد. ( Ia9265 , b/265444789 )

نسخه 1.4.0-alpha04

11 ژانویه 2023

androidx.compose.material:material-*:1.4.0-alpha04 منتشر شد. نسخه 1.4.0-alpha04 حاوی این commit ها است.

تغییرات API

  • در ویژگی معنایی IsContainer در Surfaces اضافه شده است. این ویژگی در تغییر بعدی استفاده خواهد شد که ترتیب پیمایش را بر اساس معنای معنایی عناصری مانند سطوح تعیین می کند. ( I63379 )
  • عملکرد snapTo را در کشو به عنوان API غیر آزمایشی علامت گذاری کنید. ( Ib9c18 , b/261425368 )
  • یک پارامتر رنگ مسیر برای نشانگرهای پیشرفت دایره ای، و یک پارامتر سرپوش برای هر دو شاخص پیشرفت دایره ای و خطی اضافه شده است. ( Ie668c , b/216325962 , b/222964817 )
  • تغییر نام به ModalBottomSheetState ، ModalBottomSheetState.Saver و rememberModalBottomSheetState 's confirmStateChange to confirmValueChange . ( Ib48d1 )
  • تهی پذیری بیشتر نوع بازگشت توابع منسوخ-مخفی ( Ibf7b0 )
  • Modifier.minimumInteractiveComponentSize را اضافه کنید. اگر عنصر کوچکتر باشد، می توان از آن برای رزرو حداقل 48.dp در اندازه برای رفع ابهام از تعاملات لمسی استفاده کرد. ( I33f58 , b/258495559 )
  • تغییرات در APIهای Swipeable در ModalBottomSheetLayout گنجانده شده است. ModalBottomSheetState animateTo دیگر پارامتر animationSpec را نمی گیرد و offset در معرض نمایش اکنون قابل تهی است. برای نیاز به offset از requireOffset استفاده کنید. ( Ia2e79 )

رفع اشکال

  • ورق ModalBottomSheetLayout اکنون حداکثر عرض 640 dp دارد. ( I71a4f , b/234927577 )
  • مشکلی را برطرف می کند که در آن rememberPullRefreshState در طول زمان refreshThreshold و refreshingOffset را به روز نمی کرد. ( Ifed10 , b/263159832 )
  • پیشرفت برای شاخص های پیشرفت اکنون به درستی به محدوده مورد انتظار آن محدود شده است. ( I8a7eb , b/262262727 )
  • هنگامی که ModalBottomSheetState هنوز هیچ لنگری دریافت نکرده است، هنگامی که snapTo یا animateTo فراخوانی می شود به جای ایجاد استثنا، currentValue بدون انیمیشن به روز می کند. ( I2c91b )
  • وضعیت فعال در اجرای Material 2 FilterChip رفع شد. ( ID326a , b/261329817 )
  • رفع اشکالی که در آن ModalBottomSheetLayout در صورتی که HalfExpanded بود هنگام چرخش از حالت عمودی به افقی خراب می شد. لطفاً مطمئن شوید که initialValue صحیح را ارسال می کنید، برای مثال با بررسی پیکربندی. ( Ie8df7 , b/182882364 )
  • مشکلی را که در آن در صورت خالی بودن محتوای برگه خراب می شد ModalBottomSheetLayout برطرف شد. ModalBottomSheetLayout اکنون به محتوای برگه خالی اجازه می دهد. اگر محتوای برگه خالی باشد، فقط حالت Hidden خواهد داشت. ( Ic2288 , b/200980998 , b/216693030 )

مشکل شناخته شده

  • هنگام به‌روزرسانی از androidx.compose.foundation:1.4.0-alpha03 به androidx.compose.foundation:1.4.0-alpha04 ، ممکن است با خطای java.lang.NoSuchFieldError مواجه شوید. اینجا جایی است که موضوع در ابتدا گزارش شده است. اصلاحی ارسال شده است و در به‌روزرسانی بعدی Compose در دسترس خواهد بود. به عنوان یک کار، کتابخانه های androidx.compose.material و androidx.compose.material3 خود را به آخرین نسخه (1.1.0-alpha04) به روز کنید یا androidx.compose.foundation خود را به 1.4.0-alpha03 تنزل دهید.

نسخه 1.4.0-alpha03

7 دسامبر 2022

androidx.compose.material:material-*:1.4.0-alpha03 منتشر شد. نسخه 1.4.0-alpha03 حاوی این commit ها است.

تغییرات API

  • افزودن حاشیه نویسی @JvmDefaultWithCompatibility ( I8f206 )
  • تغییرات در APIهای Swipeable در ModalDrawer گنجانده شده است. animateTo در DrawerState با متدهای open و close جایگزین شده است و افست اکنون باطل است. برای نیاز به افست از requireOffset استفاده کنید. ( I3de9e )
  • یک Modifier API برای جستجوی اطلاعات اسکرول اجداد اضافه شده است. ( I2ba9d , b/203141462 )
  • در Clickable برای به تأخیر انداختن صحیح تعاملات مطبوعاتی استفاده می‌شود، زمانی که حرکات ممکن است به رویدادهای پیمایش تبدیل شوند.
  • هنگامی که در داخل یک Scrollable ViewGroup استفاده می شود، Clickables ثابت شد که امواج را به درستی به تاخیر نمی اندازند.
  • کشوها و برگه‌ها برای تأخیر صحیح فشارها در صورتی که حرکات ممکن است به رویدادهای پیمایش تبدیل شوند، به‌روزرسانی شدند.

رفع اشکال

  • مشکلی که در آن PullRefreshIndicator می‌توانست پس از onRefresh گیر کند، اگر وضعیت تازه‌سازی به درست تغییر نمی‌کرد، برطرف شد. ( Ie2416 , b/248274004 )

به روز رسانی های وابستگی

  • Compose UI و Compose Material اکنون به Lifecycle 2.5.1 بستگی دارد. ( I05ab0 , b/258038814 )

نسخه 1.4.0-alpha02

9 نوامبر 2022

androidx.compose.material:material-*:1.4.0-alpha02 منتشر شد. نسخه 1.4.0-alpha02 حاوی این commit ها است.

تغییرات API

  • awaitFirstDown و waitForUpOrCancellation اکنون PointerEventPass برای انعطاف پذیری بیشتر می پذیرند. ( I7579a , b/212091796 )
  • اضافه شدن پارامتر minLines به متریال و متریال3 Text، TextField و OutlinedTextField که امکان تنظیم حداقل ارتفاع جزء بر حسب تعداد خطوط را فراهم می کند ( I4af1d )
  • پارامتر minLines به BasicTex t و BasicTextField اضافه شد. این اجازه می دهد تا حداقل ارتفاع این ترکیبات را از نظر تعداد خطوط تنظیم کنید ( I24294 , b/122476634 )

نسخه 1.4.0-alpha01

24 اکتبر 2022

androidx.compose.material:material-*:1.4.0-alpha01 منتشر شد. نسخه 1.4.0-alpha01 حاوی این commit ها است.

تغییرات API

  • یک روش جدید، awaitEachGesture() برای آشکارسازهای اشاره اضافه شد. شبیه به forEachGesture() عمل می‌کند، اما حلقه روی ژست‌ها کاملاً در AwaitPointerEventScope عمل می‌کند تا رویدادها بین تکرارها از بین نرود.
  • forEachGesture() به نفع awaitEachGesture() منسوخ شده است زیرا اجازه می دهد رویدادها بین حرکات از بین بروند. ( Iffc3f , b/251260206 )

نسخه 1.3

نسخه 1.3.1

9 نوامبر 2022

androidx.compose.material:material-*:1.3.1 منتشر شد. نسخه 1.3.1 حاوی این commit ها است.

نسخه 1.3.0

24 اکتبر 2022

androidx.compose.material:material-*:1.3.0 منتشر شد. نسخه 1.3.0 حاوی این commit ها است.

تغییرات مهم از 1.2.0

تغییر رفتار شکسته

  • حداکثر ارتفاع پشتیبانی شده در گفتگوها و پنجره های بازشو به 8dp کاهش یافته است.

تغییرات API

  • یک مؤلفه Pull-To-Refresh به Compose اضافه کنید ( I29168 ).
  • نام پارامتر را از مقادیر به مقدار در RangeSlider تغییر دهید ( I3b79a ).

نسخه 1.3.0-rc01

5 اکتبر 2022

androidx.compose.material:material-*:1.3.0-rc01 منتشر شد. نسخه 1.3.0-rc01 حاوی این commit ها است.

نسخه 1.3.0-beta03

21 سپتامبر 2022

androidx.compose.material:material-*:1.3.0-beta03 منتشر می شود. نسخه 1.3.0-beta03 شامل این تعهدات است.

تغییرات API

  • برای آهنگسازی یک مؤلفه Pull-to-Refresh اضافه کنید ( I29168 )

نسخه 1.3.0-beta02

7 سپتامبر 2022

androidx.compose.material:material-*:1.3.0-beta02 منتشر می شود. نسخه 1.3.0-beta02 شامل این تعهدات است.

از 1.3.0-beta01 هیچ تغییری وجود ندارد

نسخه 1.3.0-beta01

24 آگوست 2022

androidx.compose.material:material-*:1.3.0-beta01 منتشر می شود. نسخه 1.3.0-beta01 شامل این تعهدات است.

تغییر رفتار تغییر

حداکثر ارتفاع پشتیبانی شده در گفتگوها و پنجره ها به 8DP کاهش یافته است.

حداکثر ارتفاع پشتیبانی شده برای گفتگوی و پنجره های آهنگسازی از 30DP به 8DP کاهش یافته است. این تغییر بر هر دو گفتگوی مواد و بازشو های سفارشی UI تأثیر می گذارد. این تغییر برای کاهش یک اشکال دسترسی در نسخه های Android در زیر S انجام شده است ، و اطمینان حاصل می کند که خدمات دسترسی در آن ویندوز قادر به تعامل با محتوای داخل گفتگو یا پنجره هستند.

شما فقط در صورت ایجاد یک گفتگوی سفارشی یا اجرای پنجره با یک مجموعه ارتفاع در سطح بالاتر از 8DP ، تحت تأثیر این تغییر قرار خواهید گرفت. در نظر بگیرید که ارتفاع گفتگوی یا پنجره خود را کاهش دهید. اگر شما نیاز به امتناع از این رفتار جدید دارید ، با مجموعه ارتفاع مورد نظر ، گفتگوی خود یا بازشده خود را در نظر بگیرید. این توصیه نمی شود ، زیرا دسترسی ممکن است تأثیر منفی بگذارد و برای اطمینان از قسمت پایین گفتگو یا پنجره قابل تعامل و قابل خواندن توسط خدمات دسترسی ، بر روی توسعه دهنده قرار دارد.

نسخه 1.3.0-alpha03

10 آگوست 2022

androidx.compose.material:material-*:1.3.0-alpha03 منتشر می شود. نسخه 1.3.0-alpha03 شامل این تعهدات است.

نسخه 1.3.0-alpha02

27 جولای 2022

androidx.compose.material:material-*:1.3.0-alpha02 منتشر می شود. نسخه 1.3.0-alpha02 شامل این تعهدات است.

مشارکت خارجی

  • مسئله AnimatedVisibility را با FloatingActionButton در داربست رفع کنید ( I3A0AE ، B/224005027 )

نسخه 1.3.0-alpha01

29 ژوئن 2022

androidx.compose.material:material-*:1.3.0-alpha01 منتشر می شود. نسخه 1.3.0-alpha01 شامل این تعهدات است.

تغییرات API

  • تغییر نام پارامتر از مقادیر به مقدار در RangeSlider ( i3b79a )

رفع اشکال

  • نمونه نشان را به روز کنید تا توضیحات محتوای معنی دار تری ارائه دهید. ( i10b9d )

نسخه 1.2

نسخه 1.2.1

10 آگوست 2022

androidx.compose.material:material-*:1.2.1 منتشر می شود. نسخه 1.2.1 شامل این تعهدات است.

نسخه 1.2.0

27 جولای 2022

androidx.compose.material:material-*:1.2.0 منتشر می شود. نسخه 1.2.0 شامل این تعهدات است.

نسخه 1.2.0-RC03

29 ژوئن 2022

androidx.compose.material:material-*:1.2.0-rc03 منتشر می شود. نسخه 1.2.0-RC03 شامل این تعهدات است.

  • هیچ تغییری از 1.2.0-RC02 وجود ندارد.

نسخه 1.2.0-RC02

22 ژوئن 2022

androidx.compose.material:material-*:1.2.0-rc02 منتشر می شود. نسخه 1.2.0-RC02 شامل این تعهدات است.

نسخه 1.2.0-RC01

15 ژوئن 2022

androidx.compose.material:material-*:1.2.0-rc01 منتشر می شود. نسخه 1.2.0-RC01 شامل این تعهدات است.

تغییرات API

  • رابط در کتابخانه های آهنگسازی اکنون با استفاده از روش های رابط پیش فرض JDK8 ( I5BCF1 ) ساخته شده است

رفع اشکال

  • نشان را با برگه آیکون پیشرو به روز می کند تا به جای نماد ، نشان را به برچسب بکشید. ( i90993 )

نسخه 1.2.0-beta03

1 ژوئن 2022

androidx.compose.material:material-*:1.2.0-beta03 منتشر می شود. نسخه 1.2.0-beta03 شامل این تعهدات است.

رفع اشکال

  • رفع اشکال در جایی که BottomSheetScaffold از سایه نوار برنامه بالایی استفاده می کرد. BottomSheetScaffold اکنون هنگام قرار دادن میان وعده ها ، وضعیت ورق را نیز در نظر می گیرد: در حالت فروپاشی ، اسنکبرز در بالای ورق و fab قرار می گیرد. در حالت گسترده ، اسنکبرگ ها به قسمت پایین ورق لنگر می روند. ( IA80B5 ، B/187771422 )

نسخه 1.2.0-beta02

18 مه 2022

androidx.compose.material:material-*:1.2.0-beta02 منتشر می شود. نسخه 1.2.0-beta02 شامل این تعهدات است.

نسخه 1.2.0-beta01

11 مه 2022

androidx.compose.material:material-*:1.2.0-beta01 منتشر می شود. نسخه 1.2.0-beta01 شامل این تعهدات است.

ویژگی های جدید

  • این اولین نسخه بتا از 1.2 است!

تغییرات API

  • تغییر نام TextFieldDefaults.BorderStroke Composable که باعث ایجاد سکته مغزی در OutlinedTextField به TextFieldDefaults.BorderBox می شود. ( i5f295 )

نسخه 1.2.0-alpha08

20 آوریل 2022

androidx.compose.material:material-*:1.2.0-alpha08 منتشر می شود. نسخه 1.2.0-alpha08 شامل این تعهدات است.

تغییرات API

  • مصرف جزئی (پایین یا موقعیت) در PointerInputChange کاهش یافته است. می توانید از consume() استفاده کنید تا تغییر را به طور کامل مصرف کنید. برای تعیین اینکه آیا شخص دیگری قبلاً این تغییر را مصرف کرده است ، می توانید از isConsumed استفاده کنید.
  • PointerInputChange::copy() اکنون همیشه یک کپی کم عمق تهیه می کند. این بدان معناست که پس از مصرف یکی از نسخه ها ، نسخه های PointerInputChange مصرف می شود. اگر می خواهید یک PointerInputChange بی حد و حصر ایجاد کنید ، به جای آن از سازنده استفاده کنید. ( IE6Be4 ، b/225669674 )

نسخه 1.2.0-alpha07

6 آوریل 2022

androidx.compose.material:material-*:1.2.0-alpha07 منتشر می شود. نسخه 1.2.0-alpha07 شامل این تعهدات است.

نسخه 1.2.0-alpha06

23 مارس 2022

androidx.compose.material:material-*:1.2.0-alpha06 منتشر می شود. نسخه 1.2.0-alpha06 شامل این تعهدات است.

تغییرات API

  • به روزرسانی های API قابل کلیک برای دنبال کردن تغییرات در API Surface ( I56BCB )
  • به روزرسانی های API سطح 2 که عملکردهای اضافی اضافی را برای سطوح قابل انتخاب و قابل انتخاب اضافه می کند. ( IFCCA5 )

نسخه 1.2.0-alpha05

9 مارس 2022

androidx.compose.material:material-*:1.2.0-alpha05 منتشر می شود. نسخه 1.2.0-alpha05 شامل این تعهدات است.

تغییرات API

  • LazyVerticalGrid و LazyHorizontalGrid اکنون پایدار هستند. ( i307C0 )
  • LazyVerticalGrid/LazyHorizontalGrid و تمام API های مرتبط با آن به زیر مجموعه .grid منتقل شدند. لطفاً واردات خود را از androidx.compose.foundation.lazy به androidx.compose.foundation.lazy.grid به روز کنید. ( i2d446 ، b/219942574 )
  • تغییر قبلی تکیه فقط به نمای برای WindowInsetsControllerCompat را برگردانید ، و دوباره به پنجره ای نیاز دارید که برای مدیریت برخی از پرچم های پنجره مورد نیاز است. ViewCompat.getWindowInsetsController به نفع WindowCompat.getInsetsController برای اطمینان از استفاده از پنجره صحیح (مانند اینکه نمای در گفتگو است). ( i660ae ، b/219572936 )
  • متن: includeFontPadding اکنون به طور پیش فرض خاموش است. مشکلات قطع در نتیجه includeFontPadding=false انجام می شود و برای اسکریپت های بلند نباید هیچ گونه کلیپ رخ دهد. ( i31c84 ، b/171394808 )
  • برای تعریف اندازه محور متقاطع ( I17723 ) یک API LazyVerticalGrid جدید اضافه شد

نسخه 1.2.0-alpha04

23 فوریه 2022

androidx.compose.material:material-*:1.2.0-alpha04 منتشر می شود. نسخه 1.2.0-alpha04 شامل این تعهدات است.

تغییرات API

  • Add support for filter chips ( i39a6e ، b/192585545 )
  • اضافه شده TextFieldDecorationBox و OutlinedTextFieldDecorationBox . استفاده از آنها به همراه BasicTextField به شما کمک می کند تا زمینه متن سفارشی را بر اساس زمینه های متنی طراحی مواد اما با گزینه های بیشتر برای سفارشی سازی بسازید.
  • راهی برای تنظیم بالشتک های افقی و عمودی در زمینه های متنی فراهم شده است. ( i8c9f1 ، b/203764564 ، b/191543915 ، b/189971673 ، b/183136600 ، b/179882597 ، b/168003617 )
  • اضافه شده ComposableTarget ، ComposableTargetMarker و ComposableOpenTarget که امکان تهیه زمان کامپایل را فراهم می کند که یک تابع آهنگسازی را هدف قرار می دهد ، هدفمند است که از آن استفاده می شود.

    در بیشتر موارد ، حاشیه نویسی ها را می توان با افزونه کامپایلر کامپوزیت استنباط کرد ، بنابراین استفاده از این حاشیه نویسی به طور مستقیم باید نادر باشد. مواردی که نمی توانند استنباط نشوند شامل ایجاد و استفاده از یک کاربردی سفارشی ، عملکردهای انتزاعی (مانند روش های رابط) ، زمینه ها یا متغیرهای جهانی که لامبدهای سازنده هستند (متغیرها و پارامترهای محلی استنباط می شوند) ، یا هنگام استفاده از ComposeNode یا توابع مربوط به آهنگساز مرتبط .

    برای کاربردهای سفارشی ، توابع سازنده ای که ComposeNode یا ReusableComposeNode فراخوانی می کنند ، نیاز به اضافه کردن حاشیه نویسی CompoableTarget برای عملکرد و هر نوع پارامتر Lambda قابل استفاده دارند. با این وجود توصیه می شود حاشیه نویسی ایجاد کنید که با ComposableTargetMarker حاشیه نویسی شود و سپس حاشیه نویسی مشخص شده به جای ComposableTarget به طور مستقیم استفاده شود. حاشیه نویسی ترکیب شده با ComposableTargetMarker معادل یک ComposbleTarget با نام کاملاً واجد شرایط کلاس ویژگی به عنوان پارامتر Applier است. برای نمونه ای از استفاده از ComposableTargetMarker به anroidx.compose.ui.UiComposable مراجعه کنید. ( i38f11 )

نسخه 1.2.0-alpha03

9 فوریه 2022

androidx.compose.material:material-*:1.2.0-alpha03 منتشر می شود. نسخه 1.2.0-alpha03 شامل این تعهدات است.

رفع اشکال

نسخه 1.2.0-alpha02

26 ژانویه 2022

androidx.compose.material:material-*:1.2.0-alpha02 منتشر می شود. نسخه 1.2.0-alpha02 شامل این تعهدات است.

تغییرات API

  • به روش هایی که بیش از حد بار روشهای موجود و بدون منطق پیچیده است ، NonRestartableComposable اضافه شده است. این باعث می شود برای کلیه پارامترهایی که در عملکرد داخلی که نامیده می شود ، بررسی های یادآوری تولید شده توسط کامپایلر (برابر) را کاهش دهد. ( i90490 )
  • پشتیبانی از Action Chip را اضافه کنید ( I07100 ، B/192585545 )

نسخه 1.2.0-alpha01

12 ژانویه 2022

androidx.compose.material:material-*:1.2.0-alpha01 منتشر می شود. نسخه 1.2.0-alpha01 شامل این تعهدات است.

به روز رسانی های وابستگی

  • اکنون به Kotlin 1.6.10 بستگی دارد.

مشارکت خارجی

  • ModalBottomSheetState اکنون دارای پرچم isSkipHalfExpanded است. می توان آن را از طریق سازنده تنظیم کرد یا بعداً با تنظیم ویژگی isSkipHalfExpanded ModalBottomSheetState به true تنظیم شد. به روزرسانی مقدار isSkipHalfExpanded باعث بازپرداخت برگه می شود. ( i18b86 ، b/186669820 )

نسخه 1.1

نسخه 1.1.1

23 فوریه 2022

androidx.compose.material:material-*:1.1.1 منتشر می شود. نسخه 1.1.1 شامل این تعهدات است.

رفع اشکال

  • رفع NullPointerException در androidx.compose.ui.platform.RenderNodeLayer.updateDisplayList ( AOSP/1947059 ، b/206677462 )
  • تصادف ناشی از محتوای کلیپ بورد را هنگام خواندن از کلیپ بورد در Android رفع کنید. ( I06020 ، b/197769306 )
  • RTL ثابت در LazyVerticalGrid ( AOSP/1931080 ، B/207510535 )

نسخه 1.1.0

9 فوریه 2022

androidx.compose.material:material-*:1.1.0 منتشر می شود. نسخه 1.1.0 شامل این تعهدات است.

تغییرات مهم از 1.0.0

  • پشتیبانی پایدار از اثر Overscroll Android 12
  • پیشرفت برای لمس اندازه هدف
  • توجه داشته باشید که ، با توجه به آهنگسازی 1.0 ، اجزای مواد فضای طرح خود را برای تحقق دستورالعمل های دسترسی به مواد برای اندازه هدف لمسی گسترش می دهند. به عنوان مثال ، Touch Touch Target به حداقل اندازه 48x48dp گسترش می یابد ، حتی اگر اندازه دکمه را کوچکتر کنید. این تراز مواد را با همان رفتار اجزای طراحی مواد تشکیل می دهد و در صورت مخلوط کردن و آهنگسازی ، رفتار مداوم را ارائه می دهد. این تغییر همچنین تضمین می کند که وقتی UI خود را با استفاده از اجزای مواد مرکب ایجاد می کنید ، حداقل شرایط لازم برای دسترسی به هدف لمسی برآورده می شود.
  • پشتیبانی پایدار از راه آهن ناوبری
  • فارغ التحصیلان تعدادی از API های آزمایشی قبلاً تا پایدار
  • پشتیبانی از نسخه های جدیدتر کوتلین

نسخه 1.1.0-RC03

26 ژانویه 2022

androidx.compose.material:material-*:1.1.0-rc03 منتشر می شود. نسخه 1.1.0-RC03 شامل این تعهدات است.

رفتار تغییر می کند

توجه داشته باشید که با توجه به آهنگسازی 1.0 ، اجزای مواد فضای طرح خود را برای تحقق دستورالعمل های دسترسی به مواد به اندازه هدف گسترش می دهند. به عنوان مثال ، Touch Touch Target به حداقل اندازه 48x48dp گسترش می یابد ، حتی اگر اندازه دکمه را کوچکتر کنید. این تراز مواد را با همان رفتار اجزای طراحی مواد تشکیل می دهد و در صورت مخلوط کردن و آهنگسازی ، رفتار مداوم را ارائه می دهد. این تغییر همچنین تضمین می کند که وقتی UI خود را با استفاده از اجزای مواد مرکب ایجاد می کنید ، حداقل شرایط لازم برای دسترسی به هدف لمسی برآورده می شود.

رفع اشکال

  • برخی از اطلاعات اشکال زدایی بهتر برای بازرس چیدمان هنگام بازرسی حداقل اصلاح کننده های هدف لمسی. ( AOSP/1955036 )

نسخه 1.1.0-RC01

15 دسامبر 2021

androidx.compose.material:material-*:1.1.0-rc01 منتشر می شود. نسخه 1.1.0-RC01 شامل این تعهدات است.

رفع اشکال

نسخه 1.1.0-beta04

1 دسامبر 2021

androidx.compose.material:material-*:1.1.0-beta04 منتشر می شود. نسخه 1.1.0-beta04 شامل این تعهدات است.

ویژگی های جدید

  • به روز شده تا با Kotlin 1.6.0 سازگار باشد

نسخه 1.1.0-beta03

17 نوامبر 2021

androidx.compose.material:material-*:1.1.0-beta03 منتشر می شود. نسخه 1.1.0-beta03 شامل این تعهدات است.

نسخه 1.1.0-beta02

3 نوامبر 2021

androidx.compose.material:material-*:1.1.0-beta02 منتشر می شود. نسخه 1.1.0-beta02 شامل این تعهدات است.

رفع اشکال

  • موج و سایر نشانه ها اکنون فقط در صورتی که در داخل یک اصلاح کننده قرار داشته باشند ، به تأخیر می افتد. به جای اینکه همیشه برای یک رویداد پایین تأخیر داشته باشید. ( IBEFE0 ، B/203141462 )

نسخه 1.1.0-beta01

27 اکتبر 2021

androidx.compose.material:material-*:1.1.0-beta01 منتشر می شود. نسخه 1.1.0-beta01 شامل این تعهدات است.

ویژگی های جدید

  • در حال حاضر Ripples از حالت های شناور و تمرکز پشتیبانی می کند ، بنابراین شناور / تمرکز یک مؤلفه مانند دکمه اکنون پوشش صحیح حالت را نشان می دهد.

نسخه 1.1.0-alpha06

13 اکتبر 2021

androidx.compose.material:material-*:1.1.0-alpha06 منتشر می شود. نسخه 1.1.0-alpha06 شامل این تعهدات است.

تغییرات API

  • اضافه بار کم کودک برای چیدمان با بهره وری بهبود یافته اضافه شد ( IB0D9A )
  • اجرای ExposedDropdownMenu بر اساس ExposedDropdownMenuBox با TextField و DropdownMenu در داخل ( IF60B2 )
  • dismissOnOutsideClick به PopupProperties اضافه شد و جایگزین dismissOnClickOutside شد که کاهش یافته است. ملک جدید موقعیت کلیک و مرزهای لنگر را دریافت می کند ، و کنترل دقیق تری در مورد اینکه آیا باید از OndismissRequest استفاده شود یا خیر. به عنوان مثال ، این می تواند برای جلوگیری از برکناری لنگر برای لمس کردن لنگر مفید باشد.
    • updateAndroidWindowManagerFlags به PopupProperties اضافه شد و کنترل سطح پایین بر پرچم های منتقل شده توسط پنجره به Windowmanager Android را ارائه می داد. پارامتر Lambda پرچم هایی خواهد بود که از مقادیر PopupProperties محاسبه می شود که منجر به پرچم های WindowManager می شود: به عنوان مثال قابل توجه. نتیجه لامبدا پرچم های نهایی خواهد بود که به Windowmanager Android منتقل می شود. به طور پیش فرض ، UpdateAndroidWindowManagerFlags پرچم های محاسبه شده از پارامترهای بدون تغییر را ترک می کند. این API باید با احتیاط مورد استفاده قرار گیرد ، فقط در مواردی که پنجره دارای نیازهای رفتاری بسیار خاصی است. ( i6e9f9 )

نسخه 1.1.0-alpha05

29 سپتامبر 2021

androidx.compose.material:material-*:1.1.0-alpha05 منتشر می شود. نسخه 1.1.0-alpha05 شامل این تعهدات است.

تغییرات API

  • حداقل اندازه هدف لمسی را برای مؤلفه های مواد که هدف لمسی در دسترس ندارند ، می افزاید. از آنجا که این امر فاصله بیشتری را در اطراف اجزای ایجاد می کند تا اطمینان حاصل شود که آنها یک هدف لمسی به اندازه کافی بزرگ دارند ، این ممکن است UI های موجود را تغییر دهد که اندازه این قطعات را فرض می کند ، اندازه بصری آنهاست و اندازه هدف لمسی را به خود اختصاص نمی دهد. برای غیرفعال کردن این رفتار در یک سلسله مراتب ، می توانید از ترکیب LocalMinimumTouchTargetEnforcement محلی استفاده کنید تا این رفتار را در یک سلسله مراتب غیرفعال کنید ، اما این فقط به عنوان یک دریچه فرار موقتی در حالی که به روزرسانی UI های موجود برای حداقل اندازه جدید است ، در نظر گرفته شده است. ( i9b966 ، b/149691127 ، b/171509422 )
  • رابط کاربری TextFieldColorsWithicons تجربی اضافه شده ، گسترش TextFieldColors را برای ارائه تعامل با LeadingColor و TrailingColor فراهم می کند. این امکان را برای تغییر ظاهر TextField با توجه به حالت فوکوس فراهم می کند. ( i66923 ، b/198402662 )

نسخه 1.1.0-alpha04

15 سپتامبر 2021

androidx.compose.material:material-*:1.1.0-alpha04 منتشر می شود. نسخه 1.1.0-alpha04 شامل این تعهدات است.

تغییرات API

  • performGesture مستهلک و GestureScope ، که توسط performTouchInput و TouchInjectionScope جایگزین شده اند. ( ia5f3f ، b/190493367 )
  • اضافه شده touchBoundsInRoot به SemanticsNode که شامل حداقل اندازه هدف لمسی است تا توسعه دهندگان بتوانند اطمینان حاصل کنند که اهداف لمسی حداقل های دسترسی را برآورده می کنند. ( i2e14b ، b/197751214 )

رفع اشکال

  • به کلیپ اجازه دهید مرزهای هدف لمسی را فراتر از منطقه کلیپ برای حداقل اهداف هدف لمسی گسترش دهد. ( i43e10 ، b/171509422 )
  • ترکیب Divider به روز شده برای احترام به Dp.Hairline برای پارامتر ضخامت برای پشتیبانی از ترسیم تقسیم کننده های پیکسل بدون در نظر گرفتن چگالی صفحه نمایش. ( i16ffb ، b/196840810 )

نسخه 1.1.0-alpha03

1 سپتامبر 2021

androidx.compose.material:material-*:1.1.0-alpha03 منتشر می شود. نسخه 1.1.0-alpha03 شامل این تعهدات است.

ویژگی های جدید

  • آهنگسازی 1.1.0-alpha03 به روز شده به Kotlin 1.5.30 بستگی دارد. ( i74545 )

تغییرات API

  • روش تست اضافه شده برای به دست آوردن مرزهای بریده شده. ( i6b28e )
  • حداقل اندازه هدف لمسی اضافه شده برای مشاهده پیکربندی برای استفاده در معناشناسی و ورودی اشاره گر برای اطمینان از دسترسی. ( IE861C )

نسخه 1.1.0-alpha02

18 آگوست 2021

androidx.compose.material:material-*:1.1.0-alpha02 منتشر می شود. نسخه 1.1.0-alpha02 شامل این تعهدات است.

مشارکت خارجی

  • رفتار Swipeablestate را در مواردی که جبران ضربه تند وشدید زدن در یک خطای گرد از یک لنگر است ، برطرف کنید. ( I03D39 ، B/191993377 )

نسخه 1.1.0-alpha01

4 آگوست 2021

androidx.compose.material:material-*:1.1.0-alpha01 منتشر می شود. نسخه 1.1.0-alpha01 شامل این تعهدات است.

تغییرات API

  • به روز شده DrawScope#drawImage که برای مصرف یک پارامتر اختیاری FilterQuality ، منبع و مقصد را مصرف می کند. این برای هنر پیکسل مفید است که در نظر گرفته شده است که هنگام مقیاس برای هنر پیکسل ، پیکسل می شود. Bitmappainter به روز شده + تصویر قابل استفاده برای مصرف یک پارامتر FilterQuality اختیاری ( IE4FB0 ، B/180311607 )
  • با نام Badgebox به Badgedbox ، پارامترهای تغییر یافته برای پذیرش Composable Badge تغییر نام داد. مؤلفه نشان اضافه شده که محتوای نشان معمولی برای یک Badgedbox است. ( i639c6 )
  • مؤلفه NavigationRail اضافه شده ، به اسناد و نمونه ها برای اطلاعات استفاده مراجعه کنید ( I8DE77 )

رفع اشکال

  • یک نمونه ناوبری و برنامه نمایشی کاتالوگ با هم تراز شده اضافه شده است. ( i3cffc )
  • گفتگوها اکنون از رفتار اندازه گیری سکو پیروی می کنند. برای غلبه بر این رفتار ، useplatformdefaultwidth را روی false تنظیم کنید. ( Iffaed ، b/192682388 )
  • نسخه ی نمایشی راه آهن ناوبری به برنامه کاتالوگ اضافه شد. ( I04960 )
  • نسخه ی نمایشی نشان به برنامه کاتالوگ اضافه شد. ( IF285D )

نسخه 1.0

نسخه 1.0.5

3 نوامبر 2021

androidx.compose.material:material-*:1.0.5 منتشر می شود. نسخه 1.0.5 شامل این تعهدات است.

رفع اشکال

  • رفع یک ردیابی تصادف نمونه های مشتق شده. ( AOSP/1792247 )

نسخه 1.0.4

13 اکتبر 2021

androidx.compose.material:material-*:1.0.4 منتشر می شود. نسخه 1.0.4 شامل این تعهدات است.

به روز رسانی های وابستگی

  • به روز شده به Kotlin 1.5.31 بستگی دارد

نسخه 1.0.3

29 سپتامبر 2021

androidx.compose.material:material-*:1.0.3 منتشر می شود. نسخه 1.0.3 شامل این تعهدات است.

به روز رسانی های وابستگی

  • به روز شده به Kotlin 1.5.30 بستگی دارد

نسخه 1.0.2

1 سپتامبر 2021

androidx.compose.material:material-*:1.0.2 منتشر می شود. نسخه 1.0.2 شامل این تعهدات است.

برای پشتیبانی از نسخه 1.0.2 آهنگسازی به روز شده است. آهنگسازی 1.0.2 هنوز با Kotlin 1.5.21 سازگار است.

نسخه 1.0.1

4 آگوست 2021

androidx.compose.material:material-*:1.0.1 منتشر می شود. نسخه 1.0.1 شامل این تعهدات است.

به روز رسانی های وابستگی

  • به روز شده به Kotlin 1.5.21 بستگی دارد.

نسخه 1.0.0

28 ژوئیه 2021

androidx.compose.material:material-*:1.0.0 منتشر می شود. نسخه 1.0.0 شامل این تعهدات است.

ویژگی های اصلی 1.0.0

این اولین نسخه پایدار آهنگسازی است. لطفاً برای اطلاعات بیشتر به وبلاگ رسمی انتشار آهنگسازی مراجعه کنید!

مشکلات شناخته شده

  • اگر از Android Studio Bumblebee Canary 4 یا AGP 7.1.0-alpha04 / 7.1.0-alpha05 استفاده می کنید ، ممکن است به تصادف زیر ضربه بزنید:

      java.lang.AbstractMethodError: abstract method "void androidx.lifecycle.DefaultLifecycleObserver.onCreate(androidx.lifecycle.LifecycleOwner)"
    

    برای رفع آن ، به طور موقت minsdkversion خود را به 24+ در پرونده build.gradle خود افزایش دهید. این شماره در نسخه بعدی Android Studio Bumblebee و AGP 7.1 برطرف خواهد شد. ( b/194289155 )

نسخه 1.0.0-RC02

14 جولای 2021

androidx.compose.material:material-*:1.0.0-rc02 منتشر می شود. نسخه 1.0.0-RC02 شامل این تعهدات است.

رفع اشکال

  • گفتگوها اکنون از رفتار اندازه گیری سکو پیروی می کنند. برای غلبه بر این رفتار usePlatformDefaultWidth را روی false تنظیم کنید. ( Iffaed ، b/192682388 )

نسخه 1.0.0-rc01

1 ژوئیه 2021

androidx.compose.material:material-*:1.0.0-rc01 منتشر می شود. نسخه 1.0.0-RC01 شامل این تعهدات است.

تغییرات API

  • مؤلفه BadgeBox اضافه شده ، به اسناد و نمونه ها برای اطلاعات استفاده مراجعه کنید ( I5E284 )
  • useDefaultMaxWidth در PopupProperties به usePlatformDefaultWidth تغییر نام داده شد. ( I05710 )
  • گفتگوها اکنون قادر به استفاده از کل عرض صفحه هستند. ( i83929 ، b/190810877 )
  • اضافه شده اجرای کشویی محدوده آزمایش ( I2F4B3 )

رفع اشکال

  • برای تراز کردن با مشخصات طراحی مواد OutlinedTextField با ورودی نامعتبر با استفاده از رنگ خطا برای برچسب متوقف شد وقتی برچسب به عنوان یک مکان نگهدارنده استفاده می شود. حالت دوم وقتی متن ورودی در قسمت متن وجود نداشته باشد و قسمت متن در کانون توجه قرار نگیرد. با این تغییر معنی error:Boolean در TextFieldColors.labelColor() عملکرد نیز تغییر کرده است: اکنون در صورت عدم استفاده از برچسب به عنوان یک مکان نگهدارنده false است ، حتی اگر ورودی نامعتبر باشد. ( i45f78 )

نسخه 1.0.0-beta09

16 ژوئن 2021

androidx.compose.material:material-*:1.0.0-beta09 منتشر می شود. نسخه 1.0.0-beta09 شامل این تعهدات است.

تغییرات API

  • پارامتر شکل اضافه شده به OutlinedTextField برای اینکه بتوانید شکل مرز را سفارشی کنید ( I8F39E ، B/181322957 )
  • TextOverflow به یک کلاس درون خطی تغییر می یابد. ( i433af )

رفع اشکال

  • Scrim in BottomDrawer ، Backdropscaffold و Modalbottomsheetlayout از بین می روند و رنگ آن از بین می روند .

قوانین پروفایل اضافه شده

این نسخه قوانین پروفایل را به ماژول های آهنگسازی زیر اضافه می کند ( I14ED6 ):

  • androidx.compose.animation
  • Androidx.compose.animation-core
  • androidx.compose.foundation
  • androidx.compose.foundation-layout
  • androidx.compose.material
  • androidx.compose.material-ripple
  • androidx.compose.runtime
  • androidx.compose.ui
  • androidx.compose.ui.geometry
  • androidx.compose.ui.graphics
  • androidx.compose.ui.text
  • androidx.compose.ui.text
  • androidx.compose.ui.unit
  • androidx.compose.ui.util

قوانین پروفایل چیست؟

  • قوانین پروفایل برای یک کتابخانه در یک پرونده متنی baseline-prof.txt واقع در فهرست src/main یا معادل آن مشخص شده است. پرونده یک قانون در هر خط را مشخص می کند ، جایی که یک قانون در این مورد الگویی برای تطبیق با روش ها یا کلاس های موجود در کتابخانه است. نحو این قوانین یک سوپراست از فرمت پروفایل هنری قابل خواندن انسان است که هنگام استفاده از adb shell profman --dump-classes-and-methods ... این قوانین یکی از دو شکل را برای هدف قرار دادن روش ها یا کلاس ها می گیرد.

  • یک قانون روش الگوی زیر را خواهد داشت:

    <FLAGS><CLASS_DESCRIPTOR>-><METHOD_SIGNATURE>
    
  • و یک قانون کلاس الگوی زیر را خواهد داشت:

    <CLASS_DESCRIPTOR>
    
  • در اینجا <FLAGS> یک یا چند شخصیت H ، S و P است که نشان می دهد آیا این روش باید به عنوان "داغ" ، "راه اندازی" یا "شروع راه اندازی" پرچم گذاری شود یا خیر.

  • <CLASS_DESCRIPTOR> توصیف کننده ای برای کلاس است که روش هدفمند به آن تعلق دارد. به عنوان مثال ، کلاس androidx.compose.runtime.SlotTable دارای توصیف کننده Landroidx/compose/runtime/SlotTable; .

  • <METHOD_SIGNATURE> امضای روش است و شامل نام ، انواع پارامترها و انواع بازگشت روش است. به عنوان مثال ، روش fun isPlaced(): Boolean on LayoutNode دارای امضای isPlaced()Z است.

  • این الگوهای می توانند دارای کارتهای وحشی ( ** ، * و ? ) باشند تا یک قاعده واحد شامل چندین روش یا کلاس باشد.

قوانین چه کاری انجام می دهند؟

  • روشی که دارای پرچم H است ، نشان می دهد که این روش یک روش "داغ" است و باید قبل از زمان گردآوری شود.

  • روشی که دارای پرچم S است ، نشان می دهد که این روشی است که در هنگام راه اندازی نامیده می شود و باید قبل از زمان گردآوری شود تا از هزینه تدوین و تفسیر روش در زمان راه اندازی جلوگیری شود.

  • روشی که دارای پرچم P است ، نشان می دهد که این روشی است که پس از راه اندازی نامیده می شود.

  • کلاس که در این پرونده وجود دارد نشان می دهد که از آن در هنگام راه اندازی استفاده می شود و باید در پشته از قبل اختصاص داده شود تا از هزینه بارگذاری کلاس جلوگیری شود.

این چطوری کار میکنه؟

  • كتابخانه ها می توانند این قوانین را كه در آثار باستانی AAR بسته بندی می شود ، تعریف كنند. هنگامی که یک APK ساخته می شود که شامل این آثار باستانی است ، این قوانین با هم ادغام می شوند و از قوانین ادغام شده برای ساختن یک پروفایل هنری باینری جمع و جور که مخصوص APK است استفاده می شود. سپس هنر می تواند هنگام نصب APK بر روی دستگاه ها به منظور تهیه یک زیر مجموعه خاص از برنامه برای بهبود عملکرد برنامه ، به ویژه اولین اجرا ، از این پروفایل استفاده کند. توجه داشته باشید که این هیچ تاثیری در برنامه های اشکال زدایی نخواهد داشت.

نسخه 1.0.0-beta08

2 ژوئن 2021

androidx.compose.material:material-*:1.0.0-beta08 منتشر می شود. نسخه 1.0.0-beta08 شامل این تعهدات است.

ویژگی های جدید

رفتار شکستن API تغییر

  • Behaviour-Breaking: اکنون کارت کلیک می کند و باعث می شود کلیک های اضافه شده از طریق Card(Modifier.clickable) اضافه شود تا یک OP باشد. لطفاً از اضافه بار آزمایشی جدید کارت استفاده کنید که OnClick را می پذیرد. ( IA8744 ، b/183775620 )
    • اضافه بار کارت جدیدی را اضافه کرد که کلیک و همچنین سایر قابلیت های قابل کلیک را بر عهده دارد: نشانه ، تعامل با ، فعال/غیرفعال. استفاده از یک کارت غیر قابل کلیک معمولی با Modifier.clickable امکان پذیر نبود. قابل کلیک است زیرا کارت در آن موارد نشانه موج دار را کلی نمی کند.
  • Behaviour-Breaking: Surface اکنون کلیک ها را مصرف می کند ، و باعث می شود کلیک های اضافه شده از طریق Surface(Modifier.clickable) به عنوان یک OP باشد. لطفاً از اضافه بار تجربی جدید سطح استفاده کنید که OnClick را می پذیرد. ( i73e6c ، b/183775620 )
    • اضافه بار سطح جدیدی را اضافه کرد که کلیک و همچنین سایر قابلیت های قابل کلیک را بر عهده دارد: نشانه ، تعامل با ، فعال/غیرفعال. استفاده از یک سطح غیر قابل کنترل معمولی با Modifier.clickable امکان پذیر نبود.

تغییرات API

  • FabPosition برای پشتیبانی از گسترش احتمالی در آینده به کلاس درون خطی تبدیل شد ( I030FB )
  • استفاده از enum در کلاسهای درون خطی برای جلوگیری از مشکلات با جامع هنگام افزودن مقادیر جدید enum ، استفاده می شود. ( i2b5eb )
  • برای جلوگیری از نشان دادن موج در حین پیمایش / کشیدن ، یک TAP TIMOUT را به قابل کلیک / toggleable اضافه می کند ( IA2704 ، B / 168524931 )
  • ویژگی های DDESCRIPTION و متن متن دیگر مقادیر واحد نیستند بلکه لیست ها هستند. این امکان را برای ادغام آنها به جای همخوانی فراهم می کند. همچنین API های آزمایش بهتری را برای استفاده از این تغییرات ارائه داد ( ICA6BF ، B/184825850 )
  • Modifier.focusModifier() توسط Modifier.focusTarget() کاهش می یابد و جایگزین می شود .
  • Enum جایگزین FocusState با یک رابط FocusState ( ICCC1A ، B/187055290 )
  • اکنون که اجرای Ripple با پشتوانه پایدار است ( LocalRippleNativeRendering ، B/188569367 )

رفع اشکال

  • Modifier.onGloballyPositioned() برای گزارش مختصات این اصلاح کننده در زنجیره اصلاح کننده تغییر یافت ، نه مختصات طرح پس از استفاده از همه اصلاح کننده ها. این بدان معناست که اکنون ترتیب اصلاح کننده ها بر آنچه مختصات گزارش می شود تأثیر می گذارد. ( IEB67D ، B/177926591 )
  • برای کاتالوگ مواد تشکیل دهنده موجود ، یک readme اضافه شده است. ( IF9191 )

نسخه 1.0.0-beta07

18 مه 2021

androidx.compose.material:material-*:1.0.0-beta07 منتشر می شود. نسخه 1.0.0-beta07 شامل این تعهدات است.

تغییرات API

  • شما دیگر نیازی به استفاده از روشهای پسوند برای پشتیبانی از مسیر در آهنگسازی ناوبری ندارید. ( i22beb ، b/172823546 )

نسخه 1.0.0-beta06

5 مه 2021

androidx.compose.material:material-*:1.0.0-beta06 منتشر می شود. نسخه 1.0.0-beta06 شامل این تعهدات است.

تغییرات API

  • Ripple برای استفاده از RippleDrawable در داخل دستگاه های Android مهاجرت شده است. این بدان معنی است که انیمیشن های موج دار در Renderthread اتفاق می افتند ، و حتی اگر موضوع UI در زیر بار باشد ، مانند هنگام حرکت بین صفحه ها ، صاف خواهد بود. این باعث تغییر سطح API ریپل نمی شود ، اما ممکن است تغییرات رفتاری در نتیجه این تغییر ایجاد شود. برای کمک به مهاجرت ، LocalRippleNativeRendering اضافه شده است - مقدار false را برای این ترکیب محلی فراهم می کند تا به اجرای موج قبلی در داخل ComposionLocalProvider برگردد. این API موقتی است و در آینده حذف می شود ، بنابراین اگر به موضوعاتی که باعث می شود از این API استفاده کنید ، لطفاً یک اشکال ارائه دهید . ( i902f8 ، b/168777351 ، b/183019123 )
  • اضافه شده API های دسترسی به مجموعه CollectionInfo و CollectionItemInfo که به شما امکان می دهد جمع آوری و موارد آن را برای خدمات دسترسی نشان دهید ( ID54EF ، B/180479017 )
  • error API دسترسی به دسترسی اضافه شده که اجازه می دهد گره ای را که حاوی ورودی نامعتبر است ، علامت گذاری کند ( I12997 ، B/180584804 ، B/182142737 )

رفع اشکال

  • به روز شده آهنگسازی کاتالوگ مواد از: https://github.com/google/accompanist/pull/365. ( I25DC3 )
  • کودکان ردیف و ستون با وزن (پر = کاذب) دیگر باعث نمی شوند که والدین کل فضای اصلی محور موجود را پر کنند. ( IED94D ، B/186012444 ، B/184355105 )

نسخه 1.0.0-beta05

21 آوریل 2021

androidx.compose.material:material-*:1.0.0-beta05 منتشر می شود. نسخه 1.0.0-beta05 شامل این تعهدات است.

رفع اشکال

  • تصاویر کاشی مؤلفه اضافه شده ، انتخاب کننده تم و URL های منو خاص تر به کاتالوگ مواد موجود. ( i9b58e )

نسخه 1.0.0-beta04

7 آوریل 2021

androidx.compose.material:material-*:1.0.0-beta04 منتشر می شود. نسخه 1.0.0-beta04 شامل این تعهدات است.

تغییرات API

  • API Change: حالت DrawerState دیگر Swipeablestate تجربی گسترش نمی یابد.
    • API Change: BottomDrawerState اکنون به عنوان آزمایشی مشخص شده است ، تا با مؤلفه Bottom ، آزمایشی در حال حاضر آزمایشی مطابقت داشته باشد ( I81114 ، B/181656094 )
  • برای hide() و نشان SoftwareKeyboardController show() به ترتیب showSoftwareKeyboard تغییر hideSoftwareKeyboard کنید.
    • رابط کاربری کامل ComposionLocal را برای localsoftwarekeyboardcontroller فراهم کنید ، اجازه می دهد تا تنظیم شود (مخصوصاً در تست ها مفید است) ( i579a6 )
  • API دسترسی به Liveregion اضافه شده است. اگر گره به عنوان یک منطقه زنده مشخص شود ، سرویس های دسترسی به طور خودکار در مورد تغییرات خود به کاربر اطلاع می دهند ( IDCF6F ، B/172590946 )

رفع اشکال

  • اجرای کاتالوگ مواد آهنگسازی به ماژول موجود اضافه شده است. در حال حاضر گم شده است: تصاویر کاشی کامپوننت ، انتخاب تم (در تغییرات پیگیری اضافه می شود). ( IE7A94 )

نسخه 1.0.0-beta03

24 مارس 2021

androidx.compose.material:material-*:1.0.0-beta03 منتشر می شود. نسخه 1.0.0-beta03 شامل این تعهدات است.

تغییرات API

  • DefaultMonotonicFrameClock کاهش می یابد. فراخوانی withFrameNanos یا Recomposer.runRecomposeAndApplyChanges بدون هیچگونه MonotonicFrameClock اکنون IllegalStateException است. ( i4eb0d )
  • برای پشتیبانی از نمایش یک نماد و متن درون خطی در یک برگه ، یک API جدید LeadingIconTab اضافه کرد. ( I23267 )

مشارکت خارجی

  • [توسط Jossi Wolf] BottomDrawer اکنون محتوای شکاف کشو را می پیچد. وقتی والدین از ارتفاع بی نهایت برخوردار هستند ، BottomDrawer IllegalStateException است. اگر کوچکتر از 50 ٪ والدین خود باشد ، کشو پایین اکنون به حالت گسترده باز خواهد شد. اسناد مربوط به BottomDrawerState و ModalBottomSheetLayoutState به روز شده اند. اگر در حالت باز یا گسترش یافته باشد BottomDrawerState#isOpen در حال حاضر درست است. ( i87241 )

نسخه 1.0.0-beta02

10 مارس 2021

androidx.compose.material:material-*:1.0.0-beta02 منتشر می شود. نسخه 1.0.0-beta02 شامل این تعهدات است.

تغییرات API

  • اضافه شده LocalSoftwareKeyboardController ترکیب محلی API برای جایگزینی رابط قبلی SoftwareKeyboardController در TextField. ( i5951e ، b/168778053 )

رفع اشکال

  • اجرای محدودیت در استفاده عمومی از API های آزمایشی ( I6AA29 ، B/174531520 )
  • تراز افقی پیش فرض را برای شروع Topappbar و Bottomappbar تغییر داد ، مطابق با Row ( IB2DC7 )
  • یک ماژول جدید و UI مکان یاب برای یک کاتالوگ مواد آهنگسازی ، که در حال حاضر در نسخه های آزمایشی ادغام موجود قرار دارد ، اضافه شده است. ( IDFCB3 )
  • androidx.compose.ui:ui دیگر به AppCompat یا قطعه بستگی ندارد. اگر در برنامه خود از ComposeView استفاده می کنید ، و از قطعه و / یا APPCOMPAT استفاده می کنید ، اطمینان حاصل کنید که از AppCompat 1.3+ / قطعه 1.3+ استفاده می کنید - این نسخه ها برای تنظیم صحیح چرخه حیات و صاحبان حالت ذخیره شده مورد نیاز برای ComposeView مورد نیاز هستند. ( i1d6fa ، b/161814404 )

نسخه 1.0.0-beta01

24 فوریه 2021

androidx.compose.material:material-*:1.0.0-beta01 منتشر می شود. نسخه 1.0.0-beta01 شامل این تعهدات است.

این اولین نسخه از آهنگسازی 1.0.0 بتا است.

تغییرات API

  • اصلاح کننده های اندازه تغییر نام دادند. اصلاح کننده. عرض/ارتفاع/اندازه به عرض مورد نیاز/مورد نیاز/مورد نیاز تغییر نام داده شد. اصلاح کننده. preferredwidth/preferredheight/preferredsize به عرض/ارتفاع/اندازه تغییر نام داده شد. ( i5b414 )
  • ImagerEsource و VectorResource اکنون به ترتیب توابع برنامه ریزی در ImageBitmap و همراهان ImageVector هستند. بار {تصویر ، بردار ، فونت} توابع منبع حذف شده است. ( i89130 )
  • اصلاح کننده برای اندازه به ذاتی دیگر تجربی نیست. ( I15744 )
  • ادعاهای DP حذف شده ( I798D2 )
  • پاسخ به تماس با کلید SoftwareKeyboardController از تمام زمینه های متن که به زودی توسط یک API جدید جایگزین می شود. ( IAE869 ، b/168778053 )
  • سوئیچ ، کادر چک و RadioButton Action Lambdas اکنون قابل تهویه است. برای استفاده از این ویژگی ، نمونه های ردیف قابل کلیک به روز شده است. ( IF601B ، b/171819073 )
  • InteractionState با [Mutable]InteractionSource جایگزین شده است
    • رابط ها وظیفه انتشار / جمع آوری رویدادهای تعامل را بر عهده دارند.
    • Instead of passing interactionState = remember { InteractionState() } to components such as Button and Modifier.clickable() , use interactionSource = remember { MutableInteractionSource() } .
    • Instead of: Interaction.Pressed in interactionState you should instead use the extension functions on InteractionSource, such as InteractionSource.collectIsPressedAsState().
    • For complex use cases you can use InteractionSource.interactions to observe the stream of Interactions. See the InteractionSource documentation and samples for more information.
    • ( I85965 , b/152525426 , b/171913923 , b/171710801 , b/174852378 )
  • Add AccessibilityMananger interface and LocalAccessibilityMananger in CompositionLocals ( I53520 )
  • Removed deprecated LayoutCoordinates methods, use function instead of the property for positionInParent and boundsInParent ( I580ed , b/169874631 , b/175142755 )
  • Slider now supports enabled/disabled state ( I6d56b , b/179793072 )
  • Created new TextInputSession for input sessions from low level text components such as CoreTextField. ( I8817f , b/177662148 )
  • AnimationEndReason.Interrupted is removed. CancellationException will be throws if animation is interrupted. ( I2cbbc , b/179695417 )
  • Removed @ExperimentalRippleApi and changed RippleAlpha to be a class with properties instead of an interface. ( I6df7c )
  • Added TextFieldColors interface to represent different colors used in TextField and OutlinedTextField in different states. For defaut implementation see TextFieldDefaults.textFieldColors and TextFieldDefaults.outlinedTextFieldColors.
  • Add selectionGroup modifier that allows to mark collection of Tabs or RadioButtons for accessibility purposes ( Ie5c29 )
  • Add LazyListState.animateScrollToItem

    This method smooth scrolls to a specific item in the list. ( I4bfd7 )

  • ScrollableState.smoothScrollBy() was renamed to animateScrollBy() LazyListState.snapToItemIndex() was renamed to scrollToItem() ScrollState.smoothScrollTo() was renamed to animateScrollTo() ( I35ded )

  • Any composables marked with @ReadOnlyComposable are now compile-time validated to ensure that they only make calls to other @ReadOnlyComposables ( I58961 )

  • TargetAnimation API has been removed. ( If47d1 , b/177457083 )

  • Scroll position in Modifier.verticalScroll()/horizontalScroll() is represented with Ints now ( I81298 )

  • smoothScrollBy and scrollBy methods' packages changed to androidx.compose.foundation.gestures.* ( I3f7c1 , b/175294473 )

  • FlingConfig has been renamed to FlingBehavior now allows for customization of suspend animation rather than predefined Decays. ( I02b86 , b/175294473 )

  • Size modifiers were renamed. Modifier.width/height/size were renamed to requiredWidth/requiredHeight/requiredSize. Modifier.preferredWidth/preferredHeight/preferredSize were renamed to width/height/size. ( I5b414 )

  • defaultMinSizeConstraints was renamed to defaultMinSize. ( I4eaae )

  • Orientation has been moved to foundation package. VelocirtTracker moved from ui.gesture to ui.input.pointer. ( Iff4a8 , b/175294473 )

  • drawerState.open() and drawerState.close() are now suspending functions. Use rememberCoroutineScope() to get the scope of the composition to call them ( I16f60 , b/175294473 )

  • Providers has been renamed to CompositionLocalProvider

    • The Composition constructor no longer accepts a key parameter, and has been deprecated.
    • currentCompositeKeyHash has been turned into a composable top level property instead of a composable top level function.
    • CompositionData and CompositionGroup have been moved to the androidx.compose.runtime.tooling namespace
    • ComposableLambda has been made an interface instead of a concrete class, and no longer has type parameters.
    • ComposableLambdaN has been made an interface instead of a concrete class, and no longer has type parameters.
    • The snapshotFlow function has been moved to the androidx.compose.runtime namespace
    • the merge method of SnapshotMutationPolicy is no longer experimental
    • The @TestOnly top level clearRoots function has been removed. دیگر لازم نیست.
    • keySourceInfoOf and resetSourceInfo functions have been removed. They are no longer necessary.
    • Composer.collectKeySourceInformation has been removed. دیگر لازم نیست.
    • isJoinedKey, joinedKeyLeft, and joinedKeyRight methods have been removed. They are no longer necessary.
    • Various top level APIs have been moved and reorganized into different files. Due to Kotlin's file class semantics, this will break binary compatibility but not source compatibility, so should not be an issue for most users.
    • ( I99b7d , b/177245490 )
  • Modifier.scrollable has been reworked. Now it uses Scrollable interface instead of ScrollableController class ( I4f5a5 , b/174485541 , b/175294473 )

  • Modifier.draggable now accepts DraggableState instead of a simple lambda. you can create state via rememberDraggableState { delta -> } to get the same behaviour as before ( Ica70f , b/175294473 )

  • ZoomableController.smoothScaleBy and ZoomableController.stopAnimation are now suspend functions. ( I7f970 , b/177457083 )

  • Deleted some previously deprecated APIs ( Ice5da , b/178633932 )

  • Made the following Material API changes:

    • Added contentPadding parameter to Top/BottomAppBar to allow customizing the default padding.
    • Reordered parameters in BackdropScaffold to follow API guidelines for required parameters being before optional parameters.
    • Moved icon parameter in BottomNavigationItem to be after selected and onClick .
    • Renamed alwaysShowLabels parameter in BottomNavigationItem to alwaysShowLabel .
    • Renamed bodyContent parameters in a few components to just content .
    • Reordered parameters in ButtonDefaults.buttonColors() . Please note that because the type of the parameters have not changed, this will not cause an error in your code - please ensure you are either using named parameters or update the ordering manually, otherwise your code will not work the same as previously.
    • Added secondaryVariant parameter to darkColors() . This color is typically the same as secondary in dark theme, but adding for consistency and further customization.
    • Removed ElevationDefaults and animateElevation() from the public API surface since they were not commonly used / useful.
    • Renamed onValueChangeEnd in Slider to onValueChangeFinished and made it nullable.
    • Renamed text parameter in Snackbar to content for consistency.
    • Added contentPadding parameter to DropdownMenuItem to allow customizing the default padding and made content be an extension on RowScope .
    • Renamed ModalDrawerLayout to ModalDrawer .
    • Renamed BottomDrawerLayout to BottomDrawer .
    • ( I1cc66 )
  • BasicTextField now accepts Brush instead of Color for better customization ( I83a36 )

  • imageResource and vectorResource are now extension functions on ImageBitmap and ImageVector companions respectively. load{Image,Vector,Font}Resource functions have been deleted. ( I89130 )

  • Changed Indication#createIndication() to Indication#rememberUpdatedIndication(InteractionState) and removes InteractionState parameter from IndicationInstance#drawIndication(). IndicationInstance should only be responsible for drawing visual effects, and not launching animations / writing state in response to InteractionState changes. These animations and state writes should happen within rememberUpdatedIndication() instead. The indication parameter in Modifier.indication was also changed to be a required parameter. ( Ic1764 , b/152525426 )

رفع اشکال

  • Added new LocalSoftwareKeyboardController composition local API to replace previous SoftwareKeyboardController interface on TextField. ( I658b6 , b/168778053 )

Version 1.0.0-alpha12

10 فوریه 2021

androidx.compose.material:material-*:1.0.0-alpha12 is released. Version 1.0.0-alpha12 contains these commits.

تغییرات API

  • Modifier.pointerInput now requires remember keys to indicate when the pointer input detection coroutine should restart for new dependencies. ( I849cd )
  • BottomDrawerLayout and ListItem have been marked as @ExperimentalMaterialApi ( Id766e )
  • PaddingValues.Absolute was added and can be used in APIs accepting PaddingValues. ( Ia5f30 )
  • onImeActionPerformed is deprecated. use KeyboardActions instead ( If0bbd , b/179071523 )
  • In order to better match naming conventions with ImageBitmap and ImageVector, ImagePainter has been renamed to BitmapPainter to parallel VectorPainter. ( Iba381 , b/174565889 )
  • Animatable.snapTo and Animatable.stop are now suspend functions ( If4288 )
  • ComponentActivity.setContent has moved to androidx.activity.compose.setContent in the androidx.activity:activity-compose module. ( Icf416 )
  • Destructuring and copy() methods have been removed from several classes where they were rarely used. ( I26702 , b/178659281 )
  • Make halfExpand() and expand() in ModalBottomSheetState internal ( Ic914e )
  • Changed Indication#createInstance to be @Composable, and changed LocalIndication to contain an Indication, not () -> Indication. ( I5eeea , b/157150564 )
  • Moved AlertDialog and DropdownMenu to be Android only for now. Added PopupProperties parameter to DropdownMenu for further configuration of the underlying Popup. ( I9c443 )
  • loadFontResource is deprecated. Use fontResource instead. imageResource, loadImageResource, vectorResource, and loadVectorResource are deprecated. Use painterResource instead. ( I6b809 )
  • Removed toggle and toggleModifier parameter from DropdownMenu, and renamed dropdownModifier , dropdownOffset and dropdownContent to modifier , offset and content respectively. DropdownMenu now behaves consistently to Popup , where the parent layout is used for the position of the menu. In most cases you can move toggle to be a sibling of DropdownMenu and wrap both in a Box . See the updated sample in the documentation for more information on usage of this API. ( I884fb )
  • toIntPx() was renamed to roundToPx(). ( I9b7e4 , b/173502290 )
  • IntBounds was renamed to IntRect and the API was improved. ( I1f6ff )
  • Added expand and collapse semantics actions. Added expand and halfExpand in ModalBottomSheetState ( Ib5064 )
  • Modifier.dragGestureFilter has been deprecated. Use Modifier.pointerInput { detectDragGestures (...)} instead. Alternatively, use Modifier.draggable for one axis drags ( I0ba93 , b/175294473 )
  • Renamed Ambients to match the Ambient -> CompositionLocal rename. Ambients used to be named AmbientFoo, now CompositionLocals are named LocalFoo. ( I2d55d )
  • Selection was moved to foundation. ( I7892b )
  • Similarly to how we previously removed state { 0 } composable and now promote usage like remember { mutableStateOf(0) } we are going to remove savedInstanceState { 0 } composable. You should use rememberSaveable { mutableStateOf(0) } instead and it will save and restore automatically if the type used inside the MutableState can be stored in the Bundle. If previously you were passing a custom saver object now you need to use a new overload of rememberSaveable which has stateSaver parameter. The usage will look like this: val holder = rememberSaveable(stateSaver = HolderSaver) { mutableStateOf(Holder(0)) } ( Ib4c26 , b/177338004 )
  • Added ProgressBarRangeInfo.Indeterminate to mark indeterminate progress bars for accessibility ( I6fe05 )
  • @ComposableContract has been deprecated in favor of three more specific annotations.

    • @ComposableContract(restartable = false) has become @NonRestartableComposable
    • @ComposableContract(readonly = true) has become @ReadOnlyComposable
    • @ComposableContract(preventCapture = true) has become @DisallowComposableCalls
    • @ComposableContract(tracked = true) has been removed.
    • ( I60a9d )
  • emptyContent() and (@Composable () -> Unit).orEmpty() utilities have been deprecated as they no longer have any positive performance impact or value ( I0484d )

  • rememberSavedInstanceState() was renamed to rememberSaveable() and moved to androidx.compose.runtime.saveable package. ( I1366e , b/177338004 )

  • Saver, listSaver(), mapSaver(), autoSaver was moved from androidx.compose.runtime.savedinstancestate to androidx.compose.runtime.saveable ( I77fe6 )

  • Parameters on RounderCornerShape, CutCornerShape and CornerBasedShape were renamed from left/right to start/end in order to support the shape's auto mirroring in the rtl direction. AbsoluteRounderCornerShape and AbsoluteCutCornerShape were introduced for the cases when auto-mirroring is not desired. ( I61040 , b/152756983 )

  • Changed Tab's text and icon parameters, and BottomNavigationItem's label parameter to be nullable, to better convey the behavior of the component when these parameters are / are not provided, since it affects the size and layout of the component. If you are currently passing emptyContent() to represent no text / icon / label, you should use null instead. ( I57ed4 )

  • Renamed contentColorFor color parameter to backgroundColor ( I5bb67 )

  • Deprecated TabDefaults and replaced it with TabRowDefaults. ( I0f189 )

  • Introduced ColorMatrix API used to modify rgb values of source content Refactored ColorFilter API to be an interface and match the implementation of PathEffect. ( Ica1e8 )

  • AnimatedValue/Float is now deprecated. Please use Animatable instead. ( I71345 , b/177457083 )

  • Add SemanticsProperties.PaneTitle API. ( I20d5a )

  • Added enabled parameters to Tab and BottomNavigationItem, to prevent them from being clickable. Changed BottomNavigationItem to be RowScope.BottomNavigationItem to better express its layout requirements in its API. ( Id683d )

  • tapGestureFilter, doubleTapGestureFilter, longPressGestureFilter and pressIndicaitonGestureFilter have been deprecated. Use Modifier.clickable or Modifier.pointerInput with detectTapGestures function instead. ( I6baf9 , b/175294473 )

  • Add layoutDirection param to Shape's createOutline. This allows to create layout direction aware shapes. ( I57c20 , b/152756983 )

  • Removed Recomposer.current() . [Abstract]ComposeView now default to lazily created, window-scoped Recomposers driven by the ViewTreeLifecycleOwner for the window. Recomposition and withFrameNanos-based animation ticks are paused while the host Lifecycle is stopped. ( I38e11 )

رفع اشکال

  • Icon will now scale up to fit its size, respecting size modifiers applied to it. For example Icon(.., modifier = Modifier.size(50.dp) will now draw in a 50x50dp space. ( Ib2ba9 , b/178796190 )

Version 1.0.0-alpha11

28 ژانویه 2021

androidx.compose.material:material-*:1.0.0-alpha11 is released. Version 1.0.0-alpha11 contains these commits.

تغییرات API

  • Promotes some Material APIs to no longer be @Experimental ( I5d20e )
  • Content description parameter has been added to the Image and Icon. It is used to provide description to the accessibility services ( I2ac4c )
  • Changes Material stateful parameter interfaces to have @Composable functions that return State<T> . Adds Animatable.asState() to make it easier to convert an Animatable to a State. Also changes animateElevation to be a suspend extension on Animatable. ( If613c )
  • Snackbar, SnackbarHost, SnackbarHostState are not @ExperimentalMaterialAPI anymore ( Id1fb5 )
  • Changes Typography, Shapes, and TabPosition to no longer be data classes. Adds copy function for Typography and Shapes to replace the generated ones. ( I40037 )
  • Deleted some previously deprecated Material APIs ( Ifaa25 )

رفع اشکال

  • onCommit, onDispose, and onActive have been deprecated in favor of SideEffect and DisposableEffect APIs ( If760e )
  • TransitionDefinition-based Transition has been deprecated ( I0ac57 )
  • Initial State in updateTransition is now supported ( Ifd51d )
  • WithConstraints was reworked as BoxWithConstraints and moved to foundation.layout. ( I9420b , b/173387208 )
  • Deprecate non-suspend scrollBy, remove non-suspend scrollTo

    We now recommend using suspend functions to control scrolling and wait for the scroll to finish. We are deprecating and/or removing the non-suspend versions of these functions as part of this transition. ( Ie9ced )

  • Deprecate non-suspend smoothScrollBy We now recommend using suspend functions to control scrolling and wait for the scroll to finish. We are deprecating the non-suspend versions of these functions as part of this transition. ( I12880 )

  • Introduced ComposeContentTestRule , which extends ComposeTestRule and defines setContent , which has been removed from ComposeTestRule . Added a factory method createEmptyComposeRule() that returns a ComposeTestRule and does not launch an Activity for you. Use this when you want to launch your Activity during your test, eg using ActivityScenario.launch ( I9d782 , b/174472899 )

  • The ripple used in Button and FloatingActionButton can no longer be customized by providing a new Indication through AmbientIndication - this was never intended to be a way to customize these components and this now makes these components consistent with other Material components. To customize ripples across an application, see RippleTheme. ( I546c5 )

  • animateAsState is now animateFooAsState, where Foo is the type of the variable being animated. eg Float, Dp, Offset, etc ( Ie7e25 )

  • BasicTextField received a new parameter called decorationBox . It allows to add the decorations like icons, placeholder, label and similar to the text field and increase the hit target area of it. ( I16996 )

  • Fix for a bug which made it not possible to set the width of the material text field be less than 280.dp ( I78373 )

  • canDrag parameter has been removed from the Modifier.draggable ( Ic4bec , b/175294473 )

  • Remove displaySize as it should be avoided. Typically it is better to use size of onRoot() or window size at least. ( I62db4 )

  • Surface can now have multiple layout children. ( I66a92 , b/144488459 )

  • invalidate and compositionReference() are now deprecated in favor of currentRecomposeScope and rememberCompositionReference respectively. ( I583a8 )

  • Changes PopupPositionProvider to use window-relative coordinates, not global coordinates. Renames parentGlobalBounds to anchorBounds, and changes windowGlobalBounds to be windowSize: IntSize ( I2994a )

  • Duration and Uptime will be replace with Long milliseconds, and this step removes the dependency of pointer input on those classes. ( Ia33b2 , b/175142755 , b/177420019 )

  • AnimatedFloat.fling that accepts FlingConfig has been removed. Please use suspend Animatable.animateDecay instead. ( I4659b , b/177457083 )

  • clickable, toggleable and selectable can be created outside of composition now ( I0a130 , b/172938345 , b/175294473 )

  • Easing has been changed to a functional interface ( Ib14e5 )

  • ScrollableColumn/Row were deprecated. Using ScrollableColumn is less efficient comparing to LazyColumn when you have a large scrolling content because with LazyColumn we can only compose/measure/draw visible elements. To prevent users from going inefficient way we decided to deprecate ScrollableColumn and ScrollableRow and promote usages of LazyColumn and LazyRow instead. Users can still decide they don't need the lazy behaviour and use the modifiers directly like this: Column(Modifier.verticalScroll(rememberScrollState())) ( Ib976b , b/170468083 )

  • New items(count: Int) factory method for scope of LazyColumn/LazyRow/LazyVerticalGrid. items(items: List) and itemsIndexed(items: List) are now extension functions so you have to manually import them when used. New extension overloads for Arrays: items(items: Array) and itemsIndexed(Array) ( I803fc , b/175562574 )

  • Removed experimental monotonicFrameAnimationClockOf methods ( Ib753f , b/170708374 )

  • Deprecated global coordinates methods and made new window-based coordinates methods. ( Iee284 )

  • Added Modifier.toolingGraphicsLayer which adds a graphics layer modifier when inspection is turned on. ( I315df )

  • FocusRequester.createRefs is now marked as experimental as it might change. ( I2d898 , b/177000821 )

  • SemanticsPropertyReceiver.hidden was renamed to invisibleToUser and marked @ExperimentalComposeUiApi. AccessibilityRangeInfo was renamed to ProgressBarRangeInfo. stateDescriptionRange was renamed to progressBarRangeInfo. AccessibilityScrollState was renamed to ScrollAxisRange. horizontalAccessibilityScrollState was renamed to horizontalScrollAxisRange. verticalAccessibilityScrollState was renamed to verticalScrollAxisRange. ( Id3148 )

  • Leverage TestCoroutineDispatcher in testing ( I532b6 )

  • Updated vector graphics API to support parsing of tinting applied to root of vector graphics. ( Id9d53 , b/177210509 )

نسخه 1.0.0-alpha10

13 ژانویه 2021

androidx.compose.material:material-*:1.0.0-alpha10 is released. نسخه 1.0.0-alpha10 شامل این تعهدات است.

تغییرات API

  • Modified Velocity to have component parts and mathematical operations. ( Ib0447 )
  • Renamed @ExperimentalTesting to @ExperimentalTestApi to be consistent with similar experimental api annotations ( Ia4502 , b/171464963 )
  • Renamed Position to DpOffset and removed getDistance() ( Ib2dfd )
  • Ranamed Color.useOrElse() to Color.takeOrElse() ( Ifdcf5 )
  • Add Toggle to foundation Strings.kt ( I4a5b7 , b/172366489 )
  • FlowRow and FlowColumn were deprecated. Please use a custom layout instead. ( I09027 )
  • Modifier.focus() and Modifier.focusRequester() are deprecated. Use Modifier.focusModifier() and Modifier.focusReference() instead. ( I75a48 , b/175160751 , b/175160532 , b/175077829 )
  • Moved nativeClass to ui module and made it internal. Updated usages of nativeClass in equals implementations to use 'is MyClass' instead. ( I4f734 )

رفع اشکال

  • Added support for disabled and read-only text fields ( I35279 , b/171040474 , b/166478534 )
  • animate() is now replaced with animateAsState() , which returns a State<T> instead of T . This allows better performance, as the invalidation scope can be narrowed down to where the State value is read. ( Ib179e )
  • Add Semantics role API and add Role as a parameter to clickable, selectable and toggleable SemanticsModifier. Changed Modifier.progressSemantics so that Slider can also use it. ( I216cd )

نسخه 1.0.0-alpha09

16 دسامبر 2020

androidx.compose.material:material-*:1.0.0-alpha09 is released. نسخه 1.0.0-alpha09 شامل این تعهدات است.

تغییرات API

  • added API to manually trigger settle animation and drag in Modifier.swipeable ( Iaa17a , b/162408885 )
  • Renamed *Constants objects such as ButtonConstants to end with Defaults instead, such as ButtonDefaults. Also removes unnecessary default prefixes from properties in these new objects. ( Ibb915 , b/159982740 )
  • Compose supports property getters that can make composable invocations. Support for this is not going away, but the syntax for declaring a property getter as being @Composable is changing.

    The now-deprecated syntax for doing this was by annotating the property itself:

        @Composable val someProperty: Int get() = ...
    

    The now-correct syntax for doing this is by annotating the getter of the property:

       val someProperty: Int @Composable get() = ...
    

    Both syntaxes will work for some time, but the former deprecated syntax will eventually become a compile error. ( Id9197 )

  • Added androidx.compose.material:material-ripple library containing ripple APIs to allow building interactive components without needing the rest of the Material library. rememberRippleIndication has been deprecated and replaced with rememberRipple. ( Ibdf11 )

رفع اشکال

  • Lambdas in offset modifiers now return IntOffset rather than Float. ( Ic9ee5 , b/174137212 , b/174146755 )
  • Refactored ShaderBrush to lazily create a shader instance when sizing information of the drawing environment is available. This is useful to define gradients that occupy the full drawing bounds of a composable at composition time, without having to implement custom DrawModifier implementations.

    Deprecated gradient function constructor APIs in favor of factory methods on a Gradient object. ( I511fc , b/173066799 )

  • Modifier.focusObserver is deprecated. Use Modifier.onFocusChanged or Modifier.onFocusEvent instead ( I30f17 , b/168511863 , b/168511484 )

  • Deprecate LazyColumnFor, LazyRowFor, LazyColumnForIndexed and LazyRowForIndexed. Use LazyColumn and LazyRow instead ( I5b48c )

  • Moved Dp.VectorConverter, Position.VectorConverter, etc to animation-core, and deprecated the old VectorConveters ( If0c4b )

  • Autofill API is now experimental API and requires opt-in ( I0a1ec )

  • Adding destructuring declarations to create FocusRequester instances ( I35d84 , b/174817008 )

  • accessibilityLabel has been renamed to contentDescription. accessibilityValue has been renamed to stateDescription. ( I250f2 )

  • New infiniteRepeatable function for creating an InfiniteRepeatableSpec ( I668e5 )

  • The positioning behaviour of DropdownMenus was slightly changed according to the Material spec. ( I34c72 , b/168594123 )

  • InteractionState support for TextFields has been added. ( I61d91 )

  • Added Modifier.clearAndSetSemantics to clear descendants' semantics and set new ones. ( I277ca )

  • Moved ContentDrawScope to ui-graphics module to be with DrawScope. ( Iee043 , b/173832789 )

نسخه 1.0.0-alpha08

2 دسامبر 2020

androidx.compose.material:material:1.0.0-alpha08 , androidx.compose.material:material-icons-core:1.0.0-alpha08 , and androidx.compose.material:material-icons-extended:1.0.0-alpha08 آزاد می شوند. نسخه 1.0.0-alpha08 شامل این تعهدات است.

تغییرات API

  • MaterialTheme now sets the correct colors for selection handles and selection background. Non-Material apps can manually use AmbientTextSelectionColors to customize the colors used for selection. ( I1e6f4 , b/139320372 , b/139320907 )
  • Added lint check for composable lambda parameter naming and position, to check for consistency with Compose guidelines. Also migrated some APIs using children as the name for their trailing lambda to content , according to the lint check and guidance. ( Iec48e )
  • Renamed VectorAsset to ImageVector Moved and renamed VectorAsset to Builder to be an inner class of ImageVector as per API council guidelines. Added typealias of VectorAssetBuilder to link to ImageVector.Builder for compat. ( Icfdc8 )
  • Renamed ImageAsset and related methods to ImageBitmap. ( Ia2d99 )
  • Moved foundation semantics properties to ui ( I6f05c )
  • fun RippleIndication() has been deprecated and replaced with rememberRippleIndication() for consistency with other APIs. ( Id8e2c )
  • Added a singeLine parameter into BasicTextField, TextField and OutlinedTextField. Set this parameter to true to make the text field a single horizontally scrollable line. ( I57004 , b/168187755 )

رفع اشکال

  • Add semantics action Dismiss ( I2b706 )
  • Moved DrawModifier APIs from the androidx.compose.ui package to the androidx.compose.ui.draw package. Created DrawModifierDeprecated.kt file to include typealiases/helper methods to assist with the migration from the deprecated to the current APIs. ( Id6044 , b/173834241 )
  • Renamed Modifier.drawLayer to Modifier.graphicsLayer Also updated related classes to GraphicsLayer as per API feedback. ( I0bd29 , b/173834241 )
  • <T> was removed from SubcomposeLayout declaration. You can use it without specifying a type now. ( Ib60c8 )
  • Added Modifier.scale/rotate APIs as conveniences for drawLayer.
    • Renamed Modifier.drawOpacity to Modifier.alpha
    • Renamed Modifier.drawShadow to Modifier.shadow ( I264ca , b/173208140 )
  • The alignment parameter of Box was renamed to contentAlignment. ( I2c957 )
  • offsetPx modifiers were renamed to offset. They are now taking lambda parameters instead of State. ( Ic3021 , b/173594846 )
  • Introduced SweepGradientShader and SweepGradientBrush APIs. ( Ia22c1 )
  • Added lint check for Modifier parameters in Composable functions. This lint check checks the naming, return type, default value, and order of the parameter for consistency with Compose guidelines. ( If493b )
  • Updated TextFieldValue API
    • made TextFieldValue.composition readonly
    • removed exception thrown for invalid selection range ( I4a675 , b/172239032 )
  • Added a new Modifier.drawLayer() overload. It takes a lambda block on a new GraphicsLayerScope where you define the layer parameters in a way which allows to skip recomposition and relayout when the state change happens. DrawLayerModifier is now internal in preparation to migrating its logic into placeable.placeWithLayer() method of LayoutModifier ( I15e9f , b/173030831 )
  • Deprecated Ambients named with Ambient as their suffix, and replaced them with new properties prefixed with Ambient, following other Ambients and Compose API guidelines. ( I33440 )
  • Added lint check to check that Modifier factories use androidx.compose.ui.composed {} internally, instead of being marked as @Composable . ( I3c4bc )
  • Semantics argument mergeAllDescendants was renamed to mergeDescendants. ( Ib6250 )
  • Time control in tests (TestAnimationClock and its usages) is now experimental ( I6ef86 , b/171378521 )
  • Remove old ui-test module and its stubs ( I3a7cb )
  • TextUnit.Inherit is renamed to TextUnit.Unspecified for consistency with other units. ( Ifce19 )
  • The Alignment interface was updated and made functional. ( I46a07 , b/172311734 )
  • id was renamed to layoutId for LayoutIdParentData. Measurable.id was renamed to Measurable.layoutId. ( Iadbcb , b/172449643 )

نسخه 1.0.0-alpha07

11 نوامبر 2020

androidx.compose.material:material:1.0.0-alpha07 , androidx.compose.material:material-icons-core:1.0.0-alpha07 , and androidx.compose.material:material-icons-extended:1.0.0-alpha07 آزاد می شوند. نسخه 1.0.0-alpha07 شامل این تعهدات است.

تغییرات API

  • Emphasis has been deprecated and replaced with AmbientContentAlpha. AmbientContentAlpha is a simpler abstraction that represents the preferred content alpha for part of the hierarchy, similar to how AmbientContentColor represents the preferred content color. Text and Icon now consume the current value from AmbientContentAlpha by default, and you can manually do: color.copy(alpha = AmbientContentAlpha.current) to have the same effect in your components. Instead of using ProvideEmphasis, you can just directly provide a value through AmbientContentAlpha, and use the new default levels in ContentAlpha to replace the old EmphasisLevels. ( Idf03e , b/159017896 )
  • Adds androidx.compose.material.AmbientContentColor to replace androidx.compose.foundation.AmbientContentColor ( I84f7b , b/172067770 )
  • Adds androidx.compose.material.Text to replace androidx.compose.foundation.Text as a high level, themeable Text component. For a basic text component that does not consume color / text style from the theme, use BasicText. ( Ie6ae0 )
  • Added maxLines to TextFields ( Ib2a5b )
  • Update TextFields to accept KeyboardOptions ( Ida7f3 )
  • Surface now uses the absolute (total) elevation when calculating elevation overlays, so a Surface nested in another Surface will use the combined elevation to draw the overlay. ( I7bd2b , b/171031040 )

رفع اشکال

  • captureToBitmap moved to captureToImage . ( I86385 )
  • The foundation AmbientTextStyle, ProvideTextStyle, and AmbientContentColor have been deprecated. Instead use the new versions available in the Material library. For non-Material applications, you should instead create your own design system specific theming ambients that can be consumed in your own components. ( I74acc , b/172067770 )
  • foundation.Text has been deprecated and replaced with material.Text. For a basic, unopinionated text API that does not consume values from a theme, see androidx.compose.foundation.BasicText. ( If64cb )
  • Rename KeyboardOptions as ImeOptions ( I82f36 )
  • Moved KeyboardType and ImeAction into KeyboardOptions ( I910ce )
  • BaseTextField has been deprecated. Use BasicTextField instead. ( I896eb )
  • ExperimentalSubcomposeLayoutApi annotation was removed. SubcomposeLayout can now be used without adding @OptIn ( I708ad )
  • FirstBaseline and LastBaseline were moved to androidx.compose.ui.layout package ( Ied2e7 )
  • Updated Icon API to take in Color.Unspecified as a possible tint color which will draw the provided asset or painter without a ColorFilter. Previously attempts to ignore tinting with Color.Unspecified would tint with a transparent color ending up with nothing rendered at all. ( I049e2 , b/171624632 )
  • relativePaddingFrom was renamed to paddingFrom. The paddingFromBaseline modifier was added, as convenience for specifying distances from layout bounds to text baselines. ( I0440a , b/170633813 )
  • LaunchedTask was renamed to LaunchedEffect for consistency with the SideEffect and DisposableEffect APIs. LaunchedEffect with no subject params is not permitted in order to encourage best practices. ( Ifd3d4 )
  • MeasureResult was moved out of MeasureScope. ( Ibf96d , b/171184002 )
  • Several layout related symbols were moved from androidx.compose.ui to androidx.compose.layout.ui. ( I0fa98 , b/170475424 )

نسخه 1.0.0-alpha06

28 اکتبر 2020

androidx.compose.material:material:1.0.0-alpha06 , androidx.compose.material:material-icons-core:1.0.0-alpha06 , and androidx.compose.material:material-icons-extended:1.0.0-alpha06 آزاد می شوند. نسخه 1.0.0-alpha06 شامل این تعهدات است.

تغییرات API

  • androidx.compose.foundation.Icon has been moved to androidx.compose.material.Icon. You can also use the Image component / Modifier.paint() with a Painter if you do not want to use the Material library. ( I9f622 )
  • Adds FloatingActionButtonElevation to represent elevation used by FABs in different states. See FloatingActionButtonConstants.defaultElevation() for the default implementation ( I2d4f5 )
  • Adds SwitchColors interface to represent colors used by a Switch in different states. See SwitchConstants.defaultColors to customize these colors. ( I93805 )
  • Adds ButtonElevation and ButtonColors interfaces to represent elevation and colors used by buttons in different states. See the default functions in ButtonConstants to customize these parameters. ( Ic5b7b )
  • Adds RadioButtonColors interface to represent colors used by a RadioButton in different states. See RadioButtonConstants.defaultColors() to customize the colors used in different states. ( I74130 )
  • Adds CheckboxColors interface to represent colors used by a checkbox in different states. See CheckboxConstants.defaultColors() to customize the colors used in different states. ( I7dbdb )

رفع اشکال

  • Material components do not set the elevation as zIndex anymore. Which means that within the same parent the child with larger shadow size will not be drawn on top of the child with the smaller one automatically. If you still need such behavior please set Modifier.zIndex() manually where needed ( I70417 , b/170623932 )
  • Deprecate VectorPainter in favor of rememberVectorPainter to better indicate that the composable API internally leverages 'remember' to persist data across compositions. ( Ifda43 )
  • Enable transitions in ComposeTestRule; remove option to enable the blinking cursor from ComposeTestRule. ( If0de3 )
  • Added single line keyboard option to CoreTextField ( I72e6d )
  • Renamed Radius API to CornerRadius to better express how it is used throughout Compose. Updated documentation to indicate that negative corner radii are clamped to zero. ( I130c7 , b/168762961 )
  • Refactored DrawScope and ContentDrawScope to be interfaces instead of abstract classes
    • Created CanvasDrawScope implementation of DrawScope
    • Refactored implementations of DrawScope to use CanvasScope instead
    • Created DrawContext to wrap dependencies for DrawScope
    • Removed deprecated methods on DrawScope ( I56f5e )
  • Box was made an inline function. ( Ibce0c , b/155056091 )

نسخه 1.0.0-alpha05

14 اکتبر 2020

androidx.compose.material:material:1.0.0-alpha05 , androidx.compose.material:material-icons-core:1.0.0-alpha05 , and androidx.compose.material:material-icons-extended:1.0.0-alpha05 آزاد می شوند. نسخه 1.0.0-alpha05 شامل این تعهدات است.

تغییرات API

  • Popups and dialogs now inherit FLAG_SECURE from parent Window. Also added option to configure this explicitly ( I64966 , b/143778148 , b/143778149 )
  • Modifier.swipeable has 56.dp thresholds for states by default now ( Iab825 , b/168610267 )
  • all scaffold states marked as @Stable. drawerGesturesEnabled in ScaffoldState moved to Scaffold itself. ( I36645 , b/168297016 )
  • Removes nullable type from Scaffold lambda parameters, you can use emptyContent() to represent no content for a given parameter. ( I2b318 , b/157633857 , b/158551084 )
  • Deprecates contentColor() and currentTextStyle() APIs, and replaces them with AmbientContentColor and AmbientTextStyle ambients respectively. You can access the current value by using .current on the ambient property, as with any other ambient. This was change was made for consistency and to avoid having multiple ways to accomplish the same thing. Additionally renames some ambient properties to better describe their purpose as follows:

    • ContentColorAmbient -> AmbientContentColor
    • TextStyleAmbient -> AmbientTextStyle
    • IndicationAmbient -> AmbientIndication
    • EmphasisAmbient -> AmbientEmphasisLevels
    • RippleThemeAmbient -> AmbientRippleTheme ( I37b6d )
  • Adds AmbientElevationOverlay, allowing customizing / disabling the default elevation overlay applied to Surfaces in dark theme. ( I5b74d )

رفع اشکال

  • As part of the standardization of sentinel values for inline classes, rename Color.Unset to Color.Unspecified for consistency with other inline classes ( I97611 , b/169797763 )
  • TextOverflow.None is introduced. When overflow is None, Text won't handle overflow anymore, and it will report its actual size to LayoutNode. ( I175c9 , b/158830170 )
  • launchInComposition renamed to LaunchedTask to match Compose API guidelines ( I99a8e )
  • OnPositionedModifier is renamed to OnGloballyPositionedModifier and onPositioned() is renamed to onGloballyPositioned(). ( I587e8 , b/169083903 )

نسخه 1.0.0-alpha04

1 اکتبر 2020

androidx.compose.material:material:1.0.0-alpha04 , androidx.compose.material:material-icons-core:1.0.0-alpha04 , and androidx.compose.material:material-icons-extended:1.0.0-alpha04 آزاد می شوند. نسخه 1.0.0-alpha04 شامل این تعهدات است.

تغییرات API

  • Exposes InteractionState parameters in stateful Material components, to allow hoisting the state and reading / controlling the state. ( Iaca5f , b/168025711 , b/167164434 )
  • Changes the *color parameters on RadioButton and TriStateCheckbox to allow fully customizing the colors used in each state, as well as changing how the colors animate between states if desired. See the new animateDefault* color functions in CheckboxConstants and RadioButtonConstants for more information. ( I1c532 )
  • Renamed rememberBackdropState to rememberBackdropScaffoldState and added an additional param for the animation clock. Renamed the param backdropScaffoldState of BackdropScaffold to just scaffoldState. Renamed BackdropConstants to BackdropScaffoldConstants. ( Ib644d )
  • Added experimental BottomSheetScaffold component. ( Ie02f0 , b/148996320 )
  • Added experimental ModalBottomSheetLayout component. ( Ic209e , b/148996320 )
  • Renames ButtonConstants/FloatingActionButtonConstants.defaultAnimatedElevation to defaultElevation, and now returns a Dp value instead of an AnimatedValue. ( I5f3ed )

رفع اشکال

  • Updated many Graphics APIs
    • Updated scale and rotation transformation APIs to consume a single Offset parameter to represent the pivot coordinate instead of separate float parameters for the x/y coordinates in DrawScope and DrawTransform
    • Removed Rect.expandToInclude and Rect.join methods
    • Updated Radius documentation to say oval in addition to elliptical
    • Added documentation to indicate the public constructor for the inline Radius class is not to be called directly but instead Radius objects should be instantiated through their function constructors
    • Removed RoundRect APIs to query topRight, bottomRight, bottomCenter, etc.
    • Deprecated Rect.shift in favor of Rect.translate
    • Removed RoundRect.grow and Rect.shrink APIs
    • Renamed RoundRect.outerRect to Rect.boundingRect
    • Removed RoundRect.middleRect/tallMiddleRect/wideMiddleRect and Rect.isStadium methods
    • Renamed RoundRect.longestSide to RoundRect.maxDimension
    • Renamed RoundRect.shortestSide to RoundRect.minDimension
    • Changed RoundRect.center to be a property instead of a function
    • Updated RoundRect constructor to consume Radius properties instead of individual parameters for x/y radius values
    • Removed Size APIs that assumed it was a Rectangle with origin at 0,0
    • Added a destructing API to Radius
    • Migrated various RoundRect extension functions to be properties instead
    • ( I8f5c7 , b/168762961 )
  • foundation.Box was deprecated. Please use foundation.layout.Box instead. ( Ie5950 , b/167680279 )
  • Stack was renamed to Box. The previously existing Box will be deprecated in favor of the new Box in compose.foundation.layout. The behavior of the new Box is to stack children one on top of another when it has multiple children - this is different from the previous Box, which was behaving similar to a Column. ( I94893 , b/167680279 )
  • Box decoration parameters have been deprecated. If you want to have decorations/padding on your box, use Modifiers instead (Modifier.background, Modifier.border, Modifier.padding) ( Ibae92 , b/167680279 )
  • Updated many Graphics APIs
    • Updated DrawScope APIs with scoped transformation methods to indicate that the transformation is only applied within the callback and removed after the callback is invoked
    • Updated clipPath documentation to refer to Path instead of rounded rectangle
    • Fixed spacing in documentation for right parameter in clipPath
    • Renamed DrawScope.drawCanvas to drawIntoCanvas and removed size parameter
    • Renamed dx/dy parameters in inset method to horizontal and vertical
    • Added inset overload that provides the same inset value to all 4 bounds
    • Removed documentation on inset method indicating that inset would be applied to all 4 sides
    • Updated documentation for Rect class
    • Updated comments on Rect parameters to match kdoc style
    • Removed Rect.join and Rect.expandToInclude
    • Created overload for Rect.translate(offset) and deprecated Rect.shift
    • ( If086a , b/167737376 )
  • We prevented static imports of contents of layout scopes (eg alignWithSiblings in RowScope). The explicit scope alternative should be used instead: with(RowScope) { Modifier.alignWithSiblings(FirstBaseline) } . ( I216be , b/166760797 )

نسخه 1.0.0-alpha03

16 سپتامبر 2020

androidx.compose.material:material:1.0.0-alpha03 , androidx.compose.material:material-icons-core:1.0.0-alpha03 , and androidx.compose.material:material-icons-extended:1.0.0-alpha03 آزاد می شوند. نسخه 1.0.0-alpha03 شامل این تعهدات است.

تغییرات API

  • Renames BottomNavigationItem 's onSelect parameter to onClick ( I91925 , b/161809324 )
  • Adds InteractionState parameter to BottomNavigationItem and Tab, allowing hoisting this state and adjusting how the component appears in different states. ( Ia3e9e , b/168025711 )
  • Removes disabledBackgroundColor and disabledContentColor parameters from buttons. You should instead use the new default color functions inside ButtonConstants. If you are already setting contentColor / backgroundColor explicitly, you should instead use these default functions and customize some / all of the parameters to avoid overwriting the color for both enabled / disabled states. ( If9b52 )
  • Textfield's background color does not implicitly apply transparency alpha anymore. Instead, any color provided through the backgroundColor parameter will be applied directly. ( Iecee9 , b/167951441 )
  • InnerPadding was renamed to PaddingValues. ( I195f1 , b/167389171 )
  • The params resistanceFactorAtMin and resistanceFactorAtMax in Modifier.swipeable were replaced with a single resistance param. A new defaultResistanceConfig method was added in SwipeableConstants . ( I54238 )
  • Adds animated stateful elevation support for Button and FloatingActionButton. The elevation now animates between default and pressed states. To customize the elevation between states, please use ButtonConstants.defaultAnimatedElevation() and FloatingActionButtonConstants.defaultAnimatedElevation() instead of setting a flat Dp value in all cases. ( I37925 )
  • Label became an optional parameter inside TextField and OutlinedTextField ( I267f6 , b/162234081 )

رفع اشکال

  • Global testing functions such as onNode or waitForIdle are now deprecated, please migrate to their new counterparts that are defined on ComposeTestRule ( I7f45a )
  • DpConstraints and APIs using it were deprecated. ( I90cdb , b/167389835 )
  • The parameters minWidth and maxWidth of widthIn were renamed to min and max. Similarly for preferredWidthIn, heightIn, preferredHeightIn. ( I0e5e1 , b/167389544 )
  • Remove scroll forward/backward semantics actions. Added steps in AccessibilityRangeInfo. ( Ia47b0 )
  • Usages of gravity were consistently renamed to align or alignment in layout APIs. ( I2421a , b/164077038 )
  • Added onNode and other global methods on ComposeTestRule as the current global ones are going to be deprecated. ( Ieae36 )
  • Moved createAndroidComposeRule and AndroidInputDispatcher from androidx.ui.test.android to androidx.ui.test ( Idef08 , b/164060572 )

نسخه 1.0.0-alpha02

2 سپتامبر 2020

androidx.compose.material:material:1.0.0-alpha02 , androidx.compose.material:material-icons-core:1.0.0-alpha02 , and androidx.compose.material:material-icons-extended:1.0.0-alpha02 آزاد می شوند. نسخه 1.0.0-alpha02 شامل این تعهدات است.

تغییرات API

  • Added an experimental BackdropScaffold component. ( Iad908 )

رفع اشکال

  • Matrix4 was replaced with Matrix. All other parts of vectormath package have been removed. ( Ibd665 , b/160140398 )

نسخه 1.0.0-alpha01

26 آگوست 2020

androidx.compose.material:material:1.0.0-alpha01 , androidx.compose.material:material-icons-core:1.0.0-alpha01 , and androidx.compose.material:material-icons-extended:1.0.0-alpha01 آزاد می شوند. نسخه 1.0.0-alpha01 شامل این تعهدات است.

مشکل شناخته شده

= The first character in a material TextField cannot be removed using a backspace ( b/165956313 )

نسخه 0.1.0-dev

Version 0.1.0-dev17

19 آگوست 2020

androidx.compose.material:material:0.1.0-dev17 , androidx.compose.material:material-icons-core:0.1.0-dev17 , and androidx.compose.material:material-icons-extended:0.1.0-dev17 آزاد می شوند. Version 0.1.0-dev17 contains these commits.

تغییرات API

  • Previously deprecated RadioGroup and RadioGroupItems have been removed. Use Row and RadioBotton instead ( I381b7 , b/163806637 )
  • Removed onFocusChanged callbacks from TextField. Use Modifier.focusObserver instead. ( I51089 , b/161297615 )
  • Modifier.drawBorder has been deprecated. Use Modifier.border instead. Border data class has been replaced by BorderStroke ( I4257d , b/158160576 )
  • Renamed some properties in SwipeableState: swipeTarget -> targetValue, swipeProgress -> progress, swipeDirection -> direction. Added a rememberSwipeableState function for creating SwipeableStates. ( I2fc9c , b/163129614 , b/163132293 )
  • Snackbar support with positioning and proper queueing has been added. Access it via SnackbarHostState.showSnackbar suspend function. علاوه بر این:
    • SnackbarHost components has been added. It hosts Snackbars based on the state and is responsible for transition between snackbars.
    • SnackbarHostState has been added to allow for control over snackbars, snackbars hosts and to decouple it from the ScaffoldState. you can access this state via scaffoldState.snackbarHostState as well.
    • Snackbar overload has been added to support common interface between snackbarHostState and snackbars itself. ( I79aaa )
  • Adds enabled parameter to IconButton, and reorders parameters in IconToggleButton ( I0a941 , b/161809385 , b/161807956 )
  • ListItem version with String-based API has been removed. Use slot version instead. ( Ib8f57 , b/161804681 )
  • Removed deprecated FilledTextField component. Please use TextField instead to get the Material Design implementation of the Filled text field. ( I5e889 )
  • AlertDialog now uses FlowRow for buttons ( I00ec1 , b/161809319 , b/143682374 )
  • Added params in Modifier.swipeable for changing the amount of resistance when swiping past the bounds. Removed [min/max]Value params. ( I93d98 )
  • Added backgroundColor parameter to LinearProgressIndicator and removed internal padding from CircularProgressIndicator. Added new ProgressIndicatorConstants.DefaultProgressAnimationSpec which can be used as the default AnimationSpec when animating progress between values ( If38b5 , b/161809914 , b/161804677 )
  • Optional param velocityThreshold added to Modifier.swipeable. ( I698ba )
  • bottomBarSize, fabSize and others and not available anymore in ScaffoldState. Use Modifier.onPosition instead on the component you'd like to know the size of. contentColor and Modifier pamateres have been added to Scaffold ( Ic6f7b , b/161811485 , b/157174382 )
  • Renames and reorders some parameters in Tab for consistency with other APIs ( Ia2d12 , b/161807532 )
  • Splits TabRow into TabRow and ScrollableTabRow, removing isScrollable from TabRow. Also exposes edgePadding in ScrollableTabRow, which allows controlling the free space before / after the tabs. ( I583e8 , b/161809544 )
  • The TabRow object has been removed, replacing it with TabConstants. TabRow.TabPosition has moved to be top level (TabPosition), and indicatorContainer has been renamed to indicator . See the samples and documentation for detailed information on how to use the updated API, and defaults. ( I54d45 , b/161809544 )
  • The thresholds param in Modifier.swipeable was tweaked; it now takes a pair of states (of type T) and returns the threshold between them in the form of a ThresholdConfig. A param dismissThresholds was added to SwipeToDismiss, which is a lambda (DismissDirection) -> ThresholdConfig. ( Ie1080 )
  • Slider has more colors for granular customization ( I73e64 , b/161810475 )
  • Card's color param was renamed to backgroundColor ( I01fc1 , b/161809546 )
  • Snackbar has customizable background and content colors now ( I238f2 , b/161804381 )
  • modifier, backgroundColor, contentColor and scrimColor customization params has been added to Drawers ( I23655 , b/161804378 )
  • The state { ... } composable is now deprecated in favor of explicit calls to remember { mutableStateOf(...) } for clarity. This reduces the overall API surface and number of concepts for state management, and matches the by mutableStateOf() pattern for class property delegation. ( Ia5727 )
  • Button's padding param was renamed to contentPadding ( Id252e , b/161809394 )
  • Add an experimental material component SwipeToDismiss. ( I129e5 )

رفع اشکال

  • Removed onChildPositioned and OnChildPositionedModifier . Developers should use onPositioned and OnPositionedModifier on the child layout instead. ( I4522e , b/162109766 )
  • Added mergePolicy lambda to SemanticsPropertyKey. This can be used to define a custom policy for mergeAllDescendants semantics merging. The default policy is to use the parent value if already present, otherwise the child value. ( Iaf6c4 , b/161979921 )
  • IntSize is now an inline class ( I2bf42 )
  • PlacementScope.placeAbsolute() was renamed to PlacementScope.place() , and the previous PlacementScope.place() was renamed to PlacementScope.placeRelative() . As a result, the PlacementScope.place() method will not automatically mirror the position in right-to-left contexts anymore. If this is desired, use PlacementScope.placeRelative() instead. ( I873ac , b/162916675 )
  • Deprecated PxBounds in favor of Rect. Updated all usages of PxBounds with rect and added proper deprecate/replace with annotations to assist with the migration. ( I37038 , b/162627058 )
  • Renamed RRect to RoundRect to better fit compose naming patterns Created similar function constructors to RRect and deprecated RRect function constructors ( I5d325 )

Version 0.1.0-dev16

5 آگوست 2020

androidx.compose.material:material:0.1.0-dev16 , androidx.compose.material:material-icons-core:0.1.0-dev16 , and androidx.compose.material:material-icons-extended:0.1.0-dev16 آزاد می شوند. Version 0.1.0-dev16 contains these commits.

تغییرات API

  • Colors is now a final class instead of an interface. Instead of extending and providing a custom implementation, you should create a new ambient for your custom theme object, and access the theme object through the new ambient in your components, similar to how MaterialTheme works internally. ( Ibae84 )
  • Renamed ColorPalette to Colors, to better map to the Material color system and remove confusion over ColorPalette being a 'generic' theming object, as opposed to being a specific implementation of the Material color system. Additionally renames lightColorPalette and darkColorPalette to lightColors and darkColors respectively. ( I9e976 , b/161812111 )
  • Renames BottomNavigationItem's text parameter to label , onSelected to onSelect , activeColor to selectedContentColor , inactiveColor to unselectedContentColor and updates parameter ordering to match guidelines. ( Icb605 , b/161809324 )
  • Modifier.stateDraggable was completely reworked and renamed to Modifier.swipeable. A new SwipeableState class was introduced, and DrawerState and BottomDrawerState were refactored to inherit from it. [Modal/Bottom]DrawerLayout no longer takes an onStateChange parameter. ( I72332 , b/148023068 )
  • foundation.shape.corner package were flatten to foundation.share ( I46491 , b/161887429 )
  • Added ExperimentalMaterialApi annotation. RippleTheme marked as Experimental ( Ic5fa0 , b/161784800 )
  • Material FilledTextField was renamed to TextField and foundational TextField was renamed to BaseTextField to make simplest desired API easy to discover and use ( Ia6242 , b/155482676 )

رفع اشکال

  • OnChildPositioned has been deprecated. Use OnPositioned on the child instead. ( I87f95 , b/162109766 )
  • Address broad API fixes ( I077bc )
    1. Remove unused OffsetBase interface
    2. Align Offset and IntOffset classes to have a consistent API surface
    3. Rename IntOffset.Origin to IntOffset.Zero to be consistent with Offset API
    4. Moved nativeCanvas method off of Canvas interface to support consumers to create their own Canvas instances
    5. Created stub EmptyCanvas class to refactor DrawScope to be a non-null parameter instead of lateinit and ensure non-nullability of the field
    6. Renamed ClipOp enums to be Pascal Case
    7. Renamed FilterQuality enums to be Pascal Case
    8. Renamed StrokeJoin enums to be Pascal Case
    9. Renamed PointMode enums to be Pascal Case
    10. Renamed PaintingStyle enums to be Pascal Case
    11. Renamed PathFillType enums to be Pascal Case
    12. Renamed StrokeCap enums to be Pascal Case
    13. Updated DrawCache implementation to no longer use lateinit params
    14. Updated DrawScope to no longer use lazy delegation for fillPaint and strokePaint internal parameters
    15. Updated Image composable to avoid Box usage for less overhead
    16. Updated Outline class to have @Immutable annotations
    17. Updated PathNode to have @Immutable annotations for each path instruction
    18. Updated Vector subcomposition to remove redundant conditional checks for equality as compose already handles them
    19. Deprecated Rect companion constructor methods in favor of function constructors
    20. Updated Brush classes and function constructors with @Immutable and @Stable APIs
    21. Updated VertexMode enum to be PascalCase
    22. Updated DrawScope selectPaint method to conditionally overwrite stroke parameters on the paint if they have changed
    23. Updated Size to add destructuring API, rename UnspecifiedSize to Unspecified and removed unused methods
  • Move dialog to ui ( I47fa6 )
  • Removed SemanticsNodeInteraction.performPartialGesture . Use SemanticsNodeInteraction.performGesture instead. ( Id9b62 )
  • Renamed SemanticsNodeInteraction.getBoundsInRoot() to SemanticsNodeInteraction.getUnclippedBoundsInRoot() ( Icafdf , b/161336532 )
  • The APIs for right-to-left support has been updated. LayoutDirectionAmbient has been added, which can be used to read and change the layout direction. Modifier.rtl and Modifier.ltr have been removed. ( I080b3 )
  • Modifier.deternimateProgress has been renamed to Modifier.progressSemantics ( I9c0b4 )
  • Updates material-icons-extended with the latest icons added to Material.io/icons ( I4b1d3 )
  • Require type T to be explicitly specified for transitionDefinition. ( I1aded )
  • Modifier.plus has been deprecated, use Modifier.then instead. 'Then' has a stronger signal of ordering, while also prohibits to type Modifier.padding().background() + anotherModifier , which breaks the chain and harder to read ( Iedd58 , b/161529964 )
  • Renamed AndroidComposeTestRule to createAndroidComposeRule. ( I70aaf )
  • Add isFocused() and isNotFocused() SemanticsMatcher. ( I0b760 )
  • Removed BaseGestureScope.globalBounds , which shouldn't be used from tests. Use coordinates local to the node with which you're interacting instead. ( Ie9b08 )
  • Fixed popup position on cut-out displays. ( Idd7dd )
  • Modifier.drawBackground has been renamed to Modifier.background ( I13677 )

Version 0.1.0-dev15

22 جولای 2020

androidx.compose.material:material:0.1.0-dev15 , androidx.compose.material:material-icons-core:0.1.0-dev15 , and androidx.compose.material:material-icons-extended:0.1.0-dev15 آزاد می شوند. Version 0.1.0-dev15 contains these commits.

Dependencies Update

  • To use the 0.1.0-dev15 version of Compose, you will need to update your dependencies according to the new code snippets shown above in Declaring dependencies .

تغییرات API

  • @Model annotation is now deprecated. Use state and mutableStateOf as alternatives. This deprecation decision was reached after much careful discussion.

    توجیه

    Rationale includes but is not limited to:

    • Reduces API surface area and concepts we need to teach
    • More closely aligns with other comparable toolkits (Swift UI, React, Flutter)
    • Reversible decision. We can always bring @Model back later.
    • Removes corner-case usage and difficult to answer questions about configuring @Model as things we need to handle
    • @Model data classes, equals, hashcode, etc.
    • How do I have some properties “observed” and others not?
    • How do I specify structural vs. referential equality to be used in observation?
    • Reduces “magic” in the system. Would reduce the likelihood of someone assuming system was smarter than it is (ie, it knowing how to diff a list)
    • Makes the granularity of observation more intuitive.
    • Improves refactorability from variable -> property on class
    • Potentially opens up possibilities to do hand-crafted State-specific optimizations
    • More closely aligns with the rest of the ecosystem and reduces ambiguity towards immutable or us “embracing mutable state”

    Migration Notes

    Almost all existing usages of @Model are fairly trivially transformed in one of two ways. The example below has a @Model class with two properties just for the sake of example, and has it being used in a composable.

    @Model class Position(
     var x: Int,
     var y: Int
    )
    
    @Composable fun Example() {
     var p = remember { Position(0, 0) }
     PositionChanger(
       position=p,
       onXChange={ p.x = it }
       onYChange={ p.y = it }
     )
    }
    

    Alternative 1: Use State<OriginalClass> and create copies.

    This approach is made easier with Kotlin's data classes. Essentially, make all previously var properties into val properties of a data class, and then use state instead of remember , and assign the state value to cloned copies of the original using the data class copy(...) convenience method.

    It's important to note that this approach only works when the only mutations to that class were done in the same scope that the State instance is created. If the class is internally mutating itself outside of the scope of usage, and you are relying on the observation of that, then the next approach is the one you will want to use.

    data class Position(
     val x: Int,
     val y: Int
    )
    
    @Composable fun Example() {
     var p by state { Position(0, 0) }
     PositionChanger(
       position=p,
       onXChange={ p = p.copy(x=it) }
       onYChange={ p = p.copy(y=it) }
     )
    }
    

    Alternative 2: Use mutableStateOf and property delegates

    This approach is made easier with Kotlin's property delegates and the mutableStateOf API which allows you to create MutableState instances outside of composition. Essentially, replace all var properties of the original class with var properties with mutableStateOf as their property delegate. This has the advantage that the usage of the class will not change at all, only the internal implementation of it. The behavior is not completely identical to the original example though, as each property is now observed/subscribed to individually, so the recompositions you see after this refactor could be more narrow (a good thing).

    class Position(x: Int, y: Int) {
     var x by mutableStateOf(x)
     var y by mutableStateOf(y)
    }
    
    // source of Example is identical to original
    @Composable fun Example() {
     var p = remember { Position(0, 0) }
     PositionChanger(
       position=p,
       onXChange={ p.x = it }
       onYChange={ p.y = it }
     )
    }
    

    ( I409e8 , b/152050010 , b/146362815 , b/146342522 , b/143413369 , b/135715219 , b/143263925 , b/139653744 )

  • onFocusChange callback in text fields renamed to onFocusChanged ( Ida4a1 )

  • Added thresholds param in stateDraggable to specify thresholds between anchors. This was used to set a 56dp threshold in bottom drawer. Also BottomDrawerLayout now uses a separate BottomDrawerState enum. ( I533fa )

  • Removes previously deprecated Modifier.ripple. Clickable now uses ripple as the default indication (if you have a MaterialTheme {} set in your application) so in most cases you can just use clickable and get ripple indication for free. If you need to customize the color / size / bounded parameter for the ripple, you can manually create a RippleIndication and pass it to clickable as the indication parameter. ( I663b2 , b/155375067 )

  • Removed deprecated override of FilledTextField composable ( I7f8f8 )

  • Rename Button object (containing the defaults used by Button function) to ButtonConstants ( I7c5f7 , b/159687878 )

  • Button's content slot now behaves as Row (useful when you need to have an icon with a text, see samples on Button how to write it) ( I0ff10 , b/158677863 )

  • RadioGroup and RadioGroupItem have been deprecated. Use Box with Modifier.selectable, Row and Column to make proper set of radioButton choices by your design ( I7f5cf , b/149528535 )

  • Added Material Outlined Textfield ( I1a518 )

  • androidx.ui.foundation.TextFieldValue and androidx.ui.input.EditorValue is deprecated. TextField, FilledTextField and CoreTextField composables that uses that type is also deprecated. Please use androidx.ui.input.TextFieldValue instead ( I4066d , b/155211005 )

  • TabRow.TabPosition not contains position in Dp, not in IntPx ( I34a07 , b/158577776 )

  • Replaced usage of IntPx with Int. Replaced IntPxPosition with IntOffset. Replaced IntPxSize with IntSize. ( Ib7b44 )

  • In order to consolidate the number of classes used to represent sizing information, standardize on usage of the Size class instead of PxSize. This provides the benefits of an inline class to leverage a long to pack 2 float values to represent width and height represented as floats. ( Ic0191 )

  • Deprecates Modifier.ripple. Clickable now uses ripple as the default indication (if you have a MaterialTheme {} set in your application) so in most cases you can just use clickable and get ripple indication for free. If you need to customize the color / size / bounded parameter for the ripple, you can manually create a RippleIndication and pass it to clickable as the indication parameter. ( I101cd , b/155375067 )

  • Scaffold API has been reworked: few parameters changed their name, added new parameters for better customization. Added getter to query sizes of Fab, TopBar and BottomBar ( I0e7ce )

  • Added the DropdownMenu component in ui-material, a Material Design menu implementation. ( I9bb3d )

  • Allow to show/hide software keyboard manually using SoftwareKeyboardController ( Ifb9d6 , b/155427736 )

  • Modifier.indication has been added to foundation package. Use it to show press/drag/other indication on your custom interactable elements ( I8425f , b/155287131 )

  • Consolidated CanvasScope implementations so there is now just DrawScope and ContentDrawScope Renamed CanvasScope to DrawScope. Updated DrawScope to implement Density interface and provide LayoutDirection Deleted DrawScope subclass in ContentDrawScope Painter and PainterModifier have been updated to no longer maintain an RTL property themselves as DrawScope provides this already without manually providing it ( I1798e )

  • Renames Emphasis.emphasize() to Emphasis.applyEmphasis() ( Iceebe )

  • Disabled buttons now visually follows the Material Design specification ( I47dcb , b/155076924 )

  • FilledTextField gets ime action, visual transformation and keyboard type support ( I1f9cf , b/155075201 )

  • Adds strokeWidth parameter to CircularProgressIndicator to customize the stroke size. To change the stroke size (height) of a LinearProgressIndicator, you can use Modifier.preferredHeight() or another size modifier. ( Icea16 , b/154919081 )

  • Adds strokeWidth parameter to CircularProgressIndicator to customize the stroke size. To change the stroke size (height) of a LinearProgressIndicator, you can use Modifier.preferredHeight() or another size modifier. ( Icea16 , b/154919081 )

  • Added slot API for trailing and leading icons in the FilledTextField and handling of the error state ( Ic12e0 )

  • FAB's and Extended FAB's default color has been changed to MaterialTheme.colors.secondary. ( I3b9b9 , b/154118816 )

  • Replaced all nullable Color uses in API with non-nullable and use Color.Unset instead of null ( Iabaa7 )

  • Renamed EdgeInsets to InnerPadding. Renamed innerPadding parameter of Material Buttons to paddding. ( I66165 )

  • Slider is now stateless. Users will need to pass and update state by themselves, just like in any other control. ( Ia00aa )

  • StaticDrawer was removed. If you need it, use Box with material-spec'ed width instead ( I244a7 )

  • Added Material Design implementation of Filled Text Field ( Ic75cd )

  • Added modifier param to ListItem and reordered params to promote trailing lambda body ( I66e21 )

  • Adds defaultFontFamily constructor parameter to Typography, allowing specifying the default font family that will be used for any provided TextStyles that do not have a family set. ( I89d07 )

  • Temporarily removed Material Data Tables from the API surface. ( Iaea61 )

  • Renamed paramaters in Divider composable ( Ic4373 )

  • children ( Ia6d19 )

  • Removes MaterialTheme.emphasisLevels, instead use EmphasisAmbient.current to retrieve the emphasis levels ( Ib5e40 )

  • Shape theming system is updated according to the Material design specification. Now you can provide small, medium and large shapes to be used by most of the components ( Ifb4d1 )

  • Changed MaterialTheme APIs such as MaterialTheme.colors(), MaterialTheme.typography() to be properties instead of functions. Remove parentheses from existing calls, no behavioral change is expected. ( I3565a )

  • Refactored FloatingActionButton APIs to accept composable lambdas instead of primitives. See updated samples for usage information. ( I00622 )

  • add enabled param to Checkbox, Switch and Toggleable ( I41c16 )

  • Ripple is now a Modifier. While Clickable is not yet converted the recommended usage is Clickable(onClick = { ... }, modifier = ripple()) ( Ie5200 , b/151331852 , b/150060763 )

  • Surface and Card were moved from androidx.ui.material.surface to androidx.ui.material ( I88a6d , b/150863888 )

  • Button, FloatingActionButton and Clickable now have a separate enabled param. Some of the params on Button were renamed or reordered. ( I54b5a )

  • Renamed Image to ImageAsset to better differentiate the difference between the Image data and the upcoming Image composable used to participate in layout and draw content. _Body:Created extension method on android.graphics.Bitmap, Bitmap.asImageAsset(), to create an instance of an ImageAsset useful for combining traditional Android application development with the compose framework ( Id5bbd )

  • Removed Snackbar API with String parameters in favour of using the overload that accepts composable lambdas. See updated samples for usage information ( I55f80 )

  • Refactored Tab APIs to accept text and icon lambdas, ( Ia057e )

  • Added BottomNavigation component, see the docs and samples for usage information ( I731a0 )

  • Added Icon, IconButton and IconToggleButton, removing AppBarIcon. You can directly replace existing usages of AppBarIcon with IconButton, and they will now have the correct touch target. See the samples for usage information, and see Icons for the provided Material Icons you can use directly with these components. ( I96849 )

  • Replaced ButtonStyle with distinct functions and removed text (string) overload. See updated samples for usage information. ( If63ab , b/146478620 , b/146482131 )

  • rename Border modifier to DrawBorder ( I8ffcc )

  • LayoutCoordinates no longer has a position property. The position property does not make sense when considering LayoutModifiers, rotation, or scaling. Instead, developers should use parentCoordinates and childToLocal() to calculate the transform from one LayoutCoordinate to another.

    LayoutCoordinates uses IntPxSize for the size property instead of PxSize. Layouts use integer pixel sizes for layouts, so all layout sizes should use integers and not floating point values. ( I9367b )

  • Breaking changes to the ambients API. See log and Ambient<T> documentation for details ( I4c7ee , b/143769776 )

  • Scaffold material component has been added. Scaffold implements ( I7731b )

  • Replaced DrawBorder in favor of Border Modifier ( Id335a )

رفع اشکال

  • FocusModifier is deprecated in favor of Modifier.focus, Modifier.focusRequester, Modifier.focusObserver. FocusState and FocusDetailedState are deprecated in favor of FocusState2 ( I46919 , b/160822875 , b/160922136 )
  • VerticalScroller and HoriziontalScroller have been deprecated. Use ScrollableColumn and ScrollableRow for build-in experience with Column/Row behaviour and parameters, or Modifier.verticalScroll and Modifier.horizontalScroll on your own element. Similarly, ScrollerPosition has been deprecated in favor of ScrollState' ( I400ce , b/157225838 , b/149460415 , b/154105299 )
  • Modifier.draggable and Modifier.scrollable APIs were reworked. DragDirection was removed in favor of Orientation. State required for scrollable has beed simplified. ScrollableState has been renamed to ScrollableController ( Iab63c , b/149460415 )
  • runOnIdleCompose renamed to runOnIdle ( I83607 )
  • Single-value semantics properties now use a calling style. For example, 'semantics { hidden = true }' is now written as: 'semantics { hidden() }'. ( Ic1afd , b/145951226 , b/145955412 )
  • Several testing APIs were renamed to be more intuitive. All findXYZ APIs were renamed to onNodeXYZ. All doXYZ APIs were renamed to performXYZ. ( I7f164 )
  • Transition API has been changed to return a TransitionState instead of passing the TransitionState to children. This makes the API more consistent with animate() APIs. ( I24e38 )
  • An IntBounds unit class has been added, representing integer pixel bounds from layout. The API of PopupPositionProvider has been updated to use it. ( I0d8d0 , b/159596546 )
  • A new optional flag useUnmergedTree was added to test finders. ( I2ce48 )
  • Removed obsolete size testing APIs. ( Iba0a0 )
  • Removed Shader inline class that wrapped the NativeShader expect class Renamed NativeShader to Shader. The wrapped Shader inline class did not add anything valuable to the API surface and was an inline class, so use the NativeShader class directly. ( I25e4d )
  • Popups, Dialogs and Menus are now inheriting the contextual MaterialTheme ( Ia3665 , b/156527485 )
  • Material DropdownMenu are now scrollable. ( Ide699 )
  • Removed layout direction parameter from the measure block of the Layout() function. Layout direction is however available inside the callback through the measure scope object ( Ic7d9d )
  • Use AnimationSpec instead of AnimationBuilder in the top level APIs to clarify the concept of static animation specification -Improve the transition DSL by removing the lambda requirement for creating AnimationSpecs such as tween, spring. They instead take constructor params directly. -Improve the overall ease of use of AnimationSpec opening up constructors instead of relying on builders -Change the duration and delay for KeyFrames and Tween to Int. This eliminates unnecessary type casts and method overloading (for supporting both Long and Int). ( Ica0b4 )
  • Switch now appears in a disabled state when enabled is set to false ( If4624 , b/155941869 , b/159331694 )
  • Modifier.tag was renamed to Modifier.layoutId, to avoid confusion with Modifier.testTag. ( I995f0 )
  • Alignment line Int positions returned from Placeable#get(AlignmentLine) are now non-null. If the queried alignment line is missing, AlignmentLine.Unspecified will be returned. ( I896c5 , b/158134875 )
  • Refactored Radius class to be an inline class. Removed companion creation methods in favor of function constructor with default parameter to have the radius along the y-axis match that of the mandatory x-axis radius parameter.

    Updated DrawScope.drawRoundRect to consume a single Radius parameter instead of 2 separate float values for the radius along the x and y axis ( I46d1b )

  • In order to consolidate the number of classes used to represent positioning information, standardize on usage of the Offset class instead of PxPosition. This provides the benefits of an inline class to leverage a long to pack 2 float values to represent x and y offsets represented as floats. ( I3ad98 )

  • Replaced usage of Px class in various compose classes as part of the large refactoring effort to only rely on Dp and primitive types for pixel parameters. Deleted Px class in its entirety ( I3ff33 )

  • Toggleable component has been deprecated. Use Modifier.toggleable instead ( I35220 , b/157642842 )

  • Replaced usage of Px class in various compose classes as part of the large refactoring effort to only rely on Dp and primitive types for pixel parameters ( I086f4 )

  • Replaced usage of Px class in various compose classes as part of the large refactoring effort to only rely on Dp and primitive types for pixel parameters ( Id3434 )

  • Replaced usage of Px class in various compose classes as part of the large refactoring effort to only rely on Dp and primitive types for pixel parameters ( I97a5a )

  • Fixed onClick not being invoked for DropdonMenuItems. ( I3998b , b/157673259 )

  • MutuallyExclusiveSetItem has been deprecated. Use Modifier.selectable instead. ( I02b47 , b/157642842 )

  • TestTag is now deprecated. Use Modifier.testTag instead. ( If5110 , b/157173105 )

  • TextField's cursor has a blinking animation ( Id10a7 )

  • Replaced usage of Px class in various compose classes as part of the large refactoring effort to only rely on Dp and primitive types for pixel parameters ( I19d02 )

  • VerticalScroller now provides Column out of the box. HorizontalScroller now provides Row out of the box. ( Ieca5d , b/157020670 )

  • Replaced usage of Px class in various compose classes as part of the large refactoring effort to only rely on Dp and primitive types for pixel parameters ( Iede0b )

  • Modifier.semantics has been undeprecated to allow usages for high level components. ( I4cfdc )

  • DrawLayer modifiers api has been changed: outlineShape renamed to shape and has the RectangleShape default value and now non-nullable; clipToOutline renamed to clip; clipToBounds removed as it is the same as clip == true with RectangleShape ( I7ef11 , b/155075735 )

  • Updated higher level compose APIs that expose a Canvas to expose CanvasScope instead. This removes the need for consumers to maintain their own Paint objects. For consumers that still require access to a Canvas they can use the drawCanvas extension method which provides a callback to issue drawing commands with the underlying Canvas. ( I80afd )

  • AlignmentLineOffset composable is deprecated, please use relativePaddingFrom() modifier instead. CenterAlignmentLine composable is removed. ( I60107 )

  • WithConstraints trailing lambda API has been changed. Now instead of two params it has a receiver scope which in addition to constraints and layoutDirection provides minWidth, maxWidth, minHeight and maxHeight properties in Dp ( I91b9a , b/149979702 )

  • Added defaultMinSizeConstraints layout modifier, which sets size constraints to the wrapped layout only when the incoming corresponding constraints are unspecified (0 for min constraints and infinity for max constraints). ( I311ea , b/150460257 )

  • FocusManagerAmbient is removed. Use FocusModifier.requestFocus to obtain focus. ( Ic4826 )

  • Created CanvasScope API that wraps a Canvas object to expose a stateless, declarative drawing API surface. Transformations are contained within their own receiver scope and sizing information is also scoped to corresponding inset bounds. It does not require a consumer to maintain its own Paint state object for configuring drawing operations.

    Added CanvasScopeSample as well as updated the demo app to include a declarative graphics demo ( Ifd86d )

  • Add cursor color customisation to the TextField ( I6e33f )

  • TextFieldValue used with TextField can now be survive activity recreation when used like this: var text by savedInstanceState(saver = TextFieldValue.Saver) { TextFieldValue() } ( I5c3ce , b/155075724 )

  • Renamed LayoutModifier2 to LayoutModifier. ( Id29f3 )

  • Removed deprecated LayoutModifier interface. ( I2a9d6 )

  • Replaced CoreTextField/TextField focusIdentifier parameter with FocusNode in order to integrate with focus subsystem. ( I7ea48 )

  • Intrinsic measurements functions in Layout and LayoutModifier2 have an IntrinsicMeasureScope receiver now which provides intrinsics query API with implicitly propagated layout direction. ( Id9945 )

  • New Modifier.zIndex() is added to control the drawing order of the children within the same parent layout. elevation property on DrawLayerModifier is renamed to shadowElevation and doesn't control the drawing order anymore. The params order fo DrawShadow is changed: elevation is now the first one and the shape is the second one with a RectangleShape default. ( I20150 , b/152417501 )

  • RectangleShape moved from androidx.ui.foundation.shape.* to androidx.ui.graphics.* ( Ia74d5 , b/154507984 )

  • TextField API update - merged onFocus and onBlur callbacks into a single onFocusChange(Boolean) callback with parameter ( I66cd3 )

  • Added verticalGravity and horizontalGravity parameters to Row and Column, respectively. ( I7dc5a )

  • Updated wrapContentWidth and wrapContentHeight to expect vertical or horizontal Alignment rather than any Alignment. The gravity modifier was updated to accept vertical or horizontal Alignment. Row, Column and Stack were updated to support custom continuous Alignments. ( Ib0728 )

  • Created PixelMap API to support querying pixel information from an ImageAsset. ( I69ad6 )

  • Removes ProvideContentColor, instead just use ContentColorAmbient directly with Providers ( Iee942 )

  • ui-text-compose module is renamed as ui-text. ui-text now contains CoreText and CoreTextField composables ( Ib7d47 )

  • ui-text module is renamed as ui-text-core ( I57dec )

  • Moved ui-framework/CoreText, CoreTextField composables under ui-text-compose. You might want to include ui-text-compose in your project. ( I32042 )

  • Improve DrawModifier API:

    • Made the receiver scope for draw() ContentDrawScope
    • Removed all parameters on draw()
    • DrawScope has same interface as former CanvasScope
    • ContentDrawScope has drawContent() method ( Ibaced , b/152919067 )
  • runOnIdleCompose and runOnUiThread are now global functions instead of methods on ComposeTestRule. ( Icbe8f )

  • [Mutable]State property delegate operators moved to extensions to support Kotlin 1.4 property delegate optimizations. Callers must add imports to continue using by state { ... } or by mutableStateOf(...) . ( I5312c )

  • Added positionInParent and boundsInParent for LayoutCoordinates. ( Icacdd , b/152735784 )

  • ColoredRect has been deprecated. Use Box(Modifier.preferredSize(width, height).drawBackground(color)) instead. ( I499fa , b/152753731 )

  • Renamed LayoutResult to MeasureResult. ( Id8c68 )

  • Added LayoutModifier2, a new API for defining layout modifiers; deprecated LayoutModifier ( If32ac )

  • Replaced Modifier plus operator with factory extension functions ( I225e4 )

  • Draggable has been moved to modifier ( Id9b16 , b/151959544 )

  • ParentData composable is deprecated. You should either create a modifier which implements ParentDataModifier interface, or use LayoutTag modifier if you simply need to tag layout children to recognize them inside the measure block. ( I51368 , b/150953183 )

  • Deprecated Center composable. It should be replaced either with the LayoutSize.Fill + LayoutAlign.Center modifier, or with one of the Box or Stack composables with suitable modifiers applied ( Idf5e0 )

  • Added VectorPainter API to replace existing subcomposition API for vector graphics. Result of subcomposition is a VectorPainter object instead of a DrawModifier. Deprecated previous DrawVector composables in favor of VectorPainter.

    Renamed Image(Painter) API to PaintBox(Painter) Created Vector composable that behaves like the Image composable except with a VectorAsset instead of an ImageAsset ( I9af9a , b/149030271 )

  • Renamed LayoutFlexible to LayoutWeight. Renamed tight parameter to fill. ( If4738 )

  • Removed RepaintBoundary in favor of DrawLayerModifier ( I00aa4 )

  • DrawVector has been changed from a regular composable function to returning a Modifier drawVector() that will draw the vector as a background to a layout. ( I7b8e0 )

  • The Opacity composable function has been replaced with the drawOpacity modifier. ( I5fb62 )

  • Replace composable function Clip with modifier drawClip(). DrawClipToBounds is a convenient modifier to use when you only need to clip to the layer bounds with a rectangle shape. ( If28eb )

  • Replaced DrawShadow composable function with drawShadow() modifier. Shadows are now drawn as part of LayerModifier. ( I0317a )

  • Added LayerModifier, a modifier that allows adding a RenderNode for a Layout. It allows setting clipping, opacity, rotation, scaling, and shadows. This will replace RepaintBoundary. ( I7100d , b/150774014 )

  • androidx.compose.ViewComposer has been moved to androidx.ui.node.UiComposer androidx.compose.Emittable has been removed. It was redundant with ComponentNode. androidx.compose.ViewAdapters has been removed. They are no longer a supported use case. Compose.composeInto has been deprecated. Use setContent or setViewContent instead. Compose.disposeComposition has been deprecated. Use the dispose method on the Composition returned by setContent instead. androidx.compose.Compose.subcomposeInto has moved to androidx.ui.core.subcomposeInto ComponentNode#emitInsertAt has been renamed to ComponentNode#insertAt ComponentNode#emitRemoveAt has been renamed to ComponentNode#removeAt ComponentNode#emitMode has been renamed to ComponentNode#move ( Idef00 )

  • Created Image composable to handle sizing/layout in addition to drawing a given ImageAsset to the screen. This composable also supports drawing any arbitrary Painter instance respecting its intrinsic size as well as supporting a given fixed size or minimum size ( Ibcc8f )

  • Deprecated Wrap composable. It can be replaced either with the LayoutAlign modifier or with the Stack composable ( Ib237f )

  • WithConstraints got LayoutDirection parameter ( I6d6f7 )

  • Made the layout direction be propagated from parent layout node to children. Added layout direction modifier. ( I3d955 )

  • Stack component supports right-to-left directionality ( Ic9e00 )

  • DrawShape composable was removed. Use DrawBackground modifier instead. ( I7ceb2 )

  • Support right-to-left direction in LayoutPadding modifier ( I9e8da )

  • Added AdapterList, a scrolling list component that only composes and lays out the visible items. Currently known issues include that it is vertical-only and does not fully handle all cases of changes to its children. ( Ib351b )

  • Updated the ComposeFlags.COMPOSER_PARAM flag to be true , which will change the code generation strategy for the compose plugin. At a high level, this causes @Composable functions to be generated with an additional synthetic parameter, which is passed through to subsequent @Composable calls in order for the runtime to properly manage execution. This is a significant binary breaking change, however, should preserve source-level compatibility in all sanctioned usage of compose. ( I7971c )

  • Added Canvas component. This composable takes up some size (provided by user) and allows you to draw using CanvasScope ( I0d622 )

  • Density and DensityScope were merged into one interface. Instead of ambientDensity() you can now use DensityAmbient.current. Instead of withDensity(density) just with(density) ( I11cb1 )

  • Changed LayoutCoordinates to make providedAlignmentLines a Set instead of a Map and have LayoutCoordinates implement the get() operator instead for retrieving a value. This makes it easier for modifiers to modify one or more value of the set without creating a new collection for each modifier. ( I0245a )

  • Scrollers now exhibit native Android fling motion behavior. ( I922af , b/147493715 )

  • Improvements to the API surface of Constraints ( I0fd15 )