پوشیدن آهنگسازی
| آخرین به روز رسانی | انتشار پایدار | کاندید را آزاد کنید | نسخه بتا | انتشار آلفا |
|---|---|---|---|---|
| 13 آگوست 2025 | 1.4.1 | 1.5.0-rc02 | - | - |
اعلام وابستگی ها
برای افزودن وابستگی به Wear، باید مخزن Google Maven را به پروژه خود اضافه کنید. برای اطلاعات بیشتر، مخزن Maven Google را بخوانید.
وابستگیهای مصنوعات مورد نیاز خود را در فایل build.gradle برای برنامه یا ماژول خود اضافه کنید:
شیار
dependencies { implementation "androidx.wear.compose:compose-foundation:1.4.1" // For Wear Material Design UX guidelines and specifications implementation "androidx.wear.compose:compose-material:1.4.1" // For integration between Wear Compose and Androidx Navigation libraries implementation "androidx.wear.compose:compose-navigation:1.4.1" // For Wear preview annotations implementation("androidx.wear.compose:compose-ui-tooling:1.4.1") // NOTE: DO NOT INCLUDE a dependency on androidx.compose.material:material. // androidx.wear.compose:compose-material is designed as a replacement // not an addition to androidx.compose.material:material. // If there are features from that you feel are missing from // androidx.wear.compose:compose-material please raise a bug to let us know. }
کاتلین
dependencies { implementation("androidx.wear.compose:compose-foundation:1.4.1") // For Wear Material Design UX guidelines and specifications implementation("androidx.wear.compose:compose-material:1.4.1") // For integration between Wear Compose and Androidx Navigation libraries implementation("androidx.wear.compose:compose-navigation:1.4.1") // For Wear preview annotations implementation("androidx.wear.compose:compose-ui-tooling:1.4.1") // NOTE: DO NOT INCLUDE a dependency on androidx.compose.material:material. // androidx.wear.compose:compose-material is designed as a replacement // not an addition to androidx.compose.material:material. // If there are features from that you feel are missing from // androidx.wear.compose:compose-material please raise a bug to let us know. }
برای اطلاعات بیشتر درباره وابستگیها، به افزودن وابستگیهای ساخت نگاه کنید.
بازخورد
بازخورد شما به بهتر شدن Jetpack کمک می کند. اگر مسائل جدیدی کشف کردید یا ایده هایی برای بهبود این کتابخانه دارید، به ما اطلاع دهید. لطفاً قبل از ایجاد کتابخانه جدید، به مسائل موجود در این کتابخانه نگاهی بیندازید. با کلیک کردن روی دکمه ستاره می توانید رای خود را به یک موضوع موجود اضافه کنید.
برای اطلاعات بیشتر به مستندات ردیاب مشکل مراجعه کنید.
Wear Compose نسخه 1.5
نسخه 1.5.0-rc02
13 آگوست 2025
androidx.wear.compose:compose-*:1.5.0-rc02 منتشر شد. نسخه 1.5.0-rc02 حاوی این commit ها است.
رفع اشکال
- یک اشکال در
TimePickerکه در آن رشتههای طولانی و بینالمللی برای دوره (AM/PM) میتوانند طرحبندی را بشکنند، رفع شد. ( I0fa81 )
نسخه 1.5.0-rc01
30 جولای 2025
androidx.wear.compose:compose-*:1.5.0-rc01 منتشر شد. نسخه 1.5.0-rc01 حاوی این commit ها است.
رفع اشکال
-
TimePickerاکنون به طور کامل توسط محلی کاربر هدایت می شود و ازDateFormat.getBestDateTimePatternبرای تعیین ترتیب و محتوای انتخاب کننده ها و جداکننده های آن استفاده می کند. این ترتیب نادرست ستونها را برای زبانهای CJK برطرف میکند، مشکلات طرحبندی RTL را در زبانهایی مانند عربی حل میکند، از جداکنندههای محلیسازی شده استفاده میکند، و از هر دو فرمت 0-11 و 1-12 ساعت بر اساس محلی پشتیبانی میکند ( I5d543 ) -
DatePickerاکنون یک ماه عددی را در برخی از مناطق، مانند CJK، نمایش میدهد تا از اختلاط قالبهای عددی و زبانی جلوگیری کند (به عنوان مثال، 2025 | 07 | 02 به جای 2025 | 7月 | 02). این تغییر یک اکتشافی را اعمال میکند که بررسی میکند آیا منطقه از پسوندهای زبانی برای سال استفاده میکند یا خیر، و اگر چنین است، قالب ماه را از متنی (MMM) به عددی (MM) برای سازگاری تغییر میدهد. ( Ia93fe ) - فضای عمودی برای عنوان در مؤلفه Picker اکنون ثابت است و از تغییر قابل مشاهده در هنگام انتخاب یک ستون انتخابگر، به ویژه در حالت
Talkbackجلوگیری می کند. ( I7f8b7 ) - رفع اشکال دسترسی ناشی از ترسیم تمام صفحه
HorizontalPageIndicatorوVerticalPageIndicator. نشانگرهای صفحه دیگر تمام صفحه نیستند و در صورت استفاده باHorizontalPagerScaffoldیاVerticalPagerScaffoldبه صورت خودکار قرار می گیرند. هنگامی که از داربست پیجر استفاده نمی کنید، تراز را به صراحت با استفاده ازmodifier = Modifier.align(Alignment.BottomCenter)باHorizontalPageIndicatorوmodifier =Modifier.align(Alignment.CenterEnd)باVerticalPageIndicatorمشخص کنید. ( I3a0ad ) - جهت کش رفتن در
SwipeToRevealاکنون برای LTR و RTLLayoutDirectionsسازگار است. ( I6d427 ) - مرکز عمودی
SwipeToRevealبرای اقدامات بازیابی کرد. اگرhasPartiallyRevealedState = true،RevealStateباید بهRevealValue.Coveredبازنشانی شود. هنگامی که پیمایش رخ می دهد توسط تماس گیرنده پوشش داده می شود. ( I6473d ) -
SwipeDismissableNavHostاکنون محتوا را برای API 36 به بعد به درستی کلیپ می کند. ( Ib9a44 )
نسخه 1.5.0-beta06
16 جولای 2025
androidx.wear.compose:compose-*:1.5.0-beta06 منتشر شد. نسخه 1.5.0-beta06 حاوی این تعهدات است.
رفع اشکال
- هنگامی که
LazyColumnیاScalingLazyColumnدارایreverseLayout = trueهستند، انیمیشنEdgeButtonبرطرف کنید. ( I46a1a ) - رفع اشکالی در
ScreenScaffoldکه در آن در صورت ارائهScrollIndicator/PageIndicatorلمس برای کاوش در Talkback کار نمی کرد. ( I6dcee ) -
TransformingLazyColumnاکنون با خواندن مقدارitemHeightارائه شده توسطTransformationSpecدر پسزمینه، امکان شکلگیری سفارشی ازTransformationSpecرا میدهد. ( I6a599 ) - انتقال رنگ فعال/غیرفعال متحرک برای
IconButton، برای سازگاری باIconToggleButton. ( Ife10a ) - برای جلوگیری از پرش محسوس به حداقل اندازه نقطه در هنگام متحرک سازی، حداقل گیره بخش را در
CircularProgressIndicatorحذف کرد. به عنوان بخشی از این تغییر، پارامترtargetProgressدرdrawCircularProgressIndicatorاکنون استفاده نشده است. ( I33309 ) - Picker اکنون نقش معنایی
ValuePickerرا دارد که میتواند توسط صفحهخوانها برای دسترسی بیشتر انتخابکنندهها استفاده شود. Picker همچنین دارای برچسبهای کلیک دسترسی به روز شده است که بین تنظیم مقدار در حالت فقط خواندنی و انتخاب مقدار فعلی در غیر این صورت تفاوت قائل میشود. ( I33309 )
نسخه 1.5.0-beta05
2 ژوئیه 2025
androidx.wear.compose:compose-*:1.5.0-beta05 منتشر شد. نسخه 1.5.0-beta05 حاوی این تعهدات است.
رفع اشکال
- برای روشن شدن استفاده از
Modifier.edgeSwipeToDismiss( I78cb5 ) اسناد را به روز کرد. - اشکال رفع شد که در آن چندین مورد فاش شده میتوانست با
SwipeToRevealدر لیستهای تنبل نشان داده شود ( I1d4f6 ) - اشکال کانتینر در
TransformingLazyColumnاکنون به منظور جلوگیری از برش محتویات، مقیاس بندی شده اند. ( I9221a ) - برچسب
TimePickerوDatePickerبرای ساعت/دقیقه/ثانیه یا سال/ماه/روز اکنون دارای معانی سرفصل برای صفحهخوانها است ( I77d8b ) - مکث بین حلقهها در
CircularProgressIndicatorنامشخص ( Iaf0bb ) حذف شد - رفع اشکال انیمیشن در
TransformingLazyColumnهنگام حذف موارد. ( I73034 ) - هنگام حذف موارد، مدیریت موارد لنگر در
TransformingLazyColumnاصلاح شد. ( I841a8 ) -
PickerGroupاکنون هنگامی که مرکز خودکار روشن است و انتخابگر انتخاب شده (مرکز) تغییر می کند، Pickers را به صورت افقی متحرک می کند. ( IC82c4 )
نسخه 1.5.0-beta04
18 ژوئن 2025
androidx.wear.compose:compose-*:1.5.0-beta04 منتشر شد. نسخه 1.5.0-beta04 حاوی این تعهدات است.
رفع اشکال
- رفع اشکال طرحبندی در
TransformingLazyColumn، جایی که محتوایی که درون صفحه قرار میگیرد اکنون به درستی از بالای صفحه تراز شده است ( I80115 ) - مشکلی در
TransformingLazyColumnکه در آن آیتم پایینی هنگام پیمایش به انتهای لیست باEdgeButtonبه اشتباه مقیاس بندی شده بود، برطرف شد. اکنون هنگام بازیابی طرحبندی، پیشرفت پیمایش از شیب نزولی پیروی میکند. ( Iea375 ) -
TransformingLazyColumnاکنون ارتفاع آیتم را در پسزمینه نقاش میخواند، که بهTransformationSpecsسفارشی اجازه میدهد تا شکلبندی را پیادهسازی کند. ( I022f0 ) - اکنون
SwipeToRevealبه صورت عمودی اقدامات آشکار شده را به درستی در مرکز قرار می دهد. ( I4419b ) - اشکالی در
SwipeToRevealرفع شد که مانع از کارکرد صحیح آن با کشیدن انگشت برای رد کردن در صورت استفاده از نمایش و نوشتن بر روی صفحه نمایش میشد. ( I5dc0e ) - رفع اشکالی که در آن اقدامات
SwipeToRevealبا افست عمودی هنگام پیمایش ترسیم میشدند. ( I29444 ) -
AlertDialog،ConfirmationDialog،OpenOnPhoneDialogوSwipeToRevealاکنون بالشتکها و اندازههایی را جمع میکنند که به صورت درصدی از اندازه صفحه محاسبه میشوند. ( I76367 ) -
ButtonDefaults.outlinedButtonBorderاکنون پس از تغییر اندازه حالت فعال/غیرفعال به روز می شود ( If2ddd ) - رفع اشکال در ارتفاع
EdgeButtonکه در صفحههای پیچیده با پیجر وScreenScaffoldرخ میداد. ( I946e3 ) - یک وضعیت مسابقه که میتواند باعث توقف انیمیشنهای Placeholder شود، رفع شد. ( I53530 )
- بهبود عملکرد
HorizontalPageIndicatorوVerticalPageIndicatorبا کشیدن روی بوم. ( Ifae1e ) - شکل EdgeButton را برای صاف کردن انتقال بین بیضی و دایرههایی که طرح کلی را تشکیل میدهند، اصلاح کرد. ( I7721e )
- یک اشکال در
LevelIndicatorکه باعث توقف انیمیشنها به دلیل ترکیببندیهای غیرضروری میشد، برطرف شد. ( I45d08 )
نسخه 1.5.0-beta03
4 ژوئن 2025
androidx.wear.compose:compose-*:1.5.0-beta03 منتشر شد. نسخه 1.5.0-beta03 حاوی این تعهدات است.
تغییرات API
-
OpenOnPhoneDialogاکنون فقط متن پیام را در زیر TalkBack اعلام میکند و معنای نمادها را نادیده میگیرد.OpenOnPhoneDialogDefaultsبرای حذفiconContentDescriptionو پارامترcontentDescriptionازicon()به روز شده است. همچنینConfirmationDialogDefaultsاکنون دارای پارامترهای اصلاح کننده درSuccessIconوFailureIconcomposable است. ( ID2ae2 )
رفع اشکال
- ترتیب اعمال تأثیر پارامترهای
SurfaceTransformationرا تغییر داد. پیش از این، تبدیلهای اعمال شده به اجزای Wear Material3 به شرح زیر انجام میشد: نقاش پسزمینه، تبدیل ظرف، تبدیل محتوا. اکنون 2 مورد اول معکوس شدهاند و هر اصلاحکنندهای را بین آنها اعمال میکنیم، بنابراین تحت تأثیر تبدیلهای ظرف قرار میگیرد. این موارد مواردی مانند استفاده از جلوه درخشش نگهدارنده مکان با عناصر موجود در TLC با استفاده از پارامتر تبدیل را برطرف می کند. ( I786cf ) -
RevealState.Saverاضافه شد تا برای بازیابی وضعیتSwipeToRevealهنگام ایجاد فعالیت یا فرآیند دوباره استفاده شود. تابعrememberRevealStateاکنون از این Saver به طور پیش فرض استفاده می کند. ( Ie0ecb ) - دکمههای اقدامات اولیه و ثانویه
SwipeToRevealباید بهطور پیشفرض رویButtonDefault.Heightباشند (اشکال رفع شده در جایی که این دکمهها حداکثر ارتفاع را برای دکمههای بلندتر پر میکردند). ( Ibfba1 ) -
SwipeToRevealبرای بازنشانی آخرین مؤلفه ای که با آن تعامل داشتید، زمانی که حرکت حرکت تند کشیدن به سمت راست انجام شد، تغییر داد. ( Ia8450 ) -
SwipeToRevealبه حالتRevealingتغییر کرد که موقعیت انتهایی کشیدن انگشت بین لنگرهای آشکار و آشکار و نزدیکتر به لنگر آشکار شود. ( If4458 ) - اکنون محتوای
ButtonGroupبه درستی در یک طرح RTL معکوس شده است ( Ib378d ) -
AnimatedTextاکنون جهت متن RTL را پشتیبانی می کند ( I4533c ) -
TransformingLazyColumnاکنون هنگامی که مورد پایینی حذف می شود، اندازه موارد را به درستی تغییر می دهد ( Idacab ) -
TransformingLazyColumnاکنون فقط یک پاس اندازه گیری می کند که با کاهش زمان فریم عملکرد را بهبود می بخشد. ( I501a1 )
نسخه 1.5.0-beta02
20 مه 2025
androidx.wear.compose:compose-*:1.5.0-beta02 منتشر شد. نسخه 1.5.0-beta02 حاوی این تعهدات است.
رفع اشکال
- نمایه های پایه به روز شده برای کتابخانه های بنیاد، مواد و مواد3. ( I53f06 )
- یک اشکال در
TransformingLazyColumnرفع شد، که در آن اندازه موارد با حذف آیتم پایینی تغییر کرد. ( ایداکاب ) - هنگامی که لیست در بالا یا پایین لیست گیر کرده بود، یک اشکال با
TransformingLazyColumnبرطرف شد. ( I49d00 ) -
OpenOnPhoneDialogدر زیر TalkBack باید متن منحنی را به جای توضیح محتوای نماد اعلام کند. ( I4efe8 ) - اشکالی در
SwipeToRevealبرطرف شد که درRevealState.currentValue، لنگر اشتباه را گزارش میکرد، وقتیhasPartiallyRevealedStateروی false تنظیم شود. ( I9c7cf ) - دکمههای لغو
SwipeToRevealاکنون به صورت پیشفرضButtonDefaults.Heightهستند. ( I1f6c8 ) - عملکرد
BasicSwipeToDismissBoxبا حذف استفاده از Canvas برای ترسیم اسکریم بهبود یافته است. ( I68f2c ) - رفع اشکال دسترسی در اسلایدر، که در آن درصد اعلام شده با مقدار پس از بهروزرسانی مطابقت نداشت ( I91146 )
- رفع اشکال در اجرای
placeholderShimmer. ( Iee39b - عملکرد
TransformingLazyColumnبا بهینه سازی محاسبهScrollProgressتا 30% بهبود یافته است. ( I4c4cb )
نسخه 1.5.0-beta01
7 مه 2025
androidx.wear.compose:compose-*:1.5.0-beta01 منتشر شد. نسخه 1.5.0-beta01 حاوی این تعهدات است.
نسخه 1.5.0-beta01 Compose for Wear OS نشان می دهد که این نسخه از کتابخانه کامل شده است و API قفل شده است (به جز مواردی که به عنوان آزمایشی علامت گذاری شده است).
Wear Compose 1.5.0-beta01 شامل کتابخانه Wear Compose Material3 است که از سیستم طراحی رابط کاربری جدید به نام Material 3 Expressive پشتیبانی می کند. برای استفاده از طراحی بصری جدید در برنامه ها و بهره مندی از اجزای جدید به شرح زیر توصیه می شود از Material به Material3 ارتقا دهید:
-
MaterialThemeبرای طرحهای رنگی، تایپوگرافی و اشکال بهروز و توسعهیافته برای ایجاد عمق و تنوع به طرحهای شما. - طرح زمینه رنگی پویا که به طور خودکار یک طرح رنگی برای برنامه شما ایجاد می کند تا با رنگ های صفحه ساعت مطابقت داشته باشد.
- اجزای جدید به طور خودکار با اندازه های صفحه نمایش بزرگتر به طور پیش فرض سازگار می شوند
- شکلگیری شکل - اجزای دکمههای گرد مانند
IconButton،TextButton،IconToggleButtonوTextToggleButtonاز تغییراتی پشتیبانی میکنند که با فشار دادن یا علامت زدن، متحرک میشوند. -
EdgeButton- یک دکمه جدید در آغوش گرفتن لبه با شکل خاصی که برای پایین صفحه طراحی شده است. - Scaffolds - معرفی
AppScaffoldوScreenScaffoldبرای چیدمان ساختار صفحه و هماهنگ کردن انیمیشن هایScrollIndicatorوTimeText. - دکمه ها - دکمه های متعددی به شکل استادیوم با ظروف منعطف تک شکافی و تغییرات چند شیار برای دکمه های دارای نمادها و برچسب ها پشتیبانی می شوند.
CheckboxButtonوSwitchButtonدر صورت نیاز به دکمههای جابهجایی ارائه میشوند، در حالی کهRadioButtonدکمه انتخاب در دسترس است (تغییرهای 'Split' دکمههای تغییر و انتخاب نیز ارائه شده است). -
ButtonGroup- یک گروه گویا از دکمهها را در یک ردیف پیادهسازی میکند که با لمس کردن شکل میدهند. - تغییرات
AlertDialogاز دکمههای ok/cancel یاEdgeButtonپشتیبانی میکنند. -
ConfirmationDialogبرای نمایش پیامی با مهلت زمانی در دسترس است و از انیمیشن های ویژه برای موفقیت، شکست و تغییرات باز روی تلفن پشتیبانی می کند. - Pickers - تغییرات
TimePickerوDatePickerو همچنین مؤلفههای Picker وPickerGroupبرای ساخت صفحهنمایش انتخابکننده خود پشتیبانی میشوند. -
ProgressIndicators- شاخصهای پیشرفت دایرهای و خطی پشتیبانی میشوند (CircularProgressIndicatorدارای تغییرات تقسیمبندی شده و نامشخص است). - کارت - تعدادی از انواع کارت موجود است، از جمله
TitleCardکه طرحبندیهای خاصی را برای کارتها با عنوان، زمان، زیرنویس یا اسلات محتوا ارائه میدهد.TitleCardهمچنین میتواند یک پسزمینه تصویر برای تقویت معنای اطلاعات موجود در کارت داده شود. - پیجرها - اجزای
HorizontalPagerScaffold،VerticalPagerScaffoldوAnimatedPageانیمیشن هایHorizontalPageIndicatorوVerticalPagerIndicatorرا هماهنگ می کنند.HorizontalPagerوVerticalPagerدر کتابخانه Wear Compose Foundation منتشر شده اند. - Placeholders - یک شکل اسکلت روی یک جزء ترسیم می کند، برای موقعیت هایی که هیچ محتوای موقتی در دسترس نیست.
- لغزنده ها و پله ها - هر دو لغزنده و استپر به کاربران اجازه می دهند از طیف وسیعی از مقادیر انتخاب کنند. لغزندهها فشردهتر هستند و میتوانند بخشبندی شوند، در حالی که Stepper یک جزء تمام صفحه است که معمولاً با
StepperLevelIndicatorجفت میشود. -
SwipeToReveal- برای افزودن اقدامات اضافی به یک composable زمانی که از راست به چپ کشیده می شود استفاده می شود.
علاوه بر این، Wear Compose Foundation 1.5.0-beta01 شامل این اجزای جدید است:
-
TransformingLazyColumn- فهرستی تنبل و با پیمایش عمودی که از مقیاسبندی و شکلگیری انیمیشنها پشتیبانی میکند. - گروه های کانونی سلسله مراتبی - برای حاشیه نویسی اجزای ترکیبی در یک برنامه کاربردی، برای پیگیری بخش فعال ترکیب و هماهنگ کردن فوکوس استفاده می شود.
- پیجرها - اجزای
HorizontalPagerوVerticalPagerکه بر اساس اجزای Compose Foundation با پیشرفتهای مخصوص Wear برای بهبود عملکرد و پیروی از دستورالعملهای Wear OS ساخته شدهاند.
تغییرات API
- API Hierarchical Focus را به روز کرد -
Modifier.hierarchicalFocusبهModifier.hierarchicalFocusGroupتغییر نام داد و پارامتر callback را حذف کرد. اضافه بارModifier.hierarchicalFocusRequesterرا با پارامترFocusRequesterحذف کرد. یکCompositionLocalجدید،LocalScreenIsActiveایجاد کرد تا کامپوننت ها بتوانند اطلاع دهند و بررسی کنند که کدام صفحه نمایش فعال است. ( I5ff7c ). -
SwipeToRevealاز بنیاد Wear Compose به نفع APIهایSwipeToRevealدر Wear Compose Material و Wear Compose Material3 منسوخ شد. لطفاً برای ادامه استفاده از APIها، واردات Wear FoundationSwipeToRevealرا با Wear Compose Material/ Wear Compose Material3 وارد کنید. ( Ia147d ). - وابستگیهای Wear Compose Material3
SwipeToRevealبه Foundation به بسته material3 منتقل شدند، به عنوان مثالRevealValue،RevealDirection،RevealActionType،RevealState،rememberRevealState. توسعه دهندگان باید واردات خود از این کلاس ها و توابع را ازandroidx.wear.compose.foundationبهandroidx.wear.compose.material3تغییر دهند. ( I640e6 ). - Wear Compose Material3
SwipeToRevealAPI را به شرح زیر بهروزرسانی کرد: پارامترهایprimaryAction،onFullSwipe،secondaryAction،undoPrimaryAction،undoSecondaryActionوhasPartiallyRevealedStateرا بهSwipeToRevealcomposable اضافه کرد. قابلیت شخصی سازیpositionalThresholdوanimationSpecازRevealStateحذف کرد.lastActionType,revealThresholdو width ازRevealStateحذف شد . سازندهRevealStateرا تغییر داد تاRevealDirectionبه جای لنگرها بپذیرد. توابعcreateRevealAnchors، لنگرها وbidirectionalAnchorsرا حذف کرد. توابعSwipeToRevealScopeprimaryAction،secondaryAction،undoPrimaryActionوundoSecondaryActionبهPrimaryActionButton،SecondaryActionButton،UndoActionButtonتغییر نام داده و به توابع Composable تبدیل شدند.RevealActionTypeبه عنوان داخلی علامت گذاری کرد. ( I885d0 ). -
SwipeToRevealAPI بهصورت زیر بهروزرسانی شد:onFullSwipeبهonSwipePrimaryActionتغییر نام داد. تغییر نامSwipeToRevealNonAnchoredSampleبرای نشان دادن استفاده از پارامترhasPartiallyRevealedState.actionButtonHeightحذف شد، زیرا پیشفرض ارتفاع پیشفرض دکمه است و ارتفاع بزرگتر را میتوان با استفاده از یک اصلاحکننده تنظیم کرد.SmallActionButtonHeightازSwipeToRevealDefaultsحذف کرد. پارامتر مقدار را در سازندهRevealValueوRevealDirectionخصوصی کرد. ( I465ce ).
رفع اشکال
- کنترل
EdgeButtonScreenScaffoldرا ثابت کرد تا پس از حذف یک آیتمTransformingLazyColumn،EdgeButtonدر جای خود متحرک شود. ( I6d366 ). - وابستگی های Wear Compose را در کتابخانه های Compose به نسخه 1.8.0 به روز کرد. ( I2ef3f ).
- حرکت
CircularProgressIndicatorنامشخص را به روز کرد تا دیگر به طور موقت پسرفت نکند. ( Ieddb1 ). - رفع یک اشکال
SwipeDismissableNavHost- پس از کشیدن انگشت به عقب، فوکوس به درستی تغییر نمی کرد و باعث می شد ورودی چرخشی از کار بیفتد (این برای API 36+ بود که از برگشت پیش بینی کننده استفاده می کند). ( Ieddb1 ). - اسناد اصلاح شده برای API تمرکز سلسله مراتبی ( Idf2ff ).
- اسناد را برای Button و Card بهروزرسانی کرد تا بیان کند که چگونه
containerPainterوdisabledContainerPaintercontainerColorوdisabledContainerColorرا لغو میکنند ( I4a453 ). - تغییری را به
TimeTextدر نسخه قبلی برگرداند کهBroadcastReceiverبه یک رشته کاری منتقل کرد، زیرا باعث ایجاد مشکلاتی برای برنامههایی شد که رشتههای خود را در طول پیمایش مدیریت میکنند. ( I34d02 ). - نمونههای Picker را بهروزرسانی کرد تا تماسهای به خاطر سپردن غیرضروری را حذف کند و در عوض
rememberUpdatedStateدر Picker برای به خاطر سپردن آخرین تابع لامبداcontentDescriptionاستفاده کنید. ( ICb5b1 ). - سبک های متن را در
TimePickerوDatePickerبه روز کرد تا تغییرات فونت دیگر منجر به برش نشود. ( I26194 ). -
ListHeaderوListSubHeaderاکنون ترازبندی متن پیشفرض به ترتیب به تراز وسط و تراز شروع میشوند. ( I78339 ). - بهروزرسانی بنیاد و Material Swipe to Reveal نمونهها و نسخههای نمایشی برای اعلام کنشهای دسترسی سفارشی (عملکردهای سفارشی باید بهعنوان معناشناسی در محتوا اضافه شوند، نه در خود
SwipeToRevealقابل ترکیب). ( Ie92a3 ). - مجموعه
MaxLinesپیشفرض روی محتوایEdgeButtonرا با توجه به اندازه آن بهروزرسانی کرد - اکنون 1 برای خیلی کوچک، 2 برای کوچک و متوسط و 3 برای بزرگ است. ( Ie35f6 ). -
LocalReduceMotionساده شده به طوری که مشاهده گر فقط یک بار ثبت می شود تا عملکرد را بهبود بخشد. ( Ib1979 ). - برای بهبود عملکرد، تعداد ترسیم مجدد را در
ScrollIndicatorبه حداقل رساند. ( Ia7a67 ). - یک اشکال در
TransformingLazyColumnبرطرف شد، که در آن آیتم قابل مشاهده بالای لیست زمانی که EdgeButton به ارتفاع کامل خود رسید مقیاس درستی نداشت. ( I30580 ).
نسخه 1.5.0-alpha14
23 آوریل 2025
androidx.wear.compose:compose-*:1.5.0-alpha14 منتشر شد. نسخه 1.5.0-alpha14 حاوی این commit ها است.
تغییرات API
- همه وابستگیهای Material
SwipeToRevealبه FoundationSwipeToRevealبه بسته مواد منتقل شدند، به عنوان مثالRevealValue،RevealDirection،RevealActionType،RevealState،rememberRevealState. توسعه دهندگان باید واردات خود از این کلاس ها و توابع را ازandroidx.wear.compose.foundationبهandroidx.wear.compose.materialتغییر دهند. ( IB7cb8 ) - API
HierarchicalFocusCoordinatorرا بهروزرسانی کرد تا بهجای ترکیبپذیر، اصلاحکننده باشد. - یادداشت های مهاجرت:
-
HierarchicalFocusCoordinator(function, content)می توان با افزودن یکModifier.hierarchicalFocus(function())بهcontent، یا ترکیبی که در آن گنجانده شده است، جایگزین کرد. -
ActiveFocusListener { if (it) focusRequester.requestFocus() }می توان با افزودنModifier.hierarchicalFocusRequester(focusRequester)جایگزین کرد - سایر کاربردهای نادرتر
ActiveFocusListenerمی توانند از پارامتر جدید درModifier.hierarchicalFocusاستفاده کنند. -
focusRequester(rememberActiveFocusRequester())می توان باhierarchicalFocusRequester()جایگزین کرد -
val focusRequester = rememberActiveFocusRequester()می توان باremember { FocusRequester() }و افزودنModifier.hierarchicalFocusRequester(focusRequester)جایگزین کرد. ( Ie319a )
-
رفع اشکال
- آستانه سرعتی که حرکات کشیدن انگشت برای ایجاد تغییر حالت باید از آن فراتر رود، برای مؤلفههای زیر افزایش یافته است:
SwipeToReveal،BasicSwipeToDismissBoxوSwipeDismissableNavHost(فقط برای API 35 و پایینتر برایSwipeDismissableNavHost). ( If47bf ) - هنگام اضافه شدن موارد جدید به
TransformingLazyColumn، مشکل انیمیشن برطرف شد. ( I589b2 )
نسخه 1.5.0-alpha13
9 آوریل 2025
androidx.wear.compose:compose-*:1.5.0-alpha13 منتشر شد. نسخه 1.5.0-alpha13 حاوی این commit ها است.
تغییرات API
- پروژههای منتشر شده با Kotlin 2.0 برای مصرف نیاز به KGP 2.0.0 یا جدیدتر دارند ( Idb6b5 )
- ویژگی
targetPageبهPagerStateاضافه شد ( I4de8b )
رفع اشکال
- از ترکیب مجدد غیرضروری در حین بازگشت پیش بینی کننده جلوگیری کنید. ( Iecd6d )
- ویژگی
isScrollableScrollInfoProviderرا برای برگرداندن مقدار فعلی ثابت کرد. ( ICbfb8 )
نسخه 1.5.0-alpha12
26 مارس 2025
androidx.wear.compose:compose-*:1.5.0-alpha12 منتشر شد. نسخه 1.5.0-alpha12 حاوی این commit ها است.
تغییرات API
- اجرای پیشفرض
gestureInclusionSwipeToRevealبهبود دهید تا فقط در صورتی که وضعیت مؤلفه پوشش داده شده باشد، حرکات را نادیده بگیرید. ( I7e3d6 ) - برای
SwipeToReveal،bidirectionalGestureInclusionGestureInclusion را به جای تابع یک val کرد و@FloatRangeبه پارامترedgeZoneFractionدرgestureInclusionاضافه کرد. ( Ica7c3 )
رفع اشکال
-
SwipeToRevealbidirectionalGestureInclusionرا تغییر دهید تا یک شی به جای کلاس برگردانید. ( I29597 ) - غیرفعال کردن استفاده از هاپتیک هنگام اجرای آزمایشات تحت
RoboElectric. ( I58bd1 ) - بالشتک های
SwipeToRevealرا بین دکمه های محتوا و اکشن و همچنین بالشتک بین نماد و متن دکمه های عمل به روز کنید. ( IC46cb )
نسخه 1.5.0-alpha11
12 مارس 2025
androidx.wear.compose:compose-*:1.5.0-alpha11 منتشر شد. نسخه 1.5.0-alpha11 حاوی این commit ها است.
تغییرات API
-
PagerStateرا به روز کرد، Compose FoundationPagerStateبه عنوان کلاس پایه حذف کرد و ویژگی هایcurrentPage،currentPageOffsetFractionوpageCountاضافه کرد. رابطGestureInclusionرا به روز کرد و نام روش را بهignoreGestureStartتغییر داد. ( I4ae07 ) - به عنوان روش توصیه شده برای دریافت افست
SwipeToDismissBoxState،requireOffsetبهSwipeToDismissBoxStateاضافه کنید. ( I21042 ) -
CurvedModifier.semanticsاضافه شد که در ابتدا از توصیف محتوا و نمایه پیمایش پشتیبانی می کرد ( I0b093 ) - ما
CurvedModifier.clearAndSetSemanticsاضافه کردهایم تا وسیلهای برای خاموش کردن معناهای منحنی فراهم کنیم.CurvedTextبه پیشفرض توضیحات محتوا برای متن ادامه میدهد، اماtimeTextCurvedTextوtimeTextSeparatorاکنون محتوای خود را اعلام نمیکنند. ( I4b568 ) - مدیریت پیشفرض
HorizontalPagerبرای حرکات کشیدن انگشت بهPagerDefaults.gestureInclusionتغییر نام داده است. رفتار پیشفرض اکنون صرفاً نادیده گرفتن حرکات تند کشیدن است که از لبه چپ صفحه اول شروع میشوند و تنها پس از آن وقتی Talkback خاموش است. در موارد دیگر، رفتار پیشفرض این است که ژستهای تند کشیدن توسط پیجر نادیده گرفته نمیشوند، بنابراین برای کنترلکنندههای تند کشیدن برای رد کردن در دسترس نخواهند بود. ( Iee486 ) - اضافه شدن اسکرول چرخشی برای
rotaryScrollableapi. اسکرول Overscroll و Nested Scroll به رفتارrotaryScrollablefling اضافه شد. این تغییر باید قابلیت اسکرول همتراز و پیمایش تودرتو را بین پیمایش لمسی و پیمایش چرخشی به ارمغان بیاورد. ( I71926 ) - به
SwipeToRevealپشتیبانی از ناحیه لبهکشی اضافه شد. رفتار پیشفرض FoundationSwipeToRevealاکنون این است که وقتی حرکت از لبه شروع میشود، کشیدن انگشت را مجاز نمیداند. رفتار پیشفرض Material3SwipeToRevealاکنون این است که وقتی حرکت حرکتی از لبه شروع میشود، وقتیSwipeDirectionروی یک جهت تنظیم شده است، کشیدن انگشت را ممنوع میکند. ( I32ef0 ) - اکنون TLC بهجای قرار دادن اولین و آخرین موارد در مرکز، بهطور پیشفرض از محتوای خالی استفاده میکند. ( I77ab7 )
رفع اشکال
- کتابخانه های Wear Compose به کامپایلر Kotlin 2.0 به روز شده است. ( I2de79 )
- نمونه منحنی
LetterSpacingروی فونداسیون ثابت شد. ( Iebf7c )
نسخه 1.5.0-alpha10
26 فوریه 2025
androidx.wear.compose:compose-*:1.5.0-alpha10 منتشر شد. نسخه 1.5.0-alpha10 حاوی این تعهدات است.
تغییرات API
-
SwipeToRevealDefaultsعمومی کنید. ( I0c34c ) - ما پارامتر
swipeToDismissEdgeZoneFractionرا درHorizontalPagerجایگزین کرده ایم. به جای یک پارامتر جدید،gestureInclusionمعرفی شده است که می تواند برای دستیابی به کشیدن انگشت لازم برای رد کردن رفتار استفاده شود.gestureInclusionنمونهای ازGestureInclusionرا میگیرد که تصمیم میگیرد آیا رویداد اسکرول بعدی ادامه یابد یا خیر. اجازه دادن به یک اشاره به این معنی است که پیجر آن را مصرف میکند - در غیر این صورت، در جای دیگری مانند یک کنترلکننده تند کشیدن برای رد کردن، مدیریت میشود. رفتار پیشفرض جدید این است که حرکات را در سمت چپترین لبه صفحه اول در صفحهیجر غیرمجاز میدانند، و از این رو اجازه میدهیم تند کشیدن در این ناحیه رد شود. همه صفحات دیگر به پیجر اجازه میدهند همه حرکات را مصرف کند، به این معنی که نمیتوان از آنها تند کشیدن برای رد کردن را فعال کرد. برای دستیابی به Swipe برای رد کردن رفتار در همه صفحات، به سادگی یک نمونهGestureInclusionسفارشی ارائه کنید (بهPagerDefaults.disableLeftEdgeOnFirstPageمراجعه کنید) که صفحه فعلی را نادیده می گیرد. تغییر مهم دیگری که در اینجا معرفی شد این است که مؤلفه Pager دیگر به طور پیش فرض تمام صفحه نیست، در عوض برای دستیابی به این رفتار،Modifier.fillMaxSize()را اضافه کنید. ( I9d3aa ) - ما نام
createAnchorsدر API Swipe-to-Reveal بهcreateRevealAnchorsتغییر دادیم ( If5999 ) -
RevealScopeاز Swipe-to-Reveal API حذف کرده ایم. ( Ie4ad5 ) - ما Revealing و Revealed را از
RevealValueدر API Swipe-to-Reveal حذف کردیم. ( I8dbc5 ) - ما
SwipeDirectionدر API Swipe-to-Reveal بهRevealDirectionتغییر نام دادیم. ( I7472f ) - ما امضای پارامتر
positionalThresholdتابعrememberRevealStateSwipeToRevealرا تغییر داده ایم. ( I29c0a ) - ما یک پارامتر
overscrollEffectجدید بهScalingLazyColumn،TransformingLazyColumnوScreenScaffoldاضافه کرده ایم. ( I0cee8 ) - هنگام استفاده از
PagerDefaults#snapFlingBehaviour، پارامترpagerSnapDistanceبا پارامتر IntmaxFlingPagesجایگزین شده است، که می تواند برای تعیین حداکثر تعداد صفحاتی که پیجر باید پر کند استفاده می شود. ( I8cfc0 ) - Wear Pager اکنون به جای استفاده از Compose Foundation
PagerScopePagerScopeخود را دارد. ( I9195b ) - ما پشتیبانی از
lineHeightرا در متن منحنی اضافه کردهایم ( I1c936 ) - به
initialAnchorItemIndexوinitialAnchorItemOffsetTransformingLazyColumnStateاضافه کردهایم که موقعیت اسکرول اولیهrememberTransformingLazyColumnStateمیتوان درTransformationLazyColumnمشخص کرد. ( I0a0d5 ) -
runWithTimingDisabledبه نفعrunWithMeasurementDisabledمنسوخ کنید، که به وضوح رفتار را توصیف می کند - همه معیارها متوقف می شوند. علاوه بر این، سوپرکلاسMicrobenchmarkScopeدر معرض دید قرار دهید، زیرا اعلام مجدد تابعrunWithMeasurementDisabledبرای دسترسی باز امکان پذیر نیست، زیرا درون خطی است. ( I9e23b , b/389149423 , b/149979716 ) - ما
TransformingLazyColumnItemScrollProgress.Unspecifiedرا به API اضافه کردهایم تا از بوکس شدن درTransformingLazyColumnItemScrollProgressجلوگیری کنیم. ( I0835d )
رفع اشکال
- بهبود Kdoc برای
CurvedTextStyle( Id45e3 ) - ما
SwipeableV2(بخشی از اجرایSwipeToReveal) را به جای عمومی اما محدود به گروه کتابخانه داخلی کرده ایم. ( IDbb94 ) - ما تست هایی را به
HierarchicalFocusCoordinatorاضافه کرده ایم ( I1ce54 , b/395548918 ) - ما بهبودهایی در
SwipeToRevealدر نمونه های فونداسیون پوشیدنی ایجاد کرده ایم. ( I5f307 ) - اصلاح داده های معنایی محور پیمایش برای
verticalScrollAxisRangeدرTransformingLazyColumnبرای دسترسی ( I68123 ) - با حذف رشتههای غیر ضروری پسزمینه، عملکرد لمسی چرخشی را در Wear4+ بهبود بخشید ( I39cfe )
-
SwipeDismissableNavHostتغییر دهید تا ازPredictiveBackNavHostفقط در API 36 به بعد استفاده شود. ( I59bt ) - هنگام دسترسی به تنظیمات کاهش حرکت، محافظی در برابر تصادف اضافه کردهایم. ( I01e2c )
- ما واکشی اولیه برای
TransformingLazyColumnرا برای کاهش jank پیاده سازی کرده ایم ( Icca88 )
نسخه 1.5.0-alpha09
29 ژانویه 2025
androidx.wear.compose:compose-*:1.5.0-alpha09 منتشر شد. نسخه 1.5.0-alpha09 حاوی این commit ها است.
تغییرات API
- در
CurvedTextStyle، فاصله حروف را به فاصله حروف در جهت عقربههای ساعت و فاصله حروف خلاف جهت عقربههای ساعت تقسیم کردهایم. این مورد ضروری است زیرا حروف در جهت عقربههای ساعت از خط پایه خارج میشوند در حالی که حروف خلاف جهت عقربههای ساعت به سمت داخل میروند (بنابراین فاصله حروف بزرگتر مورد نیاز است) ( I4b848 ) -
CompositionLocalLocalReduceMotionبرای برگرداندن یک Boolean به جای یک شیReduceMotionساده شده است. رابطReduceMotionاکنون منسوخ شده است. فراخوان های قبلی مانندLocalReduceMotion.current.enabled()را می توان باLocalReduceMotion.current( I4937f ) جایگزین کرد. - در
PagerDefaults،snapAnimationSpecبهSnapAnimationSpecتغییر نام داده است. ( I20c9a )
نسخه 1.5.0-alpha08
15 ژانویه 2025
androidx.wear.compose:compose-*:1.5.0-alpha08 منتشر شد. نسخه 1.5.0-alpha08 حاوی این commit ها است.
تغییرات API
- ما همه کتابخانههای Wear Compose را به حالت «API صریح» بهروزرسانی کردهایم. ( Iebf9f )
- ما پارامتر انیمیشن snap پیجر را بخشی از
PagerDefaultsکردهایم. ( Iffff64 ) - ما یک پارامتر افست به
SwipeToDismissBoxStateاضافه کردیم. ( I586bd )
رفع اشکال
- هاپتیک های پلتفرم چرخشی اکنون برای نسخه های Wear OS بعد از V نامیده می شوند ( Idb03e )
نسخه 1.5.0-alpha07
11 دسامبر 2024
androidx.wear.compose:compose-*:1.5.0-alpha07 منتشر شد. نسخه 1.5.0-alpha07 حاوی این commit ها است.
تغییرات API
-
TransformingLazyColumnStateاکنون راهی برای مشاهده پیشرفت اسکرول فعلی بر اساس شاخص های آیتم لنگر ارائه می دهد. ( I72b01 ) - اگر موارد جدید
Modifier.animateItemرا داشته باشند، انیمیشنهایی را بهTransformingLazyColumnاضافه کردهایم. ( Iecb9c ) -
TransformingLazyColumnاکنون مقادیرbeforeContentPaddingوafterContentPaddingرا نشان می دهد. ( Iccd5f ) -
TransformingLazyColumnاکنون ترکیب محلیLocalTransformingLazyColumnItemScopeرا ارائه می دهد که مؤلفه ها (مانندCards وButtonدر Material3) می توانند از آن برای تغییر شکل خودکار زمانی که در داخلTransformingLazyColumnقرار می گیرند استفاده کنند. تماسگیرندگان میتوانند شکلگیری خودکار را با استفاده از پوشش جدیدTransformExclusionغیرفعال کنند. ( I1652f )
رفع اشکال
- ما حداقل و حداکثر سرعت پرتاب را برای چرخش در دستگاه هایی که U به بعد را هدف قرار می دهند به روز کرده ایم. ( I33559 )
- اگر یک مورد در
TransformingLazyColumnحاوی هیچ ترکیبی نباشد، خرابی را برطرف کردهایم ( Idb99d ) - ما پشتیبانی
ScrollFeedbackProviderبرای هاپتیک های چرخشی در بستنی وانیلی اندروید اضافه کرده ایم. ( IBC553 ) - ما در هنگام استفاده از
SwipeToRevealشیب لمسی را افزایش دادهایم تا احتمال راهاندازی تصادفی تند کشیدن هنگام پیمایش عمودی را کاهش دهیم. ( IC0672 ) - ما
SwipeDismissableNavHostبهروزرسانی کردهایم تا ازPredictiveBackHandlerدر صورت موجود بودن با API 35 به بعد استفاده کنیم. در این صورت انیمیشن های جدید اعمال خواهند شد. ( I08c11 )
نسخه 1.5.0-alpha06
13 نوامبر 2024
androidx.wear.compose:compose-*:1.5.0-alpha06 منتشر شد. نسخه 1.5.0-alpha06 حاوی این commit ها است.
تغییرات API
- ما
ScrollInfoProviderبرایPagerStateبا حذف پارامترorientationکه دیگر مورد نیاز نیست، ساده کرده ایم. رفتار جدید این است کهTimeTextبرای صفحهبندی افقی و عمودی در جای خود باقی بماند. ( I71767 ) -
TransformingLazyColumnدر نسخه های قبلی معرفی شده بود. اکنون نام مستعارLazyColumnWear را حذف می کنیم (که بهTransformingLazyColumnارسال می شد) به نفع نام جدیدTransformingLazyColumn. همچنین ویژگیheightTransformingLazyColumnVisibleItemInfoحذف کردهایم - لطفاً بهجای آن ازmeasuredHeightاستفاده کنید. ( I0ea1e ) - ما مشخصات
PagerDefaults.snapFlingBehaviorsnapAnimationSpecازTweenبه یکSpringتغییر دادهایم. ( I10d02 , b/349781047 , b/303807950 ) - ما
LocalReduceMotionCompositionLocalبه پایدار ارتقا داده ایم ( Ia6f32 )
رفع اشکال
- ما
Modifier.rotaryScrollableبرای استفاده ازfocusTargetWithSemanticsبرای پشتیبانی معنایی بهتر در چرخش به روز کرده ایم. ( Ief0a0 ) - ما حداقل وابستگی API را برای کتابخانه های Compose به 1.7.4 به روز کرده ایم. ( I88b46 )
- ما شکلبندی عرض را در
TransformingLazyColumnبهعنوان راهحلی برای یک اشکال برش غیرفعال کردهایم. ( I3dfb8 ) - ما با
TransformingLazyColumn( Id7668 ) اشکالی را که باعث ناپدید شدن موارد پس از اسکرول میشد، برطرف کردیم. - ما
LazyLayoutSemanticsبرایTransformingLazyColumnاضافه کرده ایم. ( Ia8f56 )
نسخه 1.5.0-alpha05
30 اکتبر 2024
androidx.wear.compose:compose-*:1.5.0-alpha05 منتشر شد. نسخه 1.5.0-alpha05 حاوی این commit ها است.
تغییرات API
- ما پشتیبانی از
animateScrollToرا درTransformingLazyColumnStateاضافه کرده ایم تا پیمایش به یک مورد بتواند متحرک شود. ( i4097D ) - ما برای تعویض پیمایش به اندازه گیری بعدی ،
requestScrollToدرTransformingLazyColumnStateاضافه کرده ایم. ( i20a5e ) - ما پشتیبانی از
contentPaddingدرTransformingLazyColumnپشتیبانی کرده ایم. ( i3a69c )
رفع اشکال
- ما وقتی که ارتفاع محتوا از ارتفاع صفحه کوتاهتر است ، یک اشکال در ارائه
TransformingLazyColumnبرطرف کرده ایم. ( i6c3e1 ) -
ScrollInfoProvderبرایTransformingLazyColumnاکنون به طور صحیح اولین مورد را ردیابی می کند. ( i1e4a3 ) -
TransformingLazyColumnStateاکنون وضعیت خود را نجات می دهد (anchorItemIndexوanchorItemScrollOffset). ( i3d265 )
نسخه 1.5.0-alpha04
16 اکتبر 2024
androidx.wear.compose:compose-*:1.5.0-alpha04 منتشر شده است. نسخه 1.5.0-alpha04 شامل این تعهدات است.
تغییرات API
- ما به بنیاد Wear Compose
LazyColumnبهTransformingLazyColumnتغییر نام داده ایم تا تمایز بین این و بنیاد آهنگسازیLazyColumnواضح تر باشد. ( i0608b ) - پشتیبانی چرخشی اضافه شده برای صفحه های افقی/عمودی ، کاربران را قادر می سازد تا با استفاده از دستگاه های ورودی چرخشی ، صفحات را حرکت دهند. ( i9770d )
- ما
PagerDefaultsجدید را به روز کرده ایم تا مشخص کنیم که پیجر به طور پیش فرض به صفحه می رسد. ( iff7d0 ) -
TransformingLazyColumnItemScrollProgressاکنون یک کلاس ارزشی است که باید عملکرد را بهبود بخشد. ( IC399E ) - اکنون
TransformingLazyColumnاز Rotary Out Out of the جعبه پشتیبانی می کند. ( I05206 ) -
TransformingLazyColumnStateاکنون ازscrollToItemپشتیبانی می کند. ( I507B3 ) - حذف شده
@ExperimentalWearFoundationApiاز APISwipeToReveal( i34a66 )
نسخه 1.5.0-alpha03
2 اکتبر 2024
androidx.wear.compose:compose-*:1.5.0-alpha03 منتشر می شود. نسخه 1.5.0-alpha03 شامل این تعهدات است.
تغییرات API
- ما برای موارد نادر که صفحه نمایش فعلی از کشش برای عزل پشتیبانی نمی کند ، پشتیبانی از جابجایی دو جهته در
SwipeToRevealرا اضافه کرده ایم. . این پیش فرض هنوز هم فقط در سوپ های راست به سمت راست به سمت راست می کشد و به شدت توصیه می شود که به رفتار پیش فرض احترام بگذارید تا از درگیری با کشش برای برکناری جلوگیری کنید. ( IFAC04 ) - ما
LazyColumnStateبرای غلبه برcanScrollForwardوcanScrollBackwardبه روز کرده ایم - این اکنون متوقف می شود که اولین یا آخرین مورد دقیقاً در مرکز صفحه باشد. ( ia77d7 ) - ما مؤلفه های جدید
HorizontalPagerوVerticalPagerرا اضافه کرده ایم که به موضوعات متداول می پردازد ، مانند استفاده از تمرکز و تعامل با کشش سیستم برای برکناری که می تواند در سایش رخ دهد. ( I2902B ) - ما پشتیبانی از
LazyColumnرا برای افشایkeyوcontentTypeمشتری از طریقlayoutItemsاضافه کرده ایم. ( i1bd9c )
رفع اشکال
- ما با استفاده از پرچم های رنگ ، انیمیشن های متنی خمیده را نرم تر می کنیم. ( i73a15 )
- ما مستندات گفتگوی مواد را به روز کرده ایم تا منعکس کننده این باشد که
onDismissRequestپس از تنظیم Falg Flag به نام False فراخوانی نمی شود. ( IFD8D6 ) - ما با انیمیشن Vignette در گفتگوی Material ( I126BF ) یک اشکال را برطرف کرده ایم
نسخه 1.5.0-alpha02
18 سپتامبر 2024
androidx.wear.compose:compose-*:1.5.0-alpha02 منتشر می شود. نسخه 1.5.0-alpha02 شامل این تعهدات است.
تغییرات API
- ما پشتیبانی از Wear Compose
LazyColumnباScreenScaffoldخود اضافه کرده ایم (و اجرایScrollInfoProviderرا برایLazyColumnStateاضافه کرده ایم). ( IB8D29 ) - ما
viewportSizeبهLazyColumnLayoutInfoاضافه کرده ایم. ( i4187f )
رفع اشکال
- ما یک اشکال را برطرف کرده ایم به طوری که پیمایش چرخشی اکنون در
ScalingLazyColumnغیرفعال شده است وقتی پرچمuserScrollEnabledرویfalseتنظیم شده است. ( i490ab ، b/360295825 ) - ما یک رفع اشکال برای پرداختن به بالشتک عمودی غیر منتظره روی متن خمیده ایجاد کرده ایم. ارتفاع متن خمیده اکنون با فضای واقعی مورد استفاده در متن مطابقت دارد. لطفاً توجه داشته باشید که این احتمالاً تست های تصویر را شامل می شود که شامل متن خمیده است ( IAA6EF )
- ما یک رفع اشکال را به
Dialogبرگشت داده ایم که در آن زمان تماس باonDismissRequestهنگام تنظیمshowDialogبه صورت نادرست فراخوانده شد ، زیرا در بعضی موارد این منجر به این شد کهonDismissRequestچندین بار خوانده شود. ( i64656 )
نسخه 1.5.0-alpha01
4 سپتامبر 2024
androidx.wear.compose:compose-*:1.5.0-alpha01 منتشر شده است. نسخه 1.5.0-alpha01 شامل این تعهدات است.
تغییرات API
- ما یک
LazyColumnجدید را به کتابخانه بنیاد Wear Compose با API هایLazyColumnStateوLazyColumnScopeمرتبط اضافه کرده ایم. این به عنوان پایه و اساس ایجاد مقیاس بندی قابل تنظیم و اثرات مورفوری با آهنگسازی سایش است. ( IB3B22 ) - ما به عنوان بخشی از API جدید
LazyColumn، یک نسخه فهرست بندی شده ازitemsIndexedIndexed را بهLazyColumnScopeاضافه کرده ایم. ( ib4a57 ) - ما به منظور حمایت از رفتارهای مقیاس گذاری و مورفین ، اصلاح کننده های
LazyColumnرا اضافه کرده ایم. ( IE229a ) -
HierarchicalFocusCoordinatorبه پایدار ارتقا یافته است. ( i31035 ) - ما پشتیبانی از فاصله نامه را به متن خمیده اضافه کرده ایم. ( i3c740 )
- یک پارامتر
rotationLockedبهCurvedLayout.curvedComposableبرای متوقف کردن اجزای چرخش اضافه شده است. ( i66898 ) - API موقت موقت
LocalUseFallbackRippleImplementationاز مواد سایش و مواد سایش 3 برداشته شده است ( i62282 ) - حذف
WearDevices.SQUAREاز Multi-Preview@WearPreviewDevices( I11C02 )
رفع اشکال
-
SwipeToRevealاکنون موارد آشکار شده را در قسمت قابل مشاهده صفحه قرار می دهد ، این کمک می کند تاSwipeToRevealدر یک لیست استفاده شود ، بنابراین موارد همیشه قابل تعامل هستند و هرگز در خارج از صفحه قرار نمی گیرند. ( i38929 ) -
SwipeToRevealاکنون با اتمامanimatedTo،lastActionTypeبه هیچ وجه بازنشانی می کند. ( i59b03 ) - مستندات را برای پارامتر جدید
rotationLockedبر رویcurvedComposableبهبود بخشید. ( IFBD57 ) - هنگام عبور
NaNبهperformFlingScalingLazyColumnSnapFlingBehavior، تصادف را برطرف کرد. ( IC13DA ) - اشکال ثابت روی اصلاح کننده اندازه طرح خمیده ( I0FEDF )
- ما از فاصله نامه های مشخص شده در "SP" پشتیبانی کرده ایم. ( i9f6e3 )
- ما یک اشکال در گفتگوی Material2 را برطرف کرده ایم که در آن هنگام تماس با گفتگوی نامرئی ، پاسخ به تماس
onDismissRequestفراخوانی نمی شود ( i64656 ) - با تغییر نام
LayoutCoordinates.introducesFrameOfReferenceبهLayoutCoordinates.introducesMotionFrameOfReferenceبرای بازتاب بهتر هدف خود. برای محاسبه مختصات بر اساس آن پرچم ، تابع مرتبط را تغییر نام داد. ( i3a330 )
نسخه 1.4
نسخه 1.4.1
12 فوریه 2025
androidx.wear.compose:compose-*:1.4.1 منتشر شده است. نسخه 1.4.1 شامل این تعهدات است.
رفع اشکال
- ما هنگام دسترسی به تنظیمات جهانی کاهش ، که در بعضی از سیستم عامل ها که در آن تنظیم نشده است ، در برابر تصادف محافظت کرده ایم. ( i01e2c )
نسخه 1.4.0
4 سپتامبر 2024
androidx.wear.compose:compose-*:1.4.0 منتشر می شود. نسخه 1.4.0 شامل این تعهدات است.
تغییرات مهم از 1.3.0
-
ScalingLazyColumnوPickerاکنون به طور پیش فرض از ورودی چرخشی پشتیبانی می کنند - توصیه می شود که دست زدن به چرخش صریح را حذف کرده و به رفتار پیش فرض سیستم تعویق کنید. در صورت لزوم ، از پارامترrotaryScrollableBehaviorبرای پیکربندی یا رفتار SNAP یا SNAP استفاده کنید - برای رفتار SNAP ، توصیه می شود با استفاده از پارامترflingBehavior، رفتارهای SNAP و قابلیت پیمایش را لمس کنید. -
Modifier.rotaryScrollableیک اصلاح کننده جدید است که رویدادهای چرخشی را با ظروف قابل پیمایش متصل می کند و به کاربران امکان می دهد با استفاده از یک تاج یا یک صفحه چرخشی در دستگاه Wear OS خود حرکت کنند. -
SwipeDismissableNavHostاکنون یک انیمیشن ورودی برای انتقال درون برنامه را فراهم می کند. - اکنون هنگام نمایش یک صفحه نمایش به طور پیش
PositionIndicatorبه طور پیش فرض نشان داده می شود.
تغییرات اضافی
- برای یک مجموعه کامل تر از تغییرات معرفی شده در نسخه 1.3.0 ، به یادداشت های انتشار Beta01 مراجعه کنید.
نسخه 1.4.0-RC01
21 آگوست 2024
androidx.wear.compose:compose-*:1.4.0-rc01 منتشر شده است. نسخه 1.4.0-RC01 شامل این تعهدات است.
- ما وابستگی های آهنگسازی را به 1.7.0-RC01 و پین شده SATH به روز کرده ایم و ناوبری را به Androidx.lifecycle 2.8.3 تبدیل کرده است
نسخه 1.4.0-beta03
12 ژوئن 2024
androidx.wear.compose:compose-*:1.4.0-beta03 منتشر شده است. نسخه 1.4.0-beta03 شامل این تعهدات است.
رفع اشکال
- ما
Modifier.rotaryScrollableبه روز کرده ایم. rotaryscrollable برای جایگزینی استفاده از "Focusable" با "Focustarget" که باعث بهبود عملکرد می شود. ( id294b ) - ما مسئله ای را برطرف کرده ایم که در آن
ProgressIndicatorاعلامیه خود را تحتTalkBackتکرار کرد. ( i94563 ) - ما پروفایل های پایه کتابخانه Wear را به روز کرده ایم. ( i3cbc3 )
نسخه 1.4.0-beta02
29 مه 2024
androidx.wear.compose:compose-*:1.4.0-beta02 منتشر می شود. نسخه 1.4.0-beta02 شامل این تعهدات است.
رفع اشکال
- ما به منظور پرداختن به مسائل مربوط به قطع ( ID865F ) ، عرض مرزی منتقل شده به خوانندگان از متن خمیده را افزایش داده ایم.
- ما مرز
HorizontalPageIndicatorرا که به خوانندگان صفحه منتقل شده بود محدود کرده ایم - قبلاً این نشانگر تمام صفحه را اشغال می کرد ( ID8D7A ).
نسخه 1.4.0-beta01
14 مه 2024
androidx.wear.compose:compose-*:1.4.0-beta01 منتشر شده است. نسخه 1.4.0-beta01 شامل این تعهدات است.
نسخه 1.4 بتا 01 آهنگسازی برای سیستم عامل Wear نشان می دهد که این نسخه از کتابخانه کامل است و API قفل شده است (به جز جایی که به عنوان آزمایشی مشخص شده است). Wear آهنگسازی 1.4 شامل عملکرد جدید زیر است:
- ما
Modifier.rotaryScrollableاضافه کرده ایم. rotaryscrollable ، یک اصلاح کننده جدید که رویدادهای چرخشی را با ظروف قابل پیمایش متصل می کند ، به کاربران امکان می دهد از طریق تاج یا یک حاشیه چرخان در دستگاه OS Wear خود حرکت کنند. علاوه بر این ،ScalingLazyColumnوPickerاکنون به طور پیش فرض از ورودی چرخشی پشتیبانی می کنند. برای پیکربندی یا رفتار SNAP از پارامترrotaryScrollableBehaviorاستفاده کنید. برای رفتار SNAP ، توصیه می شود SNAP را از طریق پارامترflingBehaviorو همچنین برای پیمایش لمسی تهیه کنید. -
SwipeDismissableNavHostاکنون یک انیمیشن ورودی برای انتقال درون برنامه را فراهم می کند. - اکنون هنگام نمایش یک صفحه نمایش به طور پیش
PositionIndicatorبه طور پیش فرض نشان داده می شود. -
SelectableChipوSplitSelectableChipبه عنوان تنوع درToggleChipاضافه شده اند - از این استفاده کنید تا باRadioButtonبرای ارائه معناشناسی قابل انتخاب به جای معناشناسی قابل جابجایی برای دسترسی استفاده کنید. -
ListHeaderاکنون از تنظیمات ارتفاع پشتیبانی می کند وقتی که محتویات به ارتفاع اضافی نیاز دارند تا اندازه های بزرگ فونت را در خود جای دهد.
رفع اشکال
- ما یک اشکال را برطرف کرده ایم که تراشه های قابل انتخاب اعلام کرده اند تا در هنگام انتخاب ، ضربه بزنید. ( i7ed88 )
نسخه 1.4.0-alpha08
1 مه 2024
androidx.wear.compose:compose-*:1.4.0-alpha08 منتشر شده است. نسخه 1.4.0-alpha08 شامل این تعهدات است.
تغییرات API
- ما تغییرات زیر را در API Rotary جدید ایجاد کرده ایم: تغییر
Modifier.rotaryتوسطModifier.rotaryScrollableرابطRotaryBehaviorبهRotaryScrollableBehaviorو عملکرد آنhandleScrollEventبهperformScrollتغییر نام داد.RotaryScrollableAdapterبهRotaryScrollableLayoutInfoProviderتغییر نام داد و خاصیتscrollableStateحذف کرد. ( i0c8a6 ) - ما تغییرات اضافی در Rotary API ایجاد کرده ایم: تغییر نام
RotaryScrollableLayoutInfoProviderبهRotarySnapLayoutInfoProvider(زیرا این ارائه دهنده فقط برای دوار با SNAP مورد نیاز است). نوع پارامترsnapOffsetرا درRotaryScrollableDefaults.snapBehavior snapOffsetاز int به DP تغییر داد. ( iddebe ) - ما به پارامتر
clickInteractionSourceدرSplitSelectableChipبهcontainerInteractionSourceتغییر نام داده ایم. ( IA8F84 ) - ما نام پارامتر Click Callback را برای
SplitSelectableChipبه روز کرده ایم - ازonClickبهonSelectionClickو ازonBodyClickبهonContainerClick. ( i32237 )
رفع اشکال
- ما بالشتک افقی را برای
PositionIndicatorبه 2DP (5DP) به روز کرده ایم ، تا یک اشکال را برطرف کنیم که در آنPositionIndicator(نوار پیمایش) با محتوای قابل پیمایش همپوشانی داشته باشد. لطفاً توجه داشته باشید که انتظار می رود این تغییر تصاویر موجود را شامل شود که به دلیل تغییر بالشتکPositionIndicatorشامل می شود. ( i57472 ) - ما با توصیف تفاوت بین دستگاه های چرخشی کم و RES HI-Res ، مستندات مربوط به API Rotary جدید را بهبود بخشیده ایم. ( i63abe )
- ما به یک استثناء خارج از حد در
SwipeDismissableNavHostپرداخته ایم که می تواند در هنگام مقادیر آلفا درون یابی کمتر از صفر باشد. ( IB75A1 ، B/335782510 )
نسخه 1.4.0-alpha07
17 آوریل 2024
androidx.wear.compose:compose-*:1.4.0-alpha07 منتشر شده است. نسخه 1.4.0-alpha07 شامل این تعهدات است.
تغییرات API
- ما
Modifier.rotaryاضافه کرده ایم ، یک اصلاح کننده جدید که رویدادهای چرخشی را با ظروف قابل پیمایش متصل می کند ، به کاربران امکان می دهد از طریق یک تاج یا یک صفحه چرخشی در دستگاه Wear OS خود حرکت کنند. علاوه بر این ،ScalingLazyColumnو Picker اکنون به طور پیش فرض از ورودی Rotary پشتیبانی می کنند ، با اضافه بار جدید که شامل پارامترrotaryBehaviorبرای مشخص کردن پیکربندی هر یک از پیمایش یا SNAP است. اگر پارامترrotaryBehaviorروی SNAP تنظیم شده است ، توصیه می شود SNAP را از طریق پارامترflingBehaviorنیز برای پیمایش لمسی تهیه کنید. ( i2ef6f ) - منابع
NestedScrollتو و توینگ و چرخیدن توسطUserInputجایگزین وSideEffectجایگزین می شوند تا برای تعریف گسترده این منابع که اکنون شامل انیمیشن ها (عوارض جانبی) و چرخ ماوس و صفحه کلید (UserInput) هستند ، جای بگیرد. ( i40579 ) - ما
SelectableChipوSplitSelectableChipرا اضافه کرده ایم تا تمایز بین کنترل های ضامن مانندSwitch/Checkboxو کنترل های قابل انتخاب مانندRadioButtonروشن تر شود. این جایگزین اضافه بار اضافه شده ازToggleChip/SplitToggleChipبا پارامترهایselectionControlاست. ( IA0217 ) - اصلاح کننده دید به روز شده از
IndeterminateStrokeWidthدر پیشرفت درProgressIndicatorDefaultsبه عموم. ( i5b5a4 )
نسخه 1.4.0-alpha06
3 آوریل 2024
androidx.wear.compose:compose-*:1.4.0-alpha06 منتشر می شود. نسخه 1.4.0-alpha06 شامل این تعهدات است.
رفع اشکال
- ما به عنوان بخشی از تلاش بیشتر برای مهاجرت رفتارهای چرخشی به Androidx از Horologist ، پیش نویس داخلی پشتیبانی چرخشی اضافه کرده ایم. ( i617d1 )
- ما به عنوان بخشی از تلاش بیشتر برای مهاجرت رفتارهای چرخشی به Androidx از Horrostic ، پیش نویس داخلی پشتیبانی از هاپتیک را اضافه کرده ایم. ( i5568a )
نسخه 1.4.0-alpha05
20 مارس 2024
androidx.wear.compose:compose-*:1.4.0-alpha05 منتشر شده است. نسخه 1.4.0-alpha05 شامل این تعهدات است.
تغییرات API
- ما خواص
initialCenterItemIndexوinitialCenterItemScrollOffsetرا از عمومیScalingLazyListStateعمومی ساخته ایم. ( I0C616 ) - ما
FullScreenStrokeWidthازProgressIndicatorDefaultsعمومی ساخته ایم. ( IBEA23 )
رفع اشکال
- ما با کاهش تعداد تماس های
layoutInfoازScalingLazyColumn، عملکردPositionIndicatorرا بهبود بخشیده ایم. ( IDC83D )
نسخه 1.4.0-alpha04
6 مارس 2024
androidx.wear.compose:compose-*:1.4.0-alpha04 منتشر شده است. نسخه 1.4.0-alpha04 شامل این تعهدات است.
تغییرات API
- ما یک اضافه بار جدید برای
ToggleChipوSplitToggleChipاضافه کرده ایم که به جای پارامترtoggleControl، یک پارامترselectionControlرا می گیرد. این باید با کنترلRadioButtonاستفاده شود تا به جای معانی قابل جابجایی برای دسترسی ، معنایی قابل انتخاب را ارائه دهد ( I1D6D9 ) - ما نام پارامتر را برای اضافه بار جدید
selectionControlازonSelectedبهonSelectبرایToggleChipوSplitToggleChip( I1A971 ) به روز کرده ایم.
نسخه 1.4.0-alpha03
21 فوریه 2024
androidx.wear.compose:compose-*:1.4.0-alpha03 منتشر شده است. نسخه 1.4.0-alpha03 شامل این تعهدات است.
تغییرات API
- بسته بندی
Modifier.inspectable. این API بیش از حد لازم از اصلاح کننده شما ایجاد می کند ، بنابراین اکنون استفاده از آن دلسرد می شود. در صورت تمایل به افشای ویژگی های اصلاح کننده در ابزار ، از توسعه دهندگان به اجرای روشinspectableProperties()درModifierNodeElementتشویق می شوند. ( IB3236 )
رفع اشکال
- ما یک اشکال اسناد را برای حاشیه نویسی
WearPreview*برطرف کرده ایم. ( id526d )
نسخه 1.4.0-alpha02
7 فوریه 2024
androidx.wear.compose:compose-*:1.4.0-alpha02 منتشر می شود. نسخه 1.4.0-alpha02 شامل این تعهدات است.
رفع اشکال
- ما یک اشکال را در کشش به آشکار برطرف کرده ایم ، جایی که با شروع به کشیدن یک مورد دیگر ، می توان با (و لغو) یک عمل متعهد را روی یک مورد تعامل کرد. ( IDE059 )
- ما
ListHeaderبرای پشتیبانی از تنظیمات ارتفاع به روز کرده ایم وقتی که محتویات به ارتفاع اضافی برای داشتن اندازه های بزرگ فونت نیاز دارند. ( i7290c ، b/251166127 )
نسخه 1.4.0-alpha01
24 ژانویه 2024
androidx.wear.compose:compose-*:1.4.0-alpha01 منتشر شده است. نسخه 1.4.0-alpha01 شامل این تعهدات است.
ویژگی های جدید
- ما انیمیشن ورودی را به
SwipeDismissableNavHostبرای انتقال درون برنامه اضافه کرده ایم. ( CFEB79a ) - اکنون هنگام نمایش یک صفحه نمایش به طور پیش
PositionIndicatorبه طور پیش فرض نشان داده می شود. این تغییر به منظور کمک به رعایت دستورالعمل های کیفیت سایش معرفی شد. متأسفانه ، این بدان معناست که تست های تصویر باید روی صفحه نمایش هایی که شاملPositionIndicatorاست ، به روز شود ، زیرا قبلاًPositionIndicatorنمایش داده نمی شد. ( 419CEF7 )
تغییرات API
- ما یک API جدید Ripple را در
wear:compose-materialandwear:compose-material3که جایگزینrememberRippleمستهلک شده است. همچنین یکCompositionLocalموقت موقت ،LocalUseFallbackRippleImplementationاستفاده می کند ، اما در صورت بازگشت اجزای مواد به استفاده از API های مستهلک شدهrememberRipple/RippleThemeبازگرداندن اجزای مواد. این در نسخه پایدار بعدی حذف خواهد شد و فقط در مواردی که در حال ارائه یکRippleThemeسفارشی هستید ، کمک به مهاجرت موقت است. برای اطلاعات مهاجرت و اطلاعات بیشتر در زمینه این تغییر ، به Developer.android.com مراجعه کنید. ( AF92B21 ) - ما
ColorSchemeبه روز کرده ایم که تغییر ناپذیر باشد ، و به روزرسانی های رنگ فردی کارآمدتر می شود ، اما استفاده متداول تر از رنگ ها را کارآمدتر می کند. استدلال در مورد این تغییر این است که اکثر برنامه ها به روزرسانی رنگهای فردی را به عنوان یک مورد اصلی استفاده نمی کنند. این هنوز هم امکان پذیر است اما بیشتر از گذشته بازخوانی خواهد کرد ، به نوبه خود ما به طور قابل توجهی میزان اشتراک های حالت را از طریق تمام کد مواد کاهش می دهیم و بر اولیه سازی و هزینه زمان اجرای موارد استفاده استاندارد تأثیر می گذارد. ( F5C48B7 ) - مواد سایش و سایش مواد 3 اجزای در معرض
MutableInteractionSourceدر API خود به روز شده اند تا در حال حاضر یکMutableInteractionSourceقابل تهی را که به طور پیش فرض برای تهی است ، در معرض دید قرار دهند. در اینجا هیچ تغییر معنایی وجود ندارد: عبور از تهی به این معنی است که شما مایل به بلند کردنMutableInteractionSourceنیستید و در صورت لزوم در داخل مؤلفه ایجاد می شود. تغییر در تهی به برخی از مؤلفه ها اجازه می دهد تا هرگز یکMutableInteractionSourceرا اختصاص ندهند ، و به سایر مؤلفه ها اجازه می دهد تا فقط در هنگام نیاز به تنبلی یک نمونه را ایجاد کنند و این باعث بهبود عملکرد در این مؤلفه ها می شود. اگر ازMutableInteractionSourceاستفاده نمی کنید که به این مؤلفه ها منتقل می کنید ، توصیه می شود به جای آن NULL را منتقل کنید. همچنین توصیه می شود که در مؤلفه های خود تغییرات مشابهی ایجاد کنید. ( F8FA920 ) - ما برای صرفه جویی در حالت قابل ارتقاء ،
rememberExpandableStateبه روز کرده ایم. این تضمین می کند که داده ها هنگام حرکت به صفحه دیگر ذخیره می شوند و هنگام بازگشت به صفحه اصلی بازسازی می شوند. ( 5C80095 )
رفع اشکال
- ما تنظیمات
ReduceMotionبرای استفاده از یک شنونده آگاه از چرخه عمر به روز کرده ایم. ( 7C6B122 ) - ما شنونده
TouchExplorationStateProviderرا به روز کرده ایم تا از چرخه عمر آگاه باشد ( BE28B01 ) - ما لایه MaterialCore را برای
CompactButtonبرای بهبود عملکرد حذف کرده ایم ( 25db8e9 ) - ما برای جلوگیری از استثنائات ،
BasicSwipeToDismissBoxبرای جبران خسارات نان قوی تر کرده ایم ( B983739 ) - ما
BasicSwipeToDismissBoxبه روز کرده ایم تا اطمینان حاصل کنیم که مقادیر آلفا در محدوده 0،1 قرار دارند - ما یک اشکال را در
ToggleButton،SplitToggleButton،Checkbox،SwitchوRadioButtonبرطرف کرده ایم تا اعلامیه های دسترسی تکرار نشوند (قبلاً نقش های معنایی کپی شده بودند) ( D11EEB7 )
نسخه 1.3
نسخه 1.3.1
3 آوریل 2024
androidx.wear.compose:compose-*:1.3.1 منتشر شده است. نسخه 1.3.1 شامل این تعهدات است.
رفع اشکال
- ما یک اشکال را در کشش به یک آشکار برطرف کرده ایم ، جایی که با شروع به کشیدن یک مورد دیگر ، می توان با (و لغو) یک اقدام متعهد را روی یک مورد انجام داد. ( IDE059 )
نسخه 1.3.0
24 ژانویه 2024
androidx.wear.compose:compose-*:1.3.0 منتشر می شود. نسخه 1.3.0 شامل این تعهدات است.
تغییرات مهم از 1.2.0
- کلاس
SwipeToDismissBoxState، شمارشSwipeToDismissValueوModifier.edgeSwipeToDismissاکنون در حال حاضر هر بخش از بستهandroidx.wear.compose.foundation، به جای بستهandroidx.wear.compose.material. این معماری به روز شده به شما امکان می دهد تا کنترل ژست را به طور مستقل از سایر ملاحظات طراحی پیاده سازی کنید. گردش کار طراحی مواد ، مانند استفاده از رنگ ها از یک موضوع پیکربندی شده ، به طور جداگانه اداره می شوند. - کلاسهای
SwipeToRevealCardوSwipeToRevealChipبه شما در اجرایrecommended swipe-to-reveal guidanceکمک می کنند. کلاسSwipeToRevealSampleنحوه استفاده از این مؤلفه ها را نشان می دهد. نسخه 1.3.0-alpha02 ما تغییراتی را ایجاد کرد که باعث می شود اشیاء
ChipوToggleChipدر ارتفاع رشد کنند تا از مقیاس گذاری فونت انتخاب شده کاربر بهتر پشتیبانی کنند. این می تواند باعث بروز برخی از قطع شود. برای رفع این مشکل ، شکلlargeبرایMaterialThemeاکنون از شعاع گوشه ای بزرگتر (26 dp به جای 24 dp) استفاده می کند. اشیاءChipوToggleChipاز این شعاع گوشه جدید برای جلوگیری از قطع محتوای در گوشه های تراشه وToggleChipاستفاده می کنند.- با توجه به ارتفاع پیش فرض 52 DP ، بیشتر
ChipsوToggleChipsبدون تغییر هستند. با این حال ، اشیاءChipوToggleChipکه حاوی چندین خط از متن برچسب اولیه یا ثانویه هستند ، یا ارتفاع آن بیش از حد است ، می تواند باعث شکسته شدن آزمایش های تصویر شود.
- با توجه به ارتفاع پیش فرض 52 DP ، بیشتر
تغییرات اضافی
برای یک مجموعه کامل تر از تغییرات معرفی شده در نسخه 1.3.0 ، به یادداشت های انتشار Beta01 مراجعه کنید.
توصیه هایی برای اجرای
- اگر برنامه شما به کاربران اجازه می دهد تا محتوای صفحه نمایش را مانند یک برنامه مبتنی بر نقشه بچرخانند ، با تنظیم
userSwipeEnabledبهfalseدرSwipeDismissableNavHost، دست زدن به کشویی را خاموش کنید و دکمه ای را شامل می شود که به کاربران امکان می دهد به صفحه قبلی بروند. - برای خاموش کردن انیمیشن ها برای یک نشانگر موقعیت در حین انیمیشن های محو و تغییر موقعیت در یک لیست پیمایش ، از یک شی
SnapSpecاستفاده کنید. - در حالی که منتظر بارگذاری یک برنامه رسانه ای برای بارگیری محتوا برای پخش هستید ، یک ترکیب
Placeholderخالی را نشان دهید. - برای ایجاد مجموعه ای از موارد قابل ارتقاء در صورت تقاضا ، با استفاده از کلاس
ExpandableStateMappingاستفاده کنید.
نسخه 1.3.0-RC01
10 ژانویه 2024
androidx.wear.compose:compose-*:1.3.0-rc01 منتشر شده است. نسخه 1.3.0-RC01 شامل این تعهدات است.
رفع اشکال
ما شکل بزرگ
MaterialThemeرا برای استفاده از شعاع گوشه ای 26DP به روز کرده ایم و این اکنون توسط Chip وToggleChipاستفاده می شود. این تغییر برای پشتیبانی از تنظیمات ارتفاع مورد نیاز است در حالی که محتویات به ارتفاع اضافی نیاز دارند تا اندازه های بزرگ فونت را در خود جای دهند - در غیر این صورت ، شکل استادیوم موجود برخی از محتوای متن را کلی می کند.شکل 1 : متن بریده شده در گوشه ها. شکل 2 : متن قطع نشده است. این تغییر ممکن است باعث شکستگی در تست های تصویر شود. ( i2e6ae )
نسخه 1.3.0-beta02
13 دسامبر 2023
androidx.wear.compose:compose-*:1.3.0-beta02 منتشر شده است. نسخه 1.3.0-beta02 شامل این تعهدات است.
رفع اشکال
- ما حرکت کشویی در نظر گرفته شده را در
BasicSwipeToDismissBoxبازیابی کرده ایم. این در نسخه قبلی تغییر یافته بود ، به گونه ای که قسمت اسلاید انتقال در حالی که انگشت در حال لمس صفحه بود ، رخ داده است. ( id8e76 )
نسخه 1.3.0-beta01
15 نوامبر 2023
androidx.wear.compose:compose-*:1.3.0-beta01 منتشر شده است. نسخه 1.3.0-beta01 شامل این تعهدات است.
نسخه 1.3 بتا 01 آهنگسازی برای سیستم عامل Wear نشان می دهد که این نسخه از کتابخانه کامل است و API قفل شده است (به جز جایی که به عنوان آزمایشی مشخص شده است). Wear Compose 1.3 شامل قابلیت های جدید زیر است:
-
SwipeToDismissBoxState،SwipeToDismissValueوModifier.edgeSwipeToDismissازandroidx.wear.compose.materialبهandroidx.wear.compose.foundationبه همراه اجرای زیر فشار به دیسمیس درBasicSwipeToDismissBoxمنتقل شده است. این اجازه می دهد تا حرکت ژست برای ضربه تند وشدید زدن به دیسمیس به طور مستقل از طراحی مواد ، به عنوان مثال ازSwipeDismissableNavHostدرandroidx.wear.compose.navigationاستفاده شود.SwipeToDismissBoxازandroidx.wear.compose.materialهنوز هم توصیه می شود که با طراحی مواد استفاده شود ، زیرا رنگ ها را ازMaterialThemeبیرون می کشد ، سپس اجرای باقی مانده را بهBasicSwipeToDismissBoxواگذار می کند. -
SwipeDismissableNavHostاکنون از یک پارامتر جدیدuserSwipeEnabledپشتیبانی می کند تا بتوانید دست زدن به کش رفتن را برای صفحه هایی که در آن لازم نیست خاموش کنید. -
BasicSwipeToDismissBoxبا استفاده ازHierarchicalFocusCoordinator، کنترل تمرکز را بهبود بخشیده است. -
SwipeToRevealدارای آهنگ های جدیدSwipeToRevealCardوSwipeToRevealChipدر مواد است که از راهنمایی UX توصیه شده برایCardوChipپیروی می کنند. همچنین پشتیبانی از عمل ثانویه دارد. -
DefaultTextStyleاکنون بالشتک قلم را خاموش می کند تا در پلتفرم Android سازگار باشد. -
ChipوToggleChipاکنون ارتفاع خود را تنظیم کنید تا محتوایی را که به دلیل فونت های بزرگ برای دسترسی رشد کرده است ، در خود جای دهد - اکنون
PositionIndicatorدارای مشخصات انیمیشن فردی برای انیمیشن های محو ، محو شدن و تغییر موقعیت است. به دلایل عملکرد ، توصیه می کنیم هنگام استفاده از لیست های قابل پیمایش ، تغییر مکان و تغییر موقعیت خاموش شود. -
ExpandableStateMappingروش جدیدی برای تولیدExpandableStatesدر صورت نیاز به ایجاد تقاضا و لزوماً با دامنه@Composableفراهم نمی کند. - اگر محتوای دیگر در حالت آماده نباشد ،
Placeholderاجازه می دهد تا تنظیم مجدد شود. همچنین ، تنظیم حرکت کاهش اکنون در مورد اثر لرزان و حرکت پاک کردن بر رویPlaceholderاعمال می شود.
مسائل شناخته شده
- در ابتدا هنگام نمایش صفحه نمایش ،
PositionIndicatorدر ابتدا نشان داده نمی شود. ما قصد داریم در اوایل 1.4 آلفا تغییر ایجاد کنیم تا در ابتدا نشان داده شود ، اما بدون هیچ انیمیشن.
تغییرات API
- ما به
SwipeToDismissBoxسطح بنیاد بهBasicSwipeToDismissBoxتغییر نام داده ایم. این باعث می شود تمایز بین مؤلفه سطح پایه و سطح موادSwipeToDismissBoxواضح تر شود. حالت دوم رنگها را ازMaterialThemeبرای استفاده در Scrims و نمایندگان اجرای باقی مانده را بهBasicSwipeToDismissBoxمنتقل می کند. ( ibecfc ) - ما
rememberExpandableStateMappingبه عنوان تجربی مشخص کرده ایم و عملکردexpandableItemبهبود بخشیده ایم. ( i5f6bc ) - ما کلاس
SwipeToRevealActionرا در کارتSwipeToRevealMaterial و API های تراشه با یک API مبتنی بر شکاف با استفاده ازSwipeToRevealPrimaryAction،SwipeToRevealSecondaryActionوSwipeToRevealUndoActionComposables جایگزین کرده ایم. لطفاً برای نمونه هایی در مورد نحوه استفاده از API جدید ، کد نمونه را مشاهده کنید. ( IA8943 ) - ما پرچم های انیمیشن
PositionIndicatorرا با پارامترهایAnimationSpecجایگزین کرده ایم. انیمیشن های فردی را می توان با عبورsnapبه عنوانAnimationSpecغیرفعال کرد. ( i6c523 )
رفع اشکال
- وقتی اندازه محدود است ، یک اشکال ایجاد شده توسط متن خمیده محدود را برطرف کرده ایم ( i50efe )
- ما به یک تصادف بالقوه NAN مربوط به
curvedComposable( I970EB ) پرداخته ایم - ما حذف انیمیشن برجسته تغییر موقعیت را در
PositionIndicatorبرگردانیم. ( IEB424 ) - ما برای بهبود عملکرد آن ، لایه هسته ای را برای تراشه مواد حذف کرده ایم. ( IF2DCB )
نسخه 1.3.0-alpha08
18 اکتبر 2023
androidx.wear.compose:compose-*:1.3.0-alpha08 منتشر شده است. نسخه 1.3.0-alpha08 شامل این تعهدات است.
تغییرات API
- ما پرچم های جداگانه را به اضافه بار
PositionIndicator، برای کنترل انیمیشن های مختلف اضافه کرده ایم:showFadeInAnimation،showFadeOutAnimationوshowPositionAnimation. API قبلی مستهجن شده و تماس های جدید را به طرف جدید ارسال کرده است. به دلایل عملکرد و برای قوام UX ، هنگامی که ازPositionIndicatorبا لیست قابل پیمایش استفاده می شود ، توصیه می کنیم پرچم هایshowFadeInAnimationوshowPositionAnimationخاموش کنید. اگرPositionIndicatorبه عنوان یک شاخص مستقل استفاده می شود ، به عنوان مثال برای تغییر حجم ، پس توصیه می کنیم هر 3 انیمیشن را روشن کنید. ( i44294 ) - ما به دنبال مهاجرت عملکرد کشش به دیسمیس به
wear.compose.foundation، ماSwipeToDismissBoxState،SwipeToDismissValueوedgeSwipeToDismissرا کاهش داده ایم. لطفاً معادل هایwear.compose.foundationرا جایگزین کنید. ( IEE8C9 )
رفع اشکال
- ما پروفایل های پایه برای Wear Foundation ، کتابخانه های مواد و ناوبری را به روز کرده ایم. ( IDB060 )
- ما یک تغییر رفتاری را برای
PositionIndicatorمعرفی شده در یک CL قبلی برگردانیم ، به گونه ای که هنگام نمایش یک صفحه نمایش ،PositionIndicatorمتحرک شد. ما قصد داریم در یک آلفای اولیه 1.4 تغییر مشابهی ایجاد کنیم ، به طوری که در ابتداPositionIndicatorنمایش داده می شود ، اما بدون هیچ انیمیشن. ( i41843 ) - ما به برخی از مشکلات عملکرد در
PositionIndicatorپرداخته ایم. ( i1c654 ، b/302399827 ) - ما عملکرد پیش فرض ارائه دهنده ارائه دهنده وضعیت اکتشاف Touch را بهینه کرده ایم تا به جای وضعیت مشتق شده به
State<Boolean>اعتماد کنیم. ( IEEC4D ) - ما مستطیل های
systemGestureExclusionرا برای Android 13 و بالاتر تنظیم کرده ایم. ( ib1f4b )
نسخه 1.3.0-alpha07
4 اکتبر 2023
androidx.wear.compose:compose-*:1.3.0-alpha07 منتشر شده است. نسخه 1.3.0-alpha07 شامل این تعهدات است.
تغییرات API
- ما برای کنترل انیمیشن های مختلف ، پرچم های جداگانه را به
PositionIndicatorاضافه کرده ایم:showFadeInAnimation،showFadeOutAnimationوshowPositionAnimation. API قبلی مستهجن شده و تماس های جدید را به طرف جدید ارسال کرده است. به دلایل عملکرد و برای قوام UX ، هنگامی که ازPositionIndicatorبا لیست قابل پیمایش استفاده می شود ، توصیه می کنیم پرچم هایshowFadeInAnimationوshowPositionAnimationخاموش کنید. اگرPositionIndicatorبه عنوان یک شاخص مستقل استفاده می شود ، به عنوان مثال برای تغییر حجم ، پس توصیه می کنیم هر 3 انیمیشن را روشن کنید. ( IA2D63 )
رفع اشکال
- ما با افزودن یک انیمیشن محو به متن عمل اصلی ، و محو شدن عمل ثانویه/تغییر مقیاس نماد در گسترش کامل کش رفتن ، پیشرفت هایی را برای نشان دادن حرکت انجام داده ایم. ( IB7223 )
- توصیه می شود که کشش برای آشکار کردن اقدامات در دسترس باشد و ما اقدامات دسترسی سفارشی را به کشش خود اضافه کرده ایم تا نمونه ها را آشکار کنیم. ( i42224 )
- ما عملکرد
SwipeToDismissBoxرا بهبود بخشیده ایم ، از جمله اصلاح مجدد برای اطمینان از اینکه منطق اولیه باعث ایجاد مجدد نمی شود.SwipeToDismissBoxاکنون به عنوان اندازه تمام صفحه ترسیم شده است. ( IE0AA2 ) - ما وقتی که به
PositionIndicatorنادرست از بین رفت ، یک اشکال برطرف کرده ایم. ( i2091a ) - عملکرد بهبود یافته
PositionIndicatorبا بهینه سازی مجدد. پرچم های جدید برای کنترل انیمیشن ها (fadeIn،fadeOutوpositionChange) متعاقباً اضافه شده اند (به تغییرات API مراجعه کنید) ( IFAC7D ) - ما تست های میکروبیچارک را برای
PositionIndicatorاضافه کرده ایم ( IDF875 )
نسخه 1.3.0-alpha06
20 سپتامبر 2023
androidx.wear.compose:compose-*:1.3.0-alpha06 منتشر شده است. نسخه 1.3.0-alpha06 شامل این تعهدات است.
رفع اشکال
- ما پشتیبانی از
Modifier.edgeSwipeToDismissرا اضافه کرده ایم. EdgesWipetodismiss باSwipeToReveal. ( i95774 ، b/293444286 ) - ما نمونه هایی را برای مواد
SwipeToRevealChipوSwipeToRevealCardاضافه کرده ایم. ( IEB974 ) - ما پروفایل های پایه را برای بنیاد آهنگسازی و کتابخانه های مواد به روز کرده ایم. ( i1dd1f )
نسخه 1.3.0-alpha05
6 سپتامبر 2023
androidx.wear.compose:compose-*:1.3.0-alpha05 منتشر شده است. نسخه 1.3.0-alpha05 شامل این تعهدات است.
رفع اشکال
- ما به سمت کشش اضافه کرده ایم تا فاش شود به طوری که فقط یک مورد در یک زمان قابل جابجایی است. ( i3cd7a )
- مستندات
ScalingLazyColumnDefaultsرا بهبود بخشید تا بهتر رفتار واقعی آن را مطابقت دهد. ( i886d3 )
نسخه 1.3.0-alpha04
23 آگوست 2023
androidx.wear.compose:compose-*:1.3.0-alpha04 منتشر شده است. نسخه 1.3.0-alpha04 شامل این تعهدات است.
ویژگی های جدید
- ما برای اقدام ثانویه
SwipeToRevealپشتیبانی خنثیسازی کرده ایم. ( i7a22d )
تغییرات API
- اضافه کردن
HorizontalPageIndicatorدر کتابخانه Sear Material3. ( IFEE99 ) - به روز شده سایش ابزار پیش نمایش را برای استفاده از کتابخانه
androidx.wear.tooling.preview. ( IB036E )
رفع اشکال
- یک اشکال را در دکمه های گرد برطرف کنید که اصلاح کننده ها به درستی زنجیر نشده اند. ( i5e162 )
نسخه 1.3.0-alpha03
9 آگوست 2023
androidx.wear.compose:compose-*:1.3.0-alpha03 منتشر می شود. نسخه 1.3.0-alpha03 شامل این تعهدات است.
تغییرات API
- ما دو ترکیب جدید را در مواد برای اجرای
SwipeToRevealبا کارت و تراشه اضافه کرده ایم. این ترکیبات از راهنمایی UX توصیه شده در مورد این مؤلفه پیروی می کنند و اجرایSwipeToRevealبا اجزای موجود در مواد سایش آسان تر می کنند. ( i7ec65 ) - ما حاشیه نویسی
FloatRangeرا به عنوان محدودیت های API روشن کرده ایم ، که قبلاً در نظرات بیان شده بود. ( ICB401 )
رفع اشکال
- ما منطق پیمایش اولیه
ScalingLazyColumnرا در داخلonGloballyPositioned()جابجا کرده ایم. ( IC90F1 ) - اکنون برای بهینه سازی تخصیص سکته مغزی
drawWithCacheدرPositionIndicator،ProgressIndicatorوSelectionControlsاستفاده می کنیم. ( i5f225 ، b/288234617 ) - ما در حالت های معلولیت ، دید کادر ثابت را نشان می دهیم. ( IB25BF )
- ما
Placeholderبه روز کرده ایم تا اجازه دهید مجدداً تنظیم مجدد محل را نشان دهد اگر محتوای دیگر در حالت آماده نباشد. ( IBD820 ) - ما برخی از تست های پوسته
Placeholderپوسته پوسته شده را انجام داده ایم ( IDB560 )
نسخه 1.3.0-alpha02
26 جولای 2023
androidx.wear.compose:compose-*:1.3.0-alpha02 is released. Version 1.3.0-alpha02 contains these commits.
تغییرات API
- We have provided
ExpandableStateMapping, a new way to generateExpandableStates, for cases in which they need to be created on demand, not necessarily within a@Composablescope ( Iff9e0 ) -
SwipeToDismissBoxhas been migrated fromandroidx.wear.compose.materialtoandroidx.wear.compose.foundationpackage. ( I275fb ) - Updated API files to annotate compatibility suppression. ( I8e87a , b/287516207 )
- We have made the height constants for
Chip,CompactChipandToggleChippublic ( Idbfde ) - We have made the horizontal and vertical paddings for
ChipandCompactChippublic. ( Ieeaf7 ) - Added functionality to turn off swipe handling in
SwipeDismissableNavHostvia the newuserSwipeEnabledparameter. ( Id2a0b , b/230865655 ) - We have updated the Wear Compose Navigation library to use the new
SwipeToDismissBoxfrom Wear Compose Foundation. ( I4ff8e )
رفع اشکال
- We have fixed a z-order bug where
expandedItemdid not show the correct content after clicking a button's behavior when they have buttons. ( I1899d , b/289991514 ) - Improve focus handling of
SwipeToDismissBox(and henceSwipeDismissableNavHost) using theHierarchicalFocusCoordinator( I45362 , b/277852486 ) - We have made a fix to the gesture handling in
SwipeableV2. ( I89737 ) - We have finalized the baseline profiles for our 1.2 release. ( Id5740 )
- Following the migration of
SwipeToDismissBoxto Foundation, the MaterialSwipeToDismissBoximplementation now forwards to Foundation and supplies default color values from its theme.( If8451 ) - We have added heading semantics to
ListHeader. ( Ic5420 ) -
ChipandToggleChipwill now adjust their height to accommodate content that has grown due to large fonts for accessibility, when required. ( Iaf302 ) - Fixed a bug in the semantic role of
SplitToggleChip's tappable area, for accessibility. ( Ieed3a ) - The reduce motion setting now turns off the shimmering effect and wipe-off motion on placeholders. ( I91046 )
-
StepperandInlineSlidernow support repeated clicks on long press so that you can quickly increase/decrease value ofStepperandInlineSliderby holding the + or - buttons. ( I27359 )
Version 1.3.0-alpha01
21 ژوئن 2023
androidx.wear.compose:compose-*:1.3.0-alpha01 is released. Version 1.3.0-alpha01 contains these commits.
رفع اشکال
- As announced in
1.2.0-alpha07and1.2.0-alpha10, we are now changing theDefaultTextStyleto turn off font padding to be consistent across the Android Platform. This will address some cases of text clipping with large font sizes and may also impact screen layouts, so that screenshot tests need to be updated. For example, we see text clipping here ( Ic6a86 )

- It is no longer present when font padding is turned off:

- We have updated
wear.compose.foundationto be an API dependency ofwear.compose.material( I72004 , b/285404743 ) - We have fixed a bug in
SwipeToDismissBox. Background and content keys are now passed to the remember block so that new modifiers are created when the content or background changes. ( Ib876c , b/280392104 ) - We have updated
TimeTextto use the locale when choosing the format for 12 or 24 hour time. ( If4a3d ) - We have fixed an inconsistency in
SwipeToDismissBoxcontentScrimColordefault parameters. ( I2d70f ) - We have improved the motion handling in
SwipeToReveal. ( I28fb7 )
مسائل شناخته شده
- Supporting user-configured font sizes is an accessibility requirement. We know that multiline Chips can lead to text-clipping when displayed with large font sizes, so we will be updating Chip in an early 1.3 alpha version to make height adjustments in those cases.
نسخه 1.2
نسخه 1.2.1
18 اکتبر 2023
androidx.wear.compose:compose-*:1.2.1 is released. Version 1.2.1 contains these commits.
رفع اشکال
- Fixed a bug when the
PositionIndicatorincorrectly disappeared. ( 7a167f )
نسخه 1.2.0
9 آگوست 2023
androidx.wear.compose:compose-*:1.2.0 is released. Version 1.2.0 contains these commits.
Important changes since 1.1.0
- Stable release of Compose for Wear OS 1.2.0 ( read more )
- For a list of the key changes in Wear Compose 1.2, see the release notes for ( Compose for Wear OS 1.2 Beta01 )
Version 1.2.0-rc01
26 جولای 2023
androidx.wear.compose:compose-*:1.2.0-rc01 is released. Version 1.2.0-rc01 contains these commits.
رفع اشکال
- We have finalized the baseline profiles for our 1.2 release ( Id5740 )
Version 1.2.0-beta02
7 ژوئن 2023
androidx.wear.compose:compose-*:1.2.0-beta02 is released. Version 1.2.0-beta02 contains these commits.
ویژگی های جدید
- We have added the new experimental
LocalReduceMotionCompositionLocalvariable which disables scaling and fading onScalingLazyColumn. ( I58024 )
رفع اشکال
- We have updated the baseline profiles for the wear compose foundation and material libraries( I4725d )
- We have fixed an inconsistency in the default values for
SwipeToDismissBoxcontentScrimColorparameters ( I2d70f ) - We have fixed the
DefaultTextStyledefault value used for theIncludeFontPaddingsetting ( I737ed )
Version 1.2.0-beta01
24 مه 2023
androidx.wear.compose:compose-*:1.2.0-beta01 is released. Version 1.2.0-beta01 contains these commits.
What's in Compose for Wear OS 1.2
The 1.2-beta01 release of Compose for Wear OS indicates that this release of the library is feature complete and the API is locked (except where marked as experimental). Wear Compose 1.2 includes the following new functionality:
-
expandableItemandexpandableItemsare two newFoundationcomponents that support expanding items within aScalingLazyColumn. UseexpandableItemfor a single expandable item, such as Text in which the number of lines. UseexpandableItemsfor a group of expandable items andexpandableButtonto simplify creating a button that collapses after the content is expanded. -
HierarchicalFocusCoordinator- this experimental composable enables marking sub-trees of the composition as focus enabled or focus disabled. -
Picker- the API now includesuserScrollEnabledto control whether the picker is active for user scrolling. -
PickerGroup- a new composable for handling multiple pickers together. It handles focus between the pickers using theHierarchicalFocusCoordinatorAPI and enables auto-centering of picker items. -
Placeholder- we have made updates to the shimmer and 'Wipe Off' animations. The wipe-off effect is now immediately applied when the content is ready. -
ScalingLazyColumn- we have migratedScalingLazyColumnand associated classes fromandroidx.wear.compose.material.ScalingLazyColumntoandroidx.wear.compose.foundation.lazy.ScalingLazyColumn. Please update to use theFoundation.Lazyversion. -
SwipeToReveal- we have added experimental support for swipe-to-reveal as a means to access secondary actions, supplementing the existing 'long press' pattern. -
Stepper- now has an overload with an additionalenableRangeSemanticsparameter to facilitate disabling the default range semantics. -
Previews- we have added the following custom annotations for previewing composables on Wear screens:WearPreviewSmallRoundpreviews the composable on a small, round device;WearPreviewLargeRoundpreviews the composable on a large round device;WearPreviewSquarepreviews the composable on a square device. Also, the following and multi-preview annotations:WearPreviewFontScalespreviews the composables on a wear device with multiple font sizes, whileWearPreviewDevicespreviews the composables on different wear devices. - We have added a
DefaultTextStyleto Wear Compose which defaults thePlatformTextStyle.includeFontPaddingproperty to true (this is the current setting). This will allow us to synchronize turning off font padding by default with the Compose libraries in an early 1.3 alpha version - see 1.2.0-alpha10 for more information.
ویژگی های جدید
- We have added experimental support for disabled scaling and fading animation when reduce_motion setting is switched on. ( I58024 )
رفع اشکال
- Improved documentation for
angularWidthDpinCurvedSize.kt( Iab75c ) -
SwipeDismissableNavHostnow logs a warning with potential causes of empty backstack. This is done to prevent unexpected crashes caused because ofIllegalArgumentExceptionwhich was thrown when the backstack was empty. ( I04a81 , b/277700155 )
Version 1.2.0-alpha10
10 مه 2023
androidx.wear.compose:compose-*:1.2.0-alpha10 is released. Version 1.2.0-alpha10 contains these commits.
ویژگی های جدید
- We have added support for Swipe to Reveal, as a means to access secondary actions. This pattern supplements the 'long press' pattern, the existing way a user could reveal (different) secondary actions. ( I60862 )
تغییرات API
- We have added
RevealScopeto action composables inSwipeToReveal, which gives access to the offset at which additional actions are revealed. ( I3fd56 )
رفع اشکال
- Fixed an issue with
ScalingLazyColumnbeing stuck on Wear API 33 after fling ( Ic4599 ) - We have made some performance improvements to
PositionIndicatorfor jank reduction. ( I35e92 ) - We have fixed a bug in Chip and
CompactChipwhere the semantic role was no longer being set toRole.Button. ( I93f91 , b/277326264 )
مسائل شناخته شده
We have identified a bug in Android Studio which causes failure in rendering preview when annotated with @WearPreviewDevices and @WearPreviewFontScales - a fix is planned for release soon. Please note that the other wear preview annotations work as intended in Android Studio Giraffe 2022.3.1 and beyond.
In version 1.2.0-alpha07 we added DefaultTextStyle to Wear Compose, maintaining the existing PlatformTextStyle.includeFontPadding value as true - for background, see Fix font padding in Compose . We will be changing the DefaultTextStyle to turn off font padding in an early 1.3 alpha version, to be consistent across the Android Platform. This will address some cases of text clipping with large font sizes and may also impact screen layouts, so that screenshot tests need updating. For example, with large font sizes we see text clipping here:

- It is no longer present when font padding is turned off:

The new setting can be adopted now by overriding the typography in your theme - see example code .
Version 1.2.0-alpha09
19 آوریل 2023
androidx.wear.compose:compose-*:1.2.0-alpha09 is released. Version 1.2.0-alpha09 contains these commits.
تغییرات API
- Add
angularSizeDpto theCurvedModifierapi for setting angular width in DP ( I89a52 )
رفع اشکال
- We have fixed accessibility issues in our time picker demos( Id0eb7 )
Version 1.2.0-alpha08
5 آوریل 2023
androidx.wear.compose:compose-*:1.2.0-alpha08 is released. Version 1.2.0-alpha08 contains these commits.
تغییرات API
- We have renamed
ExpandableItemsStatetoExpandableState. ( If85ea ) - We have added
expandableButtonto simplify creating a button that collapses when the content is expanded and also updated the expandables examples. ( Iae309 )
رفع اشکال
- Improved expandable samples to show more possibilities. Modified animation of
expandableItemto keep its content centered through the animation. ( I2f637 ) - Updated
ToggleControlsto avoid extra recompositions when manually animating the colors using State. ( I5d319 )
Version 1.2.0-alpha07
22 مارس 2023
androidx.wear.compose:compose-*:1.2.0-alpha07 is released. Version 1.2.0-alpha07 contains these commits.
تغییرات API
- We have moved the Expandable Item components (added in 1.2.0-alpha06) from material to foundation, since they had no meaningful reference to the
MaterialTheme. ( Ib0525 )
رفع اشکال
- We have fixed a crash that occurred in a screen using
PickerGroup, by ensuring thatPickerGrouphandles focus correctly when no Picker has the focus. Also added support for RSB scrolling in our Picker demos. ( If8c19 ) - We have improved the dialog transitions - the intro transition is now smoother to match the outro transition. ( Ib5af9 )
- We have added a
DefaultTextStyleto Wear Compose which defaults thePlatformTextStyle.includeFontPaddingproperty to true (this is the current setting). This will allows us to synchronize turning off font padding by default with the Compose libraries in the future - see ( Fix font padding in Compose ) for background. ( I2aee8 ) - Reverted an
UpsideDownCakepreview dependency via activity-compose that blocked publishing apps to the Google Play Store. ( I6443d )
Version 1.2.0-alpha06
8 مارس 2023
androidx.wear.compose:compose-*:1.2.0-alpha06 is released. Version 1.2.0-alpha06 contains these commits.
تغییرات API
- Add
CurvedBoxcomponent, which places components on top of each other in the curved world. ( I29200 ) - Added Expandable Item(s) - two new components to support either a group of expandable items in a
ScalingLazyColumn, or an expandable single item, such as Text in which the number of lines expands. ( I95dd5 ) - We have added the following custom annotations for previewing composables on Wear screens:
WearPreviewSmallRoundpreviews the composable on a small, round device;WearPreviewLargeRoundpreviews the composable on a large round device;WearPreviewSquarepreviews the composable on a square device. Also, the following and multi-preview annotations:WearPreviewFontScalespreviews the composables on a wear device with multiple font sizes, whileWearPreviewDevicespreviews the composables on different wear devices. To use these previews, you must be using the latest Android Studio (Giraffe Canary 6) or beyond. Please note that if these annotations do not suit your purpose, Preview can still be used and supports further customisations via parameters. ( I397ff ) - We have marked
HierarchicalFocusCoordinatoras experimental while it is considered as a candidate to be moved into core compose libraries, given its wide applicability. ( I3a768 )
رفع اشکال
- Fixed a bug on
HierarchicalFocusCoordinator, when the lambda passed in for thefocusEnabledparameter is changed, we now correctly use the new one. ( Icb353 ) - We have updated the default disabled content color to Background when using primary colors as the background in
Button,CompactButton,Chip,CompactChipandToggleButton. This improves the contrast for accessibility. ( I527cc )
Version 1.2.0-alpha05
22 فوریه 2023
androidx.wear.compose:compose-*:1.2.0-alpha05 is released. Version 1.2.0-alpha05 contains these commits.
تغییرات API
- Updated
PickerGroupAPI to allow propagating the min constraints to the composable optionally. When set as true, the minimum constraints passed from the parent composable will be allowed on thePickerGroup. If set as false,PickerGroupwill reset the minimum constraints. ( I3e046 ) - We have added
animateScrollToOptionto the Picker API in order to support programmatic animation to a specific Picker option ( I6fe67 )
رفع اشکال
- We have updated
HorizontalPageIndicatorto support right-to-left layouts. ( Ia4359 ) - Added Screenshot tests for right-to-left layout in
HorizontalPageIndicator( I6fbb8 ) - Added further tests to
SwipeDismissableNavHostTestthat useTestNavHostController( I61d54 )
Version 1.2.0-alpha04
8 فوریه 2023
androidx.wear.compose:compose-*:1.2.0-alpha04 is released. Version 1.2.0-alpha04 contains these commits.
ویژگی های جدید
-
PickerGroupfor handling multiple pickers together using the focus API. It handles the focus between the different pickers, enables auto-centering of the pickers based on parameters and allows developers to change the focus between different pickers while handling the events from the group. In talkback mode, thePickerGrouphandles the talkback focus by moving the focus to the selected Picker from the group. ( I60840 )
تغییرات API
- We have added an overload to Stepper with an additional
enableRangeSemanticsparameter in order to facilitate disabling the default range semantics ( Ia61d4 )
رفع اشکال
- Allow
ScalingLazyColumnto be nested within a horizontally scrolling page ( Iec3f8 , b/266555016 ) - Improvement of Stepper kdocs and
StepperTesttests clean-up. ( Ic118e ) - Updated
androidx.navigationdependency to version 2.5.3 ( If58ed )
Version 1.2.0-alpha03
25 ژانویه 2023
androidx.wear.compose:compose-*:1.2.0-alpha03 is released. Version 1.2.0-alpha03 contains these commits.
تغییرات API
- We have migrated
ScalingLazyColumn(and associated classes) fromandroidx.wear.compose.material.ScalingLazyColumntoandrdoidx.wear.compose.foundation.lazy.ScalingLazyColumn(see this example for migration). This new location more closely matches that ofcompose.foundation.lazy.LazyColumnand is more natural as it is not an opinionated Material component. The change is happening now in preparation for a new Material3 library, which we will be working on in parallel with the existing Material library. ( I060e7 )
The following changes are part of the ScalingLazyColumn migration from Material to Foundation.Lazy :
-
PositionIndicatorapis targeting MaterialScalingLazyColumnhave been deprecated - please update toFoundation.Lazy ScalingLazyColumn. AdditionallyanchorTypefield was added toScalingLazyListLayoutInfo. ( I29d95 ) -
ScalingLazyColumnhas been marked as deprecated in the Wear Compose Material package ( I16d34 ) - We have updated the
ScrollAwaymodifier to useScalingLazyListStatefrom Wear ComposeFoundation.Lazyand deprecated the overload that tookScalingLazyListStatefrom Wear Compose Material. ( Ifc42c ) - We have updated the Dialog APIs to use
ScalingLazyListStatefromFoundation.Lazyand deprecated the overloads that used MaterialScalingLazyListState( Ic8960 ) - We have updated the Picker APIs to use
ScalingParamsfromFoundation.Lazyand deprecated the overloads that used MaterialScalingParams. ( Idc3d8 )
رفع اشکال
- We have fixed a bug that caused unnecessary recompositions in
ScalingLazyListState.centerItemIndexby ensuring that it only pushes updates when the value actually changes ( Ia9f38 ) - We have improved the performance of
SwipeToDismissBox( I3933b ) - Added benchmark tests for
ScalingLazyColumnin Wear Compose Foundation ( Ie00f9 ) - We have updated some internal
ScalingLazyColumnclasses methods in Material to use their equivalents fromFoundation.Lazy( I38aab ) - We have fixed some issues in Picker tests and add more tests for checking scroll with offset ( I6ac34 )
- We migrated the
ScalingLazyColumnIntegration Demos to depend onFoundation.Lazyinstead of MaterialScalingLazyColumn( Ic6caa ) - We have added optional
fromDate/toDateparameters to ourDatePickerdemo ( I961cd )
Version 1.2.0-alpha02
11 ژانویه 2023
androidx.wear.compose:compose-*:1.2.0-alpha02 is released. Version 1.2.0-alpha02 contains these commits.
تغییرات API
- Android Compose UI tests will now run layout passes for each frame when executing frames to get to idle (eg via
waitForIdle). This may affect tests that assert on individual frames of layout animations. ( I8ea08 , b/222093277 ) - The parameter
minLinesis added to Wear Text for consistent behaviour withBasicText( I24874 ) -
CompactChipTapTargetPaddinghas been made public so that it appears in the documentation ( If1e70 , b/234119038 )
رفع اشکال
- Disable multiplatform builds for
wear.composepackages ( Iad3d7 ) - Fix kdocs for
scrollToOption( I6f9a0 ) -
PlaceholderState.rememberPlaceholderState()updated to userememberUpdatedStateto that the state will update if theonContentReadylambda. ( I02635 , b/260343754 ) - We have fixed a text jittering issue seen in the
Pickercomponent by leveraging the new compositing strategy added toModifier.graphicsLayer. ( I99302 ) - We have fixed a bug that caused flickering in our
DatePickerdemo ( I660bd ) - We have improved the accessibility for the 12-hour time and date picker demos ( I05e12 )
- We have updated our time and date picker demos so that the pickers are not affected by RSB changes when unselected ( I4aecb )
Version 1.2.0-alpha01
7 دسامبر 2022
androidx.wear.compose:compose-*:1.2.0-alpha01 is released. Version 1.2.0-alpha01 contains these commits.
ویژگی های جدید
- We've updated the experimental Placeholder functionality so that the “Wipe Off” effect is immediately applied when the content is ready rather than waiting for the next animation loop to start. We have also made some updates to the shimmer and wipe off animations. ( I5a7f4 )
تغییرات API
- We have added a
HierarchicalFocusCoordinatorcomposable to enable marking sub-trees of the composition as focus enabled or focus disabled.( I827cb ) - We have added a new property to override the semantic role for
ToggleButton.( I67132 ) - We have updated
TimeTextDefaults.TimeFormat12Hoursto remove AM/PM inTimeText. This will change the default value oftimeSourceparameters inTimeTextAPI. ( I1eb7f ) - We have extended the Picker API to improve accessibility for screens with multi-picker. There is a new property
userScrollEnabledto control whether the picker is active for user scrolling. ( I3c3aa )
رفع اشکال
- We have changed the default border width for an
OutlinedButton/OutlinedCompactButtonfrom 2.dp to 1.dp to match final UX specs. ( Icf84d ) - In order to reduce the effect of the first item added to an empty
ScalingLazyColumnappearing to scroll into place we have added an estimatedautoCentering topPaddingwhen the contents are empty. This change calculates the amount of top padding needed by assuming an initial item of height 0.dp. ForScalingLazyListAnchorType.ItemStartthis will calculate the correct top padding, forScalingLazyListAnchorType.ItemCenterthis calculation will be incorrect as the height of the items is needed to correctly size the contents resulting in a small scroll into place effect based on the items real height.( I239a4 ) - We have updated the background scrim applied to the
SwipeToDismissanimation to match the Wear platform. ( I9003e ) - We have fixed
PositionIndicatorhandling ofLazyListStateandScalingLazyListStatefor list items of size 0 to avoid divide by zero errors.( Ic28dd )
نسخه 1.1
نسخه 1.1.2
8 فوریه 2023
androidx.wear.compose:compose-foundation:1.1.2 , androidx.wear.compose:compose-material:1.1.2 , and androidx.wear.compose:compose-navigation:1.1.2 are released. Version 1.1.2 contains these commits.
رفع اشکال
- We have fixed a bug that caused unnecessary recompositions in
ScalingLazyListState.centerItemIndexby ensuring that it only pushes updates when the value actually changes ( Ia9f38 )
نسخه 1.1.1
11 ژانویه 2023
androidx.wear.compose:compose-foundation:1.1.1 , androidx.wear.compose:compose-material:1.1.1 , and androidx.wear.compose:compose-navigation:1.1.1 are released. Version 1.1.1 contains these commits.
رفع اشکال
-
PlaceholderState.rememberPlaceholderState()updated to userememberUpdatedStateto that the state will update if theonContentReadylambda. ( I02635 , b/260343754 )
نسخه 1.1.0
7 دسامبر 2022
androidx.wear.compose:compose-foundation:1.1.0 , androidx.wear.compose:compose-material:1.1.0 , and androidx.wear.compose:compose-navigation:1.1.0 are released. Version 1.1.0 contains these commits.
Important changes since 1.0.0
- Stable release of Compose for Wear OS 1.1.0 ( read more ).
- For a list of the key changes in Wear Compose 1.1 see the release notes for ( Compose for Wear OS 1.1 Beta01 ).
ویژگی های جدید
- We've updated the experimental Placeholder functionality so that the “Wipe Off” effect is immediately applied when the content is ready rather than waiting for the next animation loop to start. We have also made some updates to the shimmer and wipe off animations. ( I5a7f4 )
رفع اشکال
- We have changed the default border width for an
OutlinedButton/OutlinedCompactButtonfrom 2.dp to 1.dp to match final UX specs. ( Icf84d ) - In order to reduce the effect of the first item added to an empty
ScalingLazyColumnappearing to scroll into place we have added an estimatedautoCentering topPaddingwhen the contents are empty. This change calculates the amount of top padding needed by assuming an initial item of height 0.dp. ForScalingLazyListAnchorType.ItemStartthis will calculate the correct top padding, forScalingLazyListAnchorType.ItemCenterthis calculation will be incorrect as the height of the items is needed to correctly size the contents resulting in a small scroll into place effect based on the items real height.( I239a4 ) - We have updated the background scrim applied to the
SwipeToDismissanimation to match the Wear platform.( I9003e ) - We have fixed
PositionIndicatorhandling ofLazyListStateandScalingLazyListStatefor list items of size 0 to avoid divide by zero errors.( Ic28dd )
Version 1.1.0-rc01
9 نوامبر 2022
androidx.wear.compose:compose-foundation:1.1.0-rc01 , androidx.wear.compose:compose-material:1.1.0-rc01 , and androidx.wear.compose:compose-navigation:1.1.0-rc01 are released. Version 1.1.0-rc01 contains these commits.
رفع اشکال
- We have added baseline profile rules for
Placeholders,ScrollAway,RadioButton,Switch,Checkbox,OutlinedButton,OutlinedCompactButton,OutlinedChipandOutlinedCompactChip. ( I8249c ) - We have fixed a bug in
Modifier.scrollAwayso that if the specifieditemIndexis invalid (for example, if that item index is out of range), then theTimeTextwill now still be displayed. ( I2137a ) - We have updated the
SwipeToDismissBoxanimation to match the platform implementation. After the initial squeeze animation, the screen now slides off to the right once the dismissal has been triggered. ( I41d34 ) - As an optimization, we have updated
Modifier.scrollAwayto only read thescrollStateinside the measure block to avoid recomposing the modifier after each remeasure. ( I4c6f1 ) - We have added documentation and a sample to placeholders to show the correct ordering for
Modifier.placeholderandModifier.placeholderShimmerwhen applied to the same composable. ( Ie96f4 , b/256583229 ) - We have changed the default border width for an
OutlinedCompactChip/OutlinedChipfrom 2.dp to 1.dp to match final UX specs. ( Ib3d8e ) - We have fixed a bug in
rememberPickerStatewhere updated inputs were not saved, so that composables were not updated after changes to the inputs. ( I49ff6 , b/255323197 ) - We have made some UI updates to the placeholders, 1) change the shimmer gradient to 1.5x the screen size, 2) add easing (cubic bezier) of the shimmer progression and 3) speed up the wipe-off animation (250ms). ( Id29c1 )
- We have corrected a UI bug in the placeholder wipeOff effect where Chip and Card backgrounds were wiping off slightly early due to not taking the component's position on screen into account. ( I2c7cb )
- We have updated the placeholder background drawing to merge colors rather than layer them where possible to reduce the risk of alpha blending of the different cropped layers from allowing underlying colors to bleed through at the placeholder background edges. ( I2ea26 )
- We have corrected the calculation of
ScalingLazyListState.centerItemIndex/centerItemOffsetso that if two items sit either side of the viewport center line the one that is closest will be considered as thecenterItem. ( I30709 , b/254257769 ) - We have corrected a bug in the
ScalingLazyListState.layoutInfo.visibleItemsInfowhich was reporting incorrect offsets duringScalingLazyColumninitialization. Now an empty list will be returned until all list items are visible and have the correct offsets. Check forScalingLazyListState.layoutInfo.visibleItemsInfo.isNotEmpty()will confirm that theScalingLazyColumninitialization is complete and items are visible. ( I3a3b8 )
Version 1.1.0-beta01
24 اکتبر 2022
androidx.wear.compose:compose-foundation:1.1.0-beta01 , androidx.wear.compose:compose-material:1.1.0-beta01 , and androidx.wear.compose:compose-navigation:1.1.0-beta01 are released. Version 1.1.0-beta01 contains these commits.
What's in Compose for Wear OS 1.1
The 1.1.0-beta01 of Compose for Wear OS indicated that this release of the library is feature complete and the API locked.
- Wear Compose 1.1 release includes the following new functionality:
- Picker - Accessibility improvements to Picker so that multi-picker screens are navigable with screen readers and the content description is accessible
- Picker
contentDescriptionparameter is now used only for the selected Picker option and takes a nullable String (in the previous commit, it was necessary to pass a mapping from option to the content description, but only the selected option was used). - Picker items are now always center-aligned, fixing a bug when setting
gradientRatioto zero had the side-effect of changing the alignment. -
Chip/ToggleChip- We have updated the default gradients forChip/ToggleChipto bring them in line with the latest UX spec.ChipDefaults.gradientBackgroundChipColorshas been updated to start from 50% of primary rather than 32.5%. -
Chip/ToggleChip- Added overloads for modifying Chip shapes -
Chip/Button/ToggleButton- Added a new outlined style for Chips and Buttons and newOutlinedChipandOutlinedButtoncomposables that provide a transparentChip/Buttonwith a thin border. - Card - Updated the default gradients for Cards to bring them in line with the latest UX spec.
CardDefaults.cardBackgroundPainterhas been updated to start from 30% of primary and end at 20% ofonSurfaceVariant(was previously 20% to 10%onSurfaceVariant).ToggleChip.toggleChipColorschanges from a linear gradient of 75% surface to 32.5% primary to 0% surface to 50% primary. -
Button/ToggleButton- Added properties for modifying button shapes. - Theme - Updated a number of the default colors in the
MaterialThemein order to improve accessibility as the original colors did not have sufficient contrast resulting in difficulties for users to differentiate chip/card/button backgrounds from the theme background color. -
InlineSlider/Stepper- Button roles added so thatTalkbackcan recognise them as buttons. - Scaffold -
PositionIndicatornow is positioned and sized so that it only takes the space needed. This is useful, for example, if semantic information is added to it, talkback now gets the correct bounds of thePositionIndicatoron screen. -
CurvedText/TimeText- AddedModifier.scrollAway, which scrolls an item vertically in/out of view, based on scroll state (with overloads to work withColumn,LazyColumnandScalingLazyColumn).ScrollAwayis typically used to scroll aTimeTextout of view as the user starts to scroll a list of items upwards. -
CurvedText/TimeText- Added support forfontFamily,fontStyleandfontSynthesisinCurvedTextStyle, usable oncurvedTextandbasicCurvedText -
CurvedText/TimeText- AddedfontWeightto the constructor and copy method onCurvedTextStyle -
ToggleControls- Added animatedCheckbox,SwitchandRadioButtontoggle controls for use withToggleChipandSplitToggleChip. These can be used instead of the static icons provided byToggleChipDefaults(switchIcon,checkboxIconandradioIcon). - Placeholder - Added experimental placeholder support. This has three distinct visual effects designed to work together.
- Firstly a placeholder background brush effect used in containers such as Chip and Cards to draw over the normal background when waiting for content to load.
- Secondly a modifier (
Modifier.placeholder()) to draw a stadium shaped placeholder widget over the top of content that is being loaded. - Thirdly a modifier gradient/shimmer effect (
Modifier.placeholderShimmer()) that is drawn over the top of the other effects to indicate to users that we are waiting for data to load.- All of these effects are designed to be coordinated and shimmer and wipe-off in an orchestrated fashion.
- Core Compose dependencies updated from 1.2 to 1.3
تغییرات API
- Font parameters (
fontFamily,fontWeight,fontStyle&fontSynthesis) can now be specified directly as parameters ofcurvedText( Idc422 )
رفع اشکال
-
curveTextandbasicCurvedTextwill now work properly with talkback (the have a properly sized and placed (but empty) compose-ui node associated with them, using the text as content description) ( I7af7c , b/210721259 ) - Bug fix to the
PickerwhenPickerState.repeatedItems = falseto add an explicit setting of autoCentering params on the Pickers internalScalingLazyColumnto ensure that it is possible to scroll the zero'th option to the center of the view. ( I8a4d7 )
Version 1.1.0-alpha07
5 اکتبر 2022
androidx.wear.compose:compose-foundation:1.1.0-alpha07 , androidx.wear.compose:compose-material:1.1.0-alpha07 , and androidx.wear.compose:compose-navigation:1.1.0-alpha07 are released. Version 1.1.0-alpha07 contains these commits.
ویژگی های جدید
- We have added experimental placeholder support. This has three distinct visual effects designed to work together. Firstly a placeholder background brush effect used in containers such as Chip and Cards to draw over the normal background when waiting for content to load. Secondly a modifier (
Modifier.placeholder()) to draw a stadium shaped placeholder widget over the top of content that is being loaded. Thirdly a modifier gradient/shimmer effect (Modifier.placeholderShimmer()) that is drawn over the top of the other effects to indicate to users that we are waiting for data to load. All of these effects are designed to be coordinated and shimmer and wipe-off in an orchestrated fashion. ( I3c339 )
تغییرات API
- Added support for
fontWeight,fontFamily,fontStyleandfontSynthesisinCurvedTextStyle, usable oncurvedTextandbasicCurvedText. Those parameter can be used to specify the font and style to use on the curved text.( Iaa1a8 ),( I72759 ) - Updated
Modifier.scrollAway's offset parameter to Dp for consistency withModifier.offset(previously it was in pixels). Also, refactored as aLayoutModifierfor efficiency. ( I9f94b ) - As part of the new toggle controls API, we have renamed
RadioButton's circleColortoringColor. ( I28fa9 ) - We have added animated
Checkbox,SwitchandRadioButtontoggle controls for use withToggleChipandSplitToggleChip. These can be used instead of the static icons provided byToggleChipDefaults(switchIcon,checkboxIconandradioIcon). ( I8a8c4 )
Version 1.1.0-alpha06
21 سپتامبر 2022
androidx.wear.compose:compose-foundation:1.1.0-alpha06 , androidx.wear.compose:compose-material:1.1.0-alpha06 , and androidx.wear.compose:compose-navigation:1.1.0-alpha06 are released. Version 1.1.0-alpha06 contains these commits.
ویژگی های جدید
- We have added
Modifier.scrollAway, which scrolls an item vertically in/out of view, based on scroll state (with overloads to work withColumn,LazyColumnandScalingLazyColumn).ScrollAwayis typically used to scroll aTimeTextout of view as the user starts to scroll a list of items upwards. ( I61766 )
رفع اشکال
- The
PositionIndicatornow is positioned and sized so that it only takes the space needed. This is useful, for example, if semantic information is added to it, talkback now gets the correct bounds of thePositionIndicatoron screen. ( Ie6106 , b/244409133 )
Version 1.1.0-alpha05
7 سپتامبر 2022
androidx.wear.compose:compose-foundation:1.1.0-alpha05 , androidx.wear.compose:compose-material:1.1.0-alpha05 , and androidx.wear.compose:compose-navigation:1.1.0-alpha05 are released. Version 1.1.0-alpha05 contains these commits.
رفع اشکال
- Button roles were added to
InlineSliderandStepperso that Talkback can recognise them as buttons. ( Icb46c , b/244260275 ) - We have corrected the z-order of position and page indicators in the Scaffold. The indicators will now sit on top of the vignette and so will not be obscured by the vignette if it is present. ( Ib988f , b/244207528 )
Version 1.1.0-alpha04
24 آگوست 2022
androidx.wear.compose:compose-foundation:1.1.0-alpha04 , androidx.wear.compose:compose-material:1.1.0-alpha04 , and androidx.wear.compose:compose-navigation:1.1.0-alpha04 are released. Version 1.1.0-alpha04 contains these commits.
تغییرات API
- We have updated a number of the default colors in the MaterialTheme in order to improve accessibility as the original colors did not have sufficient contrast resulting in difficulties for users to differentiate chip/card/button backgrounds from the theme background color. The updated colors are surface(0xFF202124->0xFF303133), onPrimary(0xFF202124->0xFF303133), onSecondary(0xFF202124->0xFF303133), primaryVariant(0xFF669DF6->0xFF8AB4F8) and onError(0xFF202124->0xFF000000). The changes in colors though relatively subtle may impact existing screenshot tests. ( 81ab09 )
رفع اشکال
- Fix a logic bug in
ScalingLazyColumnthat could result in lists with a small (typically exactly 2) number of list items not completing initialization and as a result being transparent. ( 504347 )
Version 1.1.0-alpha03
10 آگوست 2022
androidx.wear.compose:compose-foundation:1.1.0-alpha03 , androidx.wear.compose:compose-material:1.1.0-alpha03 , and androidx.wear.compose:compose-navigation:1.1.0-alpha03 are released. Version 1.1.0-alpha03 contains these commits.
ویژگی های جدید
- We have added a new outlined style for
ChipsandButtonsand newOutlinedChipandOutlinedButtoncomposables that provide a transparentChip/Buttonwith a thin border. ( Id5972 )
تغییرات API
- Added overloads for modifying button shapes ( Icccde )
رفع اشکال
- We have corrected the size of the toggle control area of the
ToggleChipas it was not matching its UX spec. The UX Spec calls for a 4.dp spacer between the label and a 24x24.dp toggle control icon area giving a total 28.dp width. However the implementation is incorrectly giving 36x24.dp toggle control area. This results in taking away 8.dp of usable text label area. NOTE: This bug fix gives additional space for the text label and as result can (positively) impact the text layout for overflowing text. If you have screenshot tests includingToggleChipsthey may need to be updated. ( I514c8 , b/240548670 )
Version 1.1.0-alpha02
27 جولای 2022
androidx.wear.compose:compose-foundation:1.1.0-alpha02 , androidx.wear.compose:compose-material:1.1.0-alpha02 , and androidx.wear.compose:compose-navigation:1.1.0-alpha02 are released. Version 1.1.0-alpha02 contains these commits.
ویژگی های جدید
- We have switched Compose for Wear OS dependencies on core Compose libraries from 1.2.0 to 1.3.0-alpha0X
تغییرات API
- Added overloads for modifying chip shapes ( I02e87 )
رفع اشکال
- We have animated the visibility of the vignette when showing/hiding Dialog, to be consistent with the existing scaling animation. ( Ida33e )
- We have fixed a bug where a divide-by-zero could occur with some fling behavior when scrolling. ( I86cb6 )
- Fixed a bug in the
ChipDefaults.childChipColor()to ensure that the disabled background color is fully transparent. ( I2b3c3 , b/238057342 )
Version 1.1.0-alpha01
29 ژوئن 2022
androidx.wear.compose:compose-foundation:1.1.0-alpha01 , androidx.wear.compose:compose-material:1.1.0-alpha01 , and androidx.wear.compose:compose-navigation:1.1.0-alpha01 are released. Version 1.1.0-alpha01 contains these commits.
تغییرات API
- Picker's
contentDescriptionparameter is now used only for the selected Picker option and takes a nullable String (previously, it was necessary to pass a mapping from option to the content description, but only the selected option was used). ( Ife6a7 ) - We have made accessibility improvements to Picker so that multi-picker screens are navigable with screen readers and the content description is accessible ( I64edb )
رفع اشکال
- We have updated the baseline profile rules packaged with the Wear Compose library ( I9c694 )
- We have corrected the direction of the gradient for Chips in right to left mode. Was top left->bottom right, is now top right->bottom left. ( Ic2e77 )
- We have updated the default gradients for
Chip/ToggleChip/Cardto bring them in line with latest UX spec.ChipDefaults.gradientBackgroundChipColorshas been updated to start from 50% of primary rather than 32.5%.CardDefaults.cardBackgroundPainterhas been updated to start from 30% of primary and end at 20% ofonSurfaceVariant(was previously 20% to 10%onSurfaceVariant).ToggleChip.toggleChipColorschanges from a linear gradient of 75% surface to 32.5% primary to 0% surface to 50% primary. ( I43bbd ) - We have added a background color (
MaterialTheme.color.surface) behindChip/ToggleChipsthat have gradient backgrounds in order to ensure that they are properly visible in the unlikely event that a light color is used behind them. ( Ibe1a4 , b/235937657 ) - Picker items are now always center-aligned, fixing a bug when setting
gradientRatioto zero had the side-effect of changing the alignment. ( I712b8 )
نسخه 1.0
نسخه 1.0.2
7 سپتامبر 2022
androidx.wear.compose:compose-foundation:1.0.2 , androidx.wear.compose:compose-material:1.0.2 , and androidx.wear.compose:compose-navigation:1.0.2 are released. Version 1.0.2 contains these commits.
رفع اشکال
- We have corrected the z-order of position and page indicators in the Scaffold. The indicators will now sit on top of the vignette and so will not be obscured by the vignette if it is present. ( Ib988f , b/244207528 )
نسخه 1.0.1
24 آگوست 2022
androidx.wear.compose:compose-foundation:1.0.1 , androidx.wear.compose:compose-material:1.0.1 , and androidx.wear.compose:compose-navigation:1.0.1 are released. Version 1.0.1 contains these commits.
رفع اشکال
- Fix a logic bug in
ScalingLazyColumnthat could result in lists with a small (typically exactly 2) number of list items not completing initialization and as a result being transparent. ( 076c61 )
نسخه 1.0.0
27 جولای 2022
androidx.wear.compose:compose-foundation:1.0.0 , androidx.wear.compose:compose-material:1.0.0 , and androidx.wear.compose:compose-navigation:1.0.0 are released. Version 1.0.0 contains these commits.
Major features of 1.0.0
- This is the first stable release of Compose for Wear OS ( read more ).
- Compose for Wear OS builds upon the core Compose libraries providing additional wearable-specific components and, where appropriate, alternate implementations of core Compose components tailored to wearable devices.
- For a list of the key components in Wear Compose see the release notes for ( Compose for Wear OS Beta01 ).
رفع اشکال
- We have animated the visibility of the vignette when showing/hiding Dialog, to be consistent with the existing scaling animation. ( Ida33e )
- We have fixed a bug where a divide-by-zero could occur with some fling behavior when scrolling. ( I86cb6 )
- Fixed a bug in the
ChipDefaults.childChipColor()to ensure that the disabled background color is fully transparent. ( I2b3c3 , b/238057342 )
Version 1.0.0-rc02
22 ژوئن 2022
androidx.wear.compose:compose-foundation:1.0.0-rc02 , androidx.wear.compose:compose-material:1.0.0-rc02 , and androidx.wear.compose:compose-navigation:1.0.0-rc02 are released. Version 1.0.0-rc02 contains these commits.
رفع اشکال
- We have corrected the direction of the gradient for Cards in right to left (RTL) mode. It was top left->bottom right, and it is now top right->bottom left. ( Ic2e77 )
- We have updated the default gradients for
Chip/ToggleChip/Cardto bring them in line with the latest UX spec.ChipDefaults.gradientBackgroundChipColorshas been updated to start from 50% of primary rather than 32.5%.CardDefaults.cardBackgroundPainterhas been updated to start from 30% of primary and end at 20% ofonSurfaceVariant(was previously 20% to 10% onSurfaceVariant).ToggleChip.toggleChipColorschanges from a linear gradient of 75% surface to 32.5% primary to 0% surface to 50% primary. ( I43bbd ) - We have added a background color (
MaterialTheme.color.surface) behindChip/ToggleChipsthat have gradient backgrounds in order to ensure that they are properly visible in the unlikely event that a light color is used behind them. ( Ibe1a4 , b/235937657 ) - We have updated the baseline profile rules packaged with the Wear Compose library ( I9c694 )
Version 1.0.0-rc01
15 ژوئن 2022
androidx.wear.compose:compose-foundation:1.0.0-rc01 , androidx.wear.compose:compose-material:1.0.0-rc01 , and androidx.wear.compose:compose-navigation:1.0.0-rc01 are released. Version 1.0.0-rc01 contains these commits.
تغییرات API
- Interfaces in compose libraries are now built using jdk8 default interface methods ( I5bcf1 )
رفع اشکال
- We have removed the explicit call to
fillMaxWidth()on list header as it is not needed and can result in problems if aScalinglazyColumnhas a mixture ofListHeader()andChip()components as the width will tend to grow/shrink asListHeaderitems are scrolled in/out of view. ( I37144 , b/235074035 ) - We have fixed a bug in the
ScalingLazyColumnthat could result in the list items not drawing correctly until scrolled if the 0th list item was large enough (including padding) ( Ic6159 , b/234328517 ) - We have made a small adjustment in the
ScalingLazyColumneasing as items reach the edge of the screen to match UX spec updates. Old valuesCubicBezierEasing(0.25f, 0.00f, 0.75f, 1.00f)-> new valuesCubicBezierEasing(0.3f, 0f, 0.7f, 1f). To keep the old behavior you can override thescalingParamsofScalingLazyColumn( Ie375c ) - We have added padding to the
CompactChipin order to ensure that its tap target size is at least 48.dp high to meet the Material accessibility guidelines. This might impact any layouts you have usingCompactChipsas they will be taking up additional space. ( I3d57c )
نسخه 1.0.0-beta03
1 ژوئن 2022
androidx.wear.compose:compose-foundation:1.0.0-beta03 , androidx.wear.compose:compose-material:1.0.0-beta03 , and androidx.wear.compose:compose-navigation:1.0.0-beta03 are released. نسخه 1.0.0-beta03 حاوی این تعهدات است.
ویژگی های جدید
- We have made
ScalingLazyColumnwork in Compose@Previewmode. ( I3b3b6 , b/232947354 )
تغییرات API
- We have changed the default value for the
ScalingLazyColumn.horizontalAlignmentproperty from Start toCenterHorizontallyto ensure that when list items do not fill the entire width of the column they will be aligned for maximum visibility. To switch back to the previous behavior sethorizontalAlignment = Alignment.Start.( I9ed4b )
مسائل شناخته شده
- CompactChip's tap/touch height is smaller than Material accessibility guidelines. This will be corrected in the next release (15th June) . If you are using CompactChip this will affect your layouts as CompactChips will now have additional padding above and below. Please adjust and test your layouts or see the bug comments for a workaround to use the existing behavior. ( b/234332135 )
رفع اشکال
- New demo to animate adding or removing a start text on a
TimeText. ( I16d75 ) - Add tests for
HorizontalPageIndicator.PagesState( I64ed0 ) - Updating
TimeTextcloser to UX specs ( Ib7ea1 )
نسخه 1.0.0-beta02
18 مه 2022
androidx.wear.compose:compose-foundation:1.0.0-beta02 , androidx.wear.compose:compose-material:1.0.0-beta02 , and androidx.wear.compose:compose-navigation:1.0.0-beta02 are released. نسخه 1.0.0-beta02 حاوی این تعهدات است.
ویژگی های جدید
- Picker now always responds to scroll events even when in read-only mode. This avoids the need for users to first select a Picker by tapping, before they can scroll. In read-only mode, options other than that currently selected are obscured by a shim in
gradientColor. ( I72925 ) - We have changed the UX behavior of
Chip/ToggleChip/CompactChip/SplitToggleChipto stop them from doingfillMaxWidthby default. Instead they will grow to fit their contents. To keep the previous behavior simply addmodifier = Modifier.fillMaxWidth()( I60a2c , b/232206371 )
رفع اشکال
-
CurvedTextStyleconstructor taking aTextStylenow also respects thefontWeight(This may be added to the constructor and copy methods in future revisions of the API) ( Ieebb9 ) - Edge swiping improvements. When
Modifier.edgeSwipeToDismissis used and a swipe to the left is triggered from the edge area, it no longer triggers swipe-to-dismiss when swipe direction changes to the right. Previously, it was possible to trigger swipe-to-dismiss by swiping to the left and then swiping to the right.( I916ea ) -
HorizontalPageIndicatornow shows up to 6 pages on the screen. If there are more than 6 pages in total, it shows a half-size indicator on the left or right, with a smooth transition between pages.( I2ac29 ) - Improved default snap behavior on
ScalingLazyColumnandPicker( I49539 ) - Edge swiping improvements. When
Modifier.edgeSwipeToDismissis used, swipe-to-dismiss only triggers when first touch lands on the edge and swiped to the right, Previously it was possible to trigger swipe-to-dismiss by swiping from any part of the screen if a scroll reaches the start.( I8ca2a )
نسخه 1.0.0-beta01
11 مه 2022
androidx.wear.compose:compose-foundation:1.0.0-beta01 , androidx.wear.compose:compose-material:1.0.0-beta01 , and androidx.wear.compose:compose-navigation:1.0.0-beta01 are released. نسخه 1.0.0-beta01 حاوی این تعهدات است.
What's in Compose for Wear OS 1.0
The 1.0.0-beta01 of Compose for Wear OS marks an important milestone as the library is feature complete and the API locked.
Wear Compose Material components in the 1.0 release include:
- Material Theme - used as a replacement for the Compose for Mobile
MaterialTheme, provides the colors, shapes and typography for building components on Wearables that implement the Wear Material Design UX guidelines out of the box. -
Button,CompactButtonandToggleButton- Button offers a single slot to take an icon, image or short text (3 characters max). Circular in shape with recommended sizes for default, large or small buttons.CompactButtonoffers a single slot to take any content (icon, image or text) and is circular in shape with background size extra small.CompactButtonhas optional transparent padding around the background that increases the clickable area.ToggleButtonis a button that offers a single slot to take any content (short text, icon or image) and has on/off (checked/unchecked) states with coloring and different icons to show whether checked or not - Cards - used to display information about applications such as notifications. Flexible design for different use cases with
AppCardandTitleCardgiving different layouts and support for images as either card contents or backgrounds. - Chips - stadium shaped components similar to buttons, but with a larger area and multiple slots to allow for labels, secondary labels and icons. In different sizes and with support for images as backgrounds.
- ToggleChips and SplitToggleChips - a Chip with a checked/unchecked state and the addition of a
ToggleControlslot to show an icon such as a switch or radio button to show the checked state of the component. In addition, theSplitToggleChiphas two tappable areas, one clickable and one toggleable. - CircularProgressIndicator - Wear Material progress indicator with two variations. The first expresses the proportion of completion of an ongoing task and supports a gap in the circular track between start and end angles. The second indicates indeterminate progress for an unspecified wait time.
- curvedText - forms part of the DSL for describing
CurvedLayouts, along withcurvedRowandcurvedColumn, to lay out components around circular devices. See Wear Component Foundation below for more details onCurvedLayoutandCurvedModifier(this plays a similar role to Modifiers in the non curved world and allows for configuration of various aspects of layout, padding, gradients, etc). - Dialog, Alert and Confirmation - Dialog displays a full-screen dialog, layered over any other content, and supports swipe-to-dismiss. It takes a single slot which is expected to be opinionated Wear Material dialog content such as Alert or Confirmation. Alert is opinionated dialog content with slots for icon, title and message. It has overloads for either two negative and positive buttons shown side-by-side or a slot for one or more vertically stacked chips. Confirmation is opinionated dialog content that displays a message for a given duration. It has a slot for an icon or image (that could be animated).
- HorizontalPageIndicator - shows horizontal page position in a fashion appropriate to the Wearable form factor. Designed to take the full screen and show a curved indicator on round devices. Can be used with the Accompanist page viewer.
- Icon - A Wear implementation of Icon which takes color and alpha from the Wear Material Theme. For a clickable icon, see Button or Chip.
- Picker - displays a scrollable list of items from which to pick. By default, items will be repeated 'infinitely' in both directions. Can be displayed in read-only mode to hide unselected options.
- PositionIndicator - shows scroll position or other positional indication in a fashion appropriate to the Wearable form factor. Designed to take the full screen and shows a curved indicator on round devices.
- Scaffold - implements the basic Wear Material Design visual layout structure. This component provides an API to put together several Wear Material components (such as
TimeText,PositionIndicatorandVignette) constructing the screen, ensuring proper layout strategy for them and collecting necessary data so these components will work together correctly. - ScalingLazyColumn - a scrolling scaling/fisheye list component that forms a key part of the Wear Material Design language. Provides scaling and transparency effects to the content items.
ScalingLazyColumnis designed to be able to handle potentially large numbers of content items, which are only materialized and composed when needed. - Slider - allows users to make a selection from a range of values. The range of selections is shown as a bar, which can optionally be displayed with separators.
- Stepper - a full-screen component that allows users to make a selection from a range of values, using increase/decrease buttons at the top and bottom of the screen, with a slot in the middle for Text or a Chip.
- SwipeToDismissBox - handles the swipe-to-dismiss gesture. It takes a single slot for the background (only displayed during the swipe gesture) and the foreground content. Can optionally be combined with the androidx navigation library by using
SwipeDismissableNavHost(see Wear Compose Navigation library below). - Text - A Wear implementation of the Compose Material Text component, taking color and alpha from the Wear Material Theme
- TimeText - a component for showing Time and application status at the top of the screen. Adjusts to screen shape by using curved text on round screens.
Vignette - a screen treatment for use in the Scaffold that blurs top and bottom of screen when scrollable content is in use.
The following components are also included from Wear Compose Foundation:
CurvedLayout - Wear Foundation
CurvedLayoutis a layout composable that places its children in an arc, rotating them as needed. This is similar to a Row layout curved into a segment of an annulus. Note that the content of aCurvedLayoutis not a composable lambda - rather, it is a DSL (domain-specific language). All elements in the CurvedLayout's DSL support an optional modifier parameter, created fromCurvedModifier.basicCurvedText - an element in the
CurvedLayoutDSL,basicCurvedTextallows developers to easily write curved text following the curvature of a circle (usually at the edge of a circular screen).basicCurvedTextcan be only created within theCurvedLayoutto ensure the best experience, like being able to specify the positioning, and usingCurvedModifiers. Note that in most cases curvedText should be used instead, since it uses Material theming.curvedComposable - wraps normal composable content so that it can be used with
CurvedLayout. IfcurvedComposablehas several elements inside, they will be drawn on top of each other (like a Box). To put several composables along a curve, wrap each one withcurvedComposable.curvedRow and curvedColumn - similar to Row and Column,
curvedRowandcurvedColumncan be nested inside aCurvedLayoutto lay elements out as needed. For acurvedRow, the angular layout direction and radial alignment may be specified. For acurvedColumn, the angular alignment and radial direction may be specified.CurvedModifier - all curved components accept a modifier parameter that can be created using
CurvedModifier: background, size, weight and padding are supported.The following component is also included from Wear Compose Navigation:
SwipeDismissableNavHost - provides a place in the Compose hierarchy for self-contained navigation to occur, with backwards navigation provided by a swipe gesture. Content is displayed within a
SwipeToDismissBox, showing the current navigation level. During a swipe-to-dismiss gesture, the previous navigation level (if any) is shown in the background.See previous release notes for the various Alpha releases for more details of what has been delivered.
تغییرات API
- Added
CurvedModifier.padding*functions. These are used to specify additional space to be added around a curved component. ( I4dbb4 ) - Removed
CompositionLocalinternal class ( I42490 ) - We have added constant values for
Button,CompactButtonandToggleButtonicon sizes, as guidance ( I57cab ) - Add enabled parameter to
AppCardandTitleCard. Now they have a similar API toandroidx.compose.materialCards. When the parameter is set to false, the card will not be clickable. ( Idc48d , b/228869805 )
رفع اشکال
- Stepper now disables the decrease and increase buttons when the lower/upper limits have been reached (and applies ContentAlpha.disabled to the iconColor) ( I4be9f )
- We have added 1dp padding around Picker contents when drawn with a gradient to prevent jitter on text seen when swiping. ( I0b7b9 )
- Add screenshot tests for
PositionIndicator( I5e8bc ) - Add more tests for
AppCardandTitleCard( I85391 , b/228869805 )
Version 1.0.0-alpha21
20 آوریل 2022
androidx.wear.compose:compose-foundation:1.0.0-alpha21 , androidx.wear.compose:compose-material:1.0.0-alpha21 , and androidx.wear.compose:compose-navigation:1.0.0-alpha21 are released. Version 1.0.0-alpha21 contains these commits.
ویژگی های جدید
- Added new curved modifiers to specify the background of a curved element:
CurvedModifier.background,.radialGradientBackgroundand.angularGradientBackground( I8f392 ) - Allow curved text overflow mode (clip/ellipsis/visible) to be specified. ( I8e7aa )
- Added
CurvedModifier.weightmodifier, similar to the one in Compose. This can be used on children of curvedRow and CurvedLayout (for width) and children of curvedColumn (for height). ( I8abbd ) - Added
CurvedModifier.size,.angularSizeand.radialSizemodifiers to specify the size of a curved element. ( I623c7 )
تغییرات API
- Reorder parameters to ensure background is before color consistently across the Wear Compose API ( I43208 )
- Removed clockwise &
insideOutparameters and replaced with more expressive constants on new classes. Curved layout direction can now beLayoutDirectionaware, and it is inherited when not specified ( If0e6a ) - We have replaced
autoCenter: BooleanwithautoCenter: AutoCentringParamsin order to fix an API issue with theScalingLazyColumn. ( Ia9c90 ) - We have renamed
iconTintColorandtoggleControlTintColortoiconColorandtoggleControlColorthroughout the API (Chip/ToggleChip/Dialog/Slider/Stepper/...) as the color is applied to the icon/toggleControl slot. ( Ied238 ) - Rewrite
PageIndicatorStyleenum into value class ( I2dc72 ) - We have added
RowScope/ColumnScope/BoxScopeto some of the slots in our Composables to indicate to developers what the layouts assumptions are. This will allow developers to use additional modifiers on some slot content and avoid the need to provide extra layout elements. Additionally we have made some minor updates to the AppCard/TitleCard colors so thattimeColorandappColordefault tocontentColor, these properties can still all be individually overridden if needed. ( I26b59 ) - Made
SwipeToDismissBoxState.Companionobject private ( I39e84 ) - Fix parameters order for
InlineSliderandStepper. A simple change to follow api guidelines ( I11fec ) - We have removed the Saver object for
SwipeToDismissBoxStateas it was not used. ( Ifb54e ) - We have updated
CompactChipto bring it inline with the latest UX Specification. Padding has been reduced to horizontal = 12.dp and vertical = 0.dp. The font for label has been changed from button to caption1. The recommended icon sizes are 20x20 when both icon and label are present and 24x24 for an icon only compact chip. For the icon only use case we have also ensured that the icon is center aligned. ( Iea2be ) - We have added a number of new fields to
ScalingLazyListLayoutInfoto enable developers to know the amount ofcontentPaddingandautoCenteringPaddingthat has been applied. These can be useful for developers when calculating fling/scroll ( I7577b ) - We have implemented in/out transitions for Dialog. A
showDialogparameter has been added and the Dialog now controls its own visibility (this enables Dialog to run the intro and outro animations when the Dialog is shown/hidden). Note that the outro animation is not performed when the user leaves the dialog via swipe-to-dismiss. We have also added a default value for state in the recently addedSwipeToDismissBoxoverload. ( I682a0 ) - In order to better support i18n and a11y we have changed
ToggleChipandSplitToggleChipso that they no longer have a default for thetoggleControlslot. We have also changedToggleChipDefaultsso that the following methods now return ImageVector rather than Icon (note that as they no longer return @Composables they have changed to start with lower case),SwitchIcon()->switchIcon(),CheckboxIcon->checkboxIcon()andRadioIcon()->radioIcon()- this allows and encourages developers to create their ownIcon()composables with an appropriatecontentDescriptionset. ( I5bb5b ) - We have added a
SwipeDismissableNavHostStateparameter toSwipeDismissableNavHost. This supports use of edge-swiping on screens used as navigation destinations, becauseSwipeToDismissBoxStatecan now be hoisted and used to initialize bothSwipeDismissableNavHostStateandModifier.edgeSwipeToDismisson screens that require edge-swiping. ( I819f5 , b/228336555 )
رفع اشکال
- Ensure curved layouts are updated when needed. ( Ie8bfa , b/229079150 )
- Bug fix for https://issuetracker.google.com/issues/226648931 ( Ia0a0a , b/226648931 )
- Removed unnecessary experimental annotations ( I88d7e )
Version 1.0.0-alpha20
6 آوریل 2022
androidx.wear.compose:compose-foundation:1.0.0-alpha20 , androidx.wear.compose:compose-material:1.0.0-alpha20 , and androidx.wear.compose:compose-navigation:1.0.0-alpha20 are released. Version 1.0.0-alpha20 contains these commits.
ویژگی های جدید
- Add
edgeSwipeToDismissmodifier forSwipeToDismiss. AllowsswipeToDismissto be active only on the left edge of the viewport. Used when the center of the screen needs to be able to handle horizontal paging, such as 2-d scrolling a Map or swiping horizontally between pages.( I3fcec , b/200699800 )
تغییرات API
- Base implementation of
CurvedModifiers, this opens the way to introduce ways to customize curved content (but noCurvedModifiersare provided yet, and the ability to create custom modifiers may be available later) ( I9b8df ) -
EdgeSwipemodifier documentation and default values update for better understanding .( I6d00d ) - Add
PageIndicatorslot into Scaffold. By addingPageIndicatordirectly into Scaffold we might assure that it will be correctly shown on circular devices. ( Ia6042 ) - Remove default Icons from
InlineSliderand Stepper parameters. This will help developers to be more attentive to localization and accessibility requirements. Usages of default icons were shown in demos and samples. ( I7e6fd ) - Replace Trailing and Leading parameter names with Start and End in TimeText ( Iaac32 )
- We have added a
SwipeToDismissBoxoverload with anonDismissedparameter to support the common usage of triggering a navigation event when the swipe gesture has completed. ( I50353 , b/226565726 ) - Removed
ExperimentalWearMaterialApiannotations fromTimeTextusage ( Ide520 ) - We have marked
ScalingLazyList/Columnscope and info interfaces as sealed as they are not intended for external developers to implement and this will allow us to add new members in them in future without binary breaking changes. ( I7d99f ) - We have added a new
flingBehaviourproperty to the Picker and aPickerDefaults.flingBehaviour()method to enable configuration of the fling behavior such as adding RSB support.PickerStatenow implements theScrollableStateinterface. ( Ib89c7 )
رفع اشکال
- Update the Android Runtime (ART) baseline profile rules for Wear Compose libraries. ART can leverage profile rules on devices in order to compile ahead-of-time a specific subset of the application to improve the performance of the application. Note that this will have no effect on debuggable applications. ( Iaa8ef )
- Improve documentation ( I2c051 )
Version 1.0.0-alpha19
23 مارس 2022
androidx.wear.compose:compose-foundation:1.0.0-alpha19 , androidx.wear.compose:compose-material:1.0.0-alpha19 , and androidx.wear.compose:compose-navigation:1.0.0-alpha19 are released. Version 1.0.0-alpha19 contains these commits.
تغییرات API
- Renamed
CurvedRowtoCurvedLayout, and reworked to be a scope with a DSL. Using this DSL, more complex curved layouts can be specified using a series of nestedcurvedRowandcurvedColumn(Which are the curved layout equivalents of Row and Column). Inside these layout elements, three elements can be used:curvedComposable(to add any @Composable),basicCurvedText(foundation's curved text) andcurvedText(wear material aware curved text). ( Ib776a ) - Make the side for the
PositionIndicatorconfigurable. The basic PositionIndicator's position can now be configured to be End (layout direction-aware), OppositeRsb (takes into account screen rotation, to position itself opposite to the physical RSB), or the absolutes Left & Right. ( I2f1f3 ) - For
SwipeToDismissBox, we have renamedSwipeDismissTarget.Original toSwipeToDismissValue.DefaultandSwipeDismissTarget.DismissaltoSwipeToDismissValue.Dismissed. We have also movedSwipeToDismissBoxDefaults.BackgroundKeyandSwipeToDismissBoxDefaults.ContentKeytoSwipeToDismissKeys.Background,SwipeToDismissKeys.Contentrespectively. ( I47a36 ) - We have added a read-only mode to Picker, for screens with multiple Pickers where only one Picker is editable at a time. When the Picker is read-only, it displays the currently selected option, and a label if one has been provided. ( I879de )
-
SwipeToDismissBoxStatehas been refactored to restrict the scope ofExperimentalWearMaterialApitoModifier.swipeableandSwipeableState, which are now used internally.SwipeToDismissBoxStatenow hascurrentValue,targetValue,isAnimationRunningandsnapTomembers to support common use cases - please let us know if you require any further properties to be made available. Also fixed the behavior ofSwipeableStatein the case where the swipe offset is within a rounding error of an anchor. ( I58302 )
رفع اشکال
- Simplified and fixed code to detect if the content of a
ScalingLazyColumncan be scrolled (used to decide if we display a scrollbar or not) ( I7bce0 ) - Fixed a bug on Position Indicator when used with more than one state and switching between them ( I320b5 )
- We have updated the default Compose for Wear OS theme typography/fonts to match our latest UX guidance. Of note display1 (40.sp) and display2 (34.sp) are now smaller than their previous values and various other minor updates to line height and line spacing have been made. ( Ie3077 )
- We have added resistance to
SwipeToDismissBoxso that motion only happens when swiping to dismiss and not at all in the opposite direction. ( Ifdfb9 ) - We have changed some of the default parameter values for the
CircularProgressIndicatorfunctions to bring them in-line with Wear Material Design UX guidance. For the Spinner/Indeterminant version the size (40->24.dp), indicatorColor (primary->onBackground), trackColor transparency (30%->10%) and stroke width (4->3dp) have been updated. For the Progress/Determinate version the trackColor transparency (30%->10%) has been updated. ( I659cc ) - We have updated the default scaling params of the
ScalingLazyColumnin-line with the latest Wear Material Design UX specifications. Visually this results in list items starting to be scaled closer to the list center, but being less scaled at the list edge than before. ( Ica8f3 ) - Some adjustments to
ScalingLazyColumnDefaults.snapFlingBehaviorto improve the end of the animation ( If3260 )
Version 1.0.0-alpha18
9 مارس 2022
androidx.wear.compose:compose-foundation:1.0.0-alpha18 , androidx.wear.compose:compose-material:1.0.0-alpha18 , and androidx.wear.compose:compose-navigation:1.0.0-alpha18 are released. Version 1.0.0-alpha18 contains these commits.
تغییرات API
- Several improvements to PositionIndicator: ShowResult renamed PositionIndicatorVisibility. Some performance improvements to avoid recomputations when not needed ( Iaed9d )
- The recommended coloring for the
SplitToggleChiphas been updated. SplitToggleChip's now have a solid colored background when checked or unchecked with the coloring of the ToggleControl being the primary indication of whether the component is checked or not. We have added a newToggleDefaults.splitToggleChipColors()to support the new color scheme. We have also simplified thetoggleChipColors()methods removing the splitBackgroundOverlayColor ( I7e66e ) - We have added unadjustedSize to the
ScalingLazyListItemInfoas it is not safe to calculate the original item size using the scaled size and scaling factor due to float maths precision. ( I54657 , b/221079441 ) - Add
HorizontalPageIndicator. It represents a total number of pages and a selected page. Might be linear or curved, depending on the shape of the device. It also supports custom indicator shape, which defines how each indicator is visually represented. ( Iac898 ) - We have updated
PickerStateso that the numberOfOptions can be updated. This supports use-cases such as aDatePicker, when the number of days in the month changes depending on the month selected. The constructor parameter for PickerState has changed to initialNumberOfOptions accordingly. ( Iad066 ) - Hide the
PositionIndicatorwhen is a scrollbar and can't scroll. ( Id0a7f ) - For consistency with Scaffold, our full-screen Dialog component now displays a
PositionIndicatorand aVignette. We are also now usingScalingLazyColumninstead ofColumn, which means that the Dialog contents are now inScalingLazyListScope(and typically need to be enclosed by item { /* content */ }). Dialog supports the verticalArrangement parameter accordingly. ( Idea13 ) - We have changed the name of
ToggleChipandSplitToggleChiptoggleIcon property to toggleControl to better align with Material Design in order to help designers and developers navigate the API. ( If5921 , b/220129803 ) - We have added a new entry caption3 to the Wear Material Theme Typology.Caption3 is a small font used for the extra long-form writing like legal texts. ( I74b13 , b/220128356 )
رفع اشکال
- Stop the snapping animation when we are there. ( Idb69d )
- Animate changes in PositionIndicator. ( I94cb9 )
- Based on UI/UX feedback we have changed the
ScalingLazyColumnautoCentering so that it will provide only enough space to make sure the items with indexScalingLazyListState.initialCenterItemIndexor higher will be able to be fully scrolled to the center of the viewport. This allows developers to place one or two items about the item initially in the center which are not scrollable into the middle. This will mean that an autoCenter'ingScalingLazyColumnwill not be able to scroll above theinitialCenterItemIndex/initialCenterItemScrollOffset( I22ee2 ) - We have added a demo for a Date Picker and fixed a bug in
PickerStatewhere the initiallySelectedOption was not applied until the Picker had been displayed. ( Id0d7e ) - In order to reduce the clipping of wider
ScalingLazyColumnitems on circular screens we have increased the default horizontal content padding from 8 to 10 dp. ( I0d609 ) - Ensure the
PositionIndicatoris shown when scrolling. ( Ied9a2 )
Version 1.0.0-alpha17
23 فوریه 2022
androidx.wear.compose:compose-foundation:1.0.0-alpha17 , androidx.wear.compose:compose-material:1.0.0-alpha17 , and androidx.wear.compose:compose-navigation:1.0.0-alpha17 are released. Version 1.0.0-alpha17 contains these commits.
ویژگی های جدید
- We have added snap support that can be used with
ScalingLazyColumn. SetflingBehavior = ScalingLazyColumnDefaults.flingWithSnapBehavior(state)to enable snap support. ( I068d3 , b/217377069 ) - We have added demos for Picker used to select a time in either 24 hour or 12 hour clock. ( Ie5552 )
تغییرات API
- Fix an issue with
TimeTextcustom fonts & styles on square device ( Iea76e ) -
ScalingLazyListLayoutInfonow hasreverseLayout,viewportSizeand orientation properties matching those fromLazyListLayoutInfo( I4f258 , b/217917020 ) -
ScalingLazyColumnnow has auserScrollEnabledproperty matching that fromLazyList( I164d0 , b/217912513 ) - Pickers now have a gradient on the top and bottom by default ( Iab92a )
رفع اشکال
- We have modified
ScalingLazyColumnso that it no longer greedily fills all of the space in its parent. Instead it will take its size from the size of its contents. This makes it consistent with the behaviour ofLazyColumn. If you want to reinstate the old behaviour then passModifier.fillMaxWidth()/width()/widthIn()to theScalingLazyColumn( I51bf8 ) - We have improved the exception message in
SwipeDismissableNavHost.ktthat was triggered if the navigation backstack was empty. ( I1b1dc )
Version 1.0.0-alpha16
9 فوریه 2022
androidx.wear.compose:compose-foundation:1.0.0-alpha16 , androidx.wear.compose:compose-material:1.0.0-alpha16 , and androidx.wear.compose:compose-navigation:1.0.0-alpha16 are released. Version 1.0.0-alpha16 contains these commits.
ویژگی های جدید
- Add
CircularProgressIndicator. Progress indicators display the length of a process or an unspecified wait time. Supports a gap (cutout) for TimeText or other components if used full-screen. ( Iab8da )
تغییرات API
- Pickers now have a
flingBehaviorparameter, the default value makes them snap to the closest option when scrolling/flinging. ( I09000 ) - Additional integer API for InlineSlider and Stepper ( I1b5d6 )
رفع اشکال
- We have changed the default initialCenterItemIndex for the
ScalingLazyListStatefrom 0->1. This means that unless overridden on state construction withScalingLazyListState.rememberScalingLazyListState(initialCenterItemIndex =)then the 2nd list item (index == 1) will be placed in the center of the viewport at initialization and the 1st (index == 0) item will be placed before it. This allows for a better default visual effect out of the box as most of the viewport will be filled with list items. ( I0c623 , b/217344252 ) - We have reduced the
ScalingLazyColumndefaultextraPaddingthat is provided to ensure that there are plenty of list items to draw (even when we are scaling some of them down in size) from 10% to 5%. This will avoid composing extra list items that might not appear in the viewport. If non standard scalingParams are being used (more extreme scaling for instance) the developer can adjust extra padding usingviewportVerticalOffsetResolver. ( I76be4 ) - Fix an issue with TimeText on multiple lines on square device ( Ibd3fb )
- We have modified
ScalingLazyColumnso that it no longer greedily fills all of the space in its parent. Instead it will take its size from the size of its contents. This makes it consistent with the behavior ofLazyColumn. If you want to reinstate the old behavior then passModifier.fillMaxSize()to theScalingLazyColumn- NOTE: This change is incomplete and will be addressed in a follow up change in the next Alpha release. ( I3cbfa )
Version 1.0.0-alpha15
26 ژانویه 2022
androidx.wear.compose:compose-foundation:1.0.0-alpha15 , androidx.wear.compose:compose-material:1.0.0-alpha15 , and androidx.wear.compose:compose-navigation:1.0.0-alpha15 are released. Version 1.0.0-alpha15 contains these commits.
تغییرات API
- We have added a new property
autoCenteringto theScalingLazyColumn. When true (the default) this will ensure that all items including the first and last can be scrolled so that they are visible in the center of the lists viewport. Note that if using auto-centering you will probably want to set vertical content padding to 0.dp. If both autoCentering and vertical content padding are provided then they will both result in additional space being available before the first and after the last list items allowing them to be scrolled even further. ( I2a282 , b/214922490 ) - We have added a
Dialogcomponent that enables any composable to trigger a full screen dialog that sits on top of other content. When shown, the dialog supports swipe-to-dismiss and will show its parent's content in the background during the swipe gesture. The dialog content is expected to beAlertorConfirmation(renamed from earlier componentsAlertDialogandConfirmationDialog) -Alert,ConfirmationandDialogare all in theandroidx.wear.compose.material.dialogpackage. Alert and Confirmation can be used as navigation destinations. Also, added ColumnScope to Alert and Confirmation parameters as necessary. ( Ia9014 ) - We have removed
onSurfaceVariant2from the Compose for WearOS Material Theme Colors and replaced uses in the library withonSurfaceVariant. ( Icd592 ) - Added a method to programmatically select an option on the
PickerState, the initially selected option can now also be specified when creating aPickerState. ( I92bdf ) - We have added support for customizing the fling behavior of the
ScalingLazyColumn. ( I1ad2e , b/208842968 ) - We have added
NavController.currentBackStackEntryAsState()to theWear.Compose.Navigationlibrary. ( If9028 , b/212739653 ) - Added
Modifier.onRotaryScrollEvent()andModifier.onPreRotaryScrollEvent()for Wear devices with a rotating side button.( I18bf5 , b/210748686 )
Version 1.0.0-alpha14
12 ژانویه 2022
androidx.wear.compose:compose-foundation:1.0.0-alpha14 , androidx.wear.compose:compose-material:1.0.0-alpha14 , and androidx.wear.compose:compose-navigation:1.0.0-alpha14 are released. Version 1.0.0-alpha14 contains these commits.
ویژگی های جدید
We have added a number of methods to
ScalingLazyListStateto allow developer control over scrolling to specific list items and also setting the initial list item and offset.As part of this change we have also modified the ScalingLazyList so that it is oriented around the center of the viewport of the ScalingLazyList rather than the start of the viewport.
A new property
anchorType: ScalingLazyListAnchorType = ScalingLazyListAnchorType.ItemCenterhas been added to theScalingLazyListto control whether the center (ScalingLazyListAnchorType.ItemCenter) orEdge(ScalingLazyListAnchorType.ItemStart) should be aligned to the viewport's centerline.As a result the
ScalingLazyListItemInfo.offsetandScalingLazyListItemInfo.adjustedOffsethave changed and will now reflect the offset of the item with respect to both the position of the list item and theanchorTypeof the list. Eg for aScalingLazyColumnwithanchorTypeofItemCenterand an list item positioned with its center on the centerline of the viewport the offset would be0.The new methods are
scrollTo,animatedScrollTo,centerItemIndex, andcenterItemOffset. ( I61b61 )We have added a back button handler to
SwipeDismissableNavHost, so that pressing back navigates to the previous level in the navigation hierarchy. ( I5b086 , b/210205624 )
Version 1.0.0-alpha13
15 دسامبر 2021
androidx.wear.compose:compose-foundation:1.0.0-alpha13 , androidx.wear.compose:compose-material:1.0.0-alpha13 , and androidx.wear.compose:compose-navigation:1.0.0-alpha13 are released. Version 1.0.0-alpha13 contains these commits.
تغییرات API
- We have made
RangeIconsinternal (referenced internally byInlineSliderandStepper). ( I927ec )
رفع اشکال
Fixed an issue where
SwipeDismissableNavHostwould add a destination to the Compose hierarchy before it has reached theCREATEDLifecycle state, resulting in anIllegalStateException. This fix was a prerequisite to updating dependency onnavigation-composeto2.4.0-beta02and beyond. ( I40a2b , b/207328687 )Added a Drawables enum class for getting drawable resources within the Wear Compose library, so that reflection is no longer needed. This fixes a bug where library drawables were removed when
minifyEnabled=trueorshrinkResources=true). ( Ib2a98 )Added tests for
Stepperin Wear Compose ( I2d03a )Added samples for
SwipeDismissableNavHostin Wear Compose Navigation. ( I85f06 )
Version 1.0.0-alpha12
1 دسامبر 2021
androidx.wear.compose:compose-foundation:1.0.0-alpha12 , androidx.wear.compose:compose-material:1.0.0-alpha12 , and androidx.wear.compose:compose-navigation:1.0.0-alpha12 are released. Version 1.0.0-alpha12 contains these commits.
ویژگی های جدید
We have added a Stepper component which allows users to make a selection from a range of values. Stepper is a full-screen control with increase and decrease buttons at the top and bottom, and a slot in the middle (expected to take either a Chip or Text). The button icons can be customized if required. ( I625fe )
We have added 2 new composables for displaying dialogs: AlertDialog waits for a response from the user and displays a title, icon, message and either a) two buttons for simple positive/negative choices or b) vertically stacked chips or toggle chips for more flexible choices, ConfirmationDialog displays an acknowledgement with a timeout. This simple dialog has slots for a title and an (animated) icon. ( Ic2cf8 )
تغییرات API
- Add units (millis) to suggested dialog duration values. ( I09b48 )
Version 1.0.0-alpha11
17 نوامبر 2021
androidx.wear.compose:compose-foundation:1.0.0-alpha11 , androidx.wear.compose:compose-material:1.0.0-alpha11 , and androidx.wear.compose:compose-navigation:1.0.0-alpha11 are released. Version 1.0.0-alpha11 contains these commits.
ویژگی های جدید
- We have added a picker component that lets the user select an item from a scrolling list. By default, the list of selectable items is repeated 'infinitely' in both directions, to give the impression of a rotating cylinder seen from the side. Two features will be added in later releases: snapping to a value after a swipe/fling; adding a function to PickerState to set/scroll to the current value. ( I6461b )
تغییرات API
- Added a ScalingLazyItemScope and some new modifiers fillParentMaxSize/fillParentMaxWidth/fillParentMaxHeight to allow list items to be sized based on the size of the parent container. Items can be set to fill all or a fraction of the parent's size. This exposes functionality already available in the LazyRow/Column ( I4612f )
- Added support to ScalingLazyColumn to allow items to have a key. Also added convenience methods to allow adding of items from Arrays and Lists. ( Ic1f89 )
رفع اشکال
- Additional examples for TimeText ( I8cb64 )
Version 1.0.0-alpha10
3 نوامبر 2021
androidx.wear.compose:compose-foundation:1.0.0-alpha10 , androidx.wear.compose:compose-material:1.0.0-alpha10 , and androidx.wear.compose:compose-navigation:1.0.0-alpha10 are released. Version 1.0.0-alpha10 contains these commits.
ویژگی های جدید
Added an InlineSlider for wear compose. InlineSlider allows users to make a selection from a range of values. The range of selections is shown as a bar between the minimum and maximum values of the range, from which users may select a single value. ( If0148 )
Check out the new Compose for WearOS Codelab !
تغییرات API
- Macrobenchmark now has a
minSdkVersionof23. ( If2655 )
رفع اشکال
- Update transition handling in SwipeDismissableNavHost in a SideEffect ( I04994 , b/202863359 )
- Update transition handling in SwipeDismissableNavHost ( I1cbe0 , b/202863359 )
Version 1.0.0-alpha09
27 اکتبر 2021
androidx.wear.compose:compose-foundation:1.0.0-alpha09 , androidx.wear.compose:compose-material:1.0.0-alpha09 , and androidx.wear.compose:compose-navigation:1.0.0-alpha09 are released. Version 1.0.0-alpha09 contains these commits.
ویژگی های جدید
- We have launched the Developer Preview of Compose on Wear OS - see our blog post which reviews the main composables and links to further resources to starting using them.
تغییرات API
- We have added support for developers to be able to customize all of the colors in the Wear Material Design Color theme. ( I4759b , b/199754668 )
رفع اشکال
- Added SwipeToDismissBox samples that persist state ( Ibaffe )
- Added links to developer.android.com guides from KDocs for CurvedText, TimeText and SwipeToDismissBox. ( I399d4 )
- SwipeDismissableNavHost now throws if there's no current destination (indicates that the NavGraph was not built with the wear.compose.navigation.composable utility function) ( I91403 )
- Added additional documentation and examples for time source usage in TimeText ( I4f6f0 )
Version 1.0.0-alpha08
13 اکتبر 2021
androidx.wear.compose:compose-foundation:1.0.0-alpha08 , androidx.wear.compose:compose-material:1.0.0-alpha08 , and androidx.wear.compose:compose-navigation:1.0.0-alpha08 are released. Version 1.0.0-alpha08 contains these commits.
تغییرات API
- We have renamed AppCard and TitleCard
bodyproperties tocontentand moved them to the end of the property list to allow them to be provided as a trailing lambda. Also renamedbodyColortocontentColorfor consistency with the new slot names. ( I57e78 )
رفع اشکال
- Added links to developer.android.com guides from KDocs for button, card, chip, theme, position indicator and scaling lazy column components. ( I22428 )
- Fix WearOS SwipeToDismissBox sometimes not handling swipes. ( I9387e )
- Added samples for Button, CompactButton, Chip, CompactChip, AppCard, TitleCard, ToggleButton, ToggleChip, SplitToggleChip ( Iddc15 )
- Added microbenchmark performance tests for Card, Chip, ToggleChip, TimeText and ScalingLazyColumn. ( If2fe9 )
Version 1.0.0-alpha07
29 سپتامبر 2021
androidx.wear.compose:compose-foundation:1.0.0-alpha07 , androidx.wear.compose:compose-material:1.0.0-alpha07 , and androidx.wear.compose:compose-navigation:1.0.0-alpha07 are released. Version 1.0.0-alpha07 contains these commits.
ویژگی های جدید
- Added a CurvedText component in material, a component allowing developers to easily write curved text following the curvature of a circle (usually at the edge of a circular screen). ( I19593 )
تغییرات API
- Added tests for TimeText ( Idfead )
- Transform ArcPaddingValues into an interface. ( Iecd4c )
- Added animation to SwipeToDismissBox ( I9ad1b )
- Added hasBackground parameter to the SwipeToDismissBox API so that the swipe gesture can be disabled when there is no background content to display. ( I313d8 )
-
rememberNavController()now takes a optional set ofNavigatorinstances that will be added to the returnedNavControllerto better support optional Navigators such as those from Accompanist Navigation Material . ( I4619e ) - Reference NamedNavArgument from navigation-common and remove copy from wear.compose.navigation. ( I43af6 )
رفع اشکال
- Fixed CurvedRow test flakiness on smaller devices. ( If7941 )
- Fixed possible flickering on CurvedRow when the content updates, and ensures the curved row is remeasured ( Ie4e06 )
- ChipDefaults.gradientBackgroundChipColors() has been updated in line with UX Spec changes. The gradient now starts with MaterialTheme.colors.primary with alpha 32.5% and ends with MaterialTheme.colors.surface with alpha @ 0% over a background of MaterialTheme.colors.surface @ 75% alpha. ( Id1548 )
- We have updated the colors for ToggleChips when in the selected state to match the latest Wear Material Design UX Spec guidance. When selected ToggleChips now have a gradient background from MaterialTheme.color.surface @ 0% alpha, top left, to MaterialTheme.color.primary @ 32% alpha, bottom right, over a background of MaterialTheme.color.surface @ 75% alpha. This results in a more subtle difference between checked and unchecked for the ToggleChip. ( Idd40b )
Version 1.0.0-alpha06
15 سپتامبر 2021
androidx.wear.compose:compose-foundation:1.0.0-alpha06 , androidx.wear.compose:compose-material:1.0.0-alpha06 , and androidx.wear.compose:compose-navigation:1.0.0-alpha06 are released. Version 1.0.0-alpha06 contains these commits.
ویژگی های جدید
- We have added Scaffold a top level application composable that provides a structure for handling PositionIndicators (like Scroll or Volume) position, an area at the top of the screen for displaying the time and application status, and also supports a Vignette to blur the screen top and bottom edge for scrollable content. The main area of the Scaffold is where the application contents are placed. ( I5e0bf )
- Added TimeText implementation for Wear Compose ( I5654c )
Wear Compose Navigation Library
We have added the first release of the Wear Compose Navigation library, which provides integration between the Wear Compose and Androidx Navigation libraries. It provides a simple means to navigate between @Composable functions as the destinations in your application.
This initial release provides:
- A
SwipeDismissableNavHostcomposable that hosts a navigation graph and provides backwards navigation via swipe gestures -
NavGraphBuilder.composableextension to assist with constructing navigation graphs -
rememberSwipeDismissableNavController()to allow hoisting state
- A
Example usage where we create two screens and navigate between them:
val navController = rememberSwipeDismissableNavController() SwipeDismissableNavHost( navController = navController, startDestination = "start" ) { composable("start") { Column( horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.Center, modifier = Modifier.fillMaxSize(), ) { Button(onClick = { navController.navigate("next") }) { Text("Go") } } } composable("next") { Column( horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.Center, modifier = Modifier.fillMaxSize(), ) { Text("Swipe to go back") } } }Wear Compose Navigation is packaged as a separate library so that simple WearCompose applications that implement their own hand-rolled navigation are not required to depend on the Androidx Navigation library.
تغییرات API
- Updated
SwipeDismissableNavHostto supportrememberSaveableby setting the key identity for background and content ( I746fd ) - We have added a PositionIndicator adapter that can handle LazyListState ( I21b88 )
- Updated SwipeToDismissBox to support rememberSaveable ( Ie728b )
- We have added reverseLayout support to the ScalingLazyColumn. This allows for the reversing of the direction of scrolling and layout ( I9e2fc )
- Deprecated
performGestureandGestureScope, which have been replaced byperformTouchInputandTouchInjectionScope. ( Ia5f3f , b/190493367 ) - We have renamed VignetteValue to VignettePosition and renamed VignetteValue.Both renamed to VignettePosition.TopAndBottom. ( I57ad7 )
- We have renamed ScalingLazyColumnState to ScalingLazyListState, ScalingLazyColumnItemInfo to ScalingLazyListItemInfo, ScalingLazyColumnLayoutInfo to ScalingLazyListLayoutInfo and ScalingLazyColumnScope to ScalingLazyListScope in case we decide to add a ScalingLazyRow implementation in the آینده ( I22734 )
رفع اشکال
- Updated CompactChip documentation to describe what happens if neither an icon nor a label is provided. ( I4ba88 )
- We have made some adjustments to the Wear card components. ( I6b3d0 )
- TitleCard spacing between Title and Body reduced from 8.dp to 2.dp.
- TitleCard header font changed from body to title3.
- Card background gradient changed to make the background appear darker.
Version 1.0.0-alpha05
1 سپتامبر 2021
androidx.wear.compose:compose-foundation:1.0.0-alpha05 and androidx.wear.compose:compose-material:1.0.0-alpha05 are released. Version 1.0.0-alpha05 contains these commits.
تغییرات API
- Mark ArcPaddingValues as @Stable ( I57deb )
- ScalingLazyColumnState now implements the ScrollableState interface giving developers programmatic access to scroll the component. ( I47dbc )
رفع اشکال
- We have reduced the spacing between Icon and Text in Chip and ToggleChip to bring them in line with updates to the UX Spec. ( I83802 )
Version 1.0.0-alpha04
18 آگوست 2021
androidx.wear.compose:compose-foundation:1.0.0-alpha04 and androidx.wear.compose:compose-material:1.0.0-alpha04 are released. Version 1.0.0-alpha04 contains these commits.
ویژگی های جدید
- Added a SwipeToDismissBox and swipeable modifier that can be used to support a left-to-right swipe-to-dismiss gesture. Although independent of navigation components, this is expected to be used to exit one screen and navigate to another. Added integration tests to demo swipe-to-dismiss. ( I7bbaa )
- We have added ScalingLazyColumnItemInfo and ScalingLazyColumnLayoutInfo interfaces to ScalingLazyColumnState class to enable developers to know the actual positions and sizes of items in the ScalingLazyColumn after scaling has been applied. We have also fixed a bug with the way that scaling was calculated when 'top' content padding is applied to the ScalingLazyColumn. ( I27c07 )
تغییرات API
- Add CurvedTextStyle class to specify curved text styling Options. Similar to TextStyle, but now only supports color, fontSize and background. More styling options will be added in the future. ( I96ac3 )
- We have added ScalingLazyColumnItemInfo and ScalingLazyColumnLayoutInfo interfaces to ScalingLazyColumnState class to enable developers to know the actual positions and sizes of items in the ScalingLazyColumn after scaling has been applied. We have also fixed a bug with the way that scaling was calculated when 'top' content padding is applied to the ScalingLazyColumn. ( I27c07 )
- Added
@ExperimentalWearMaterialApitoSwipeDismissTargetenum, part of theSwipeToDismissBoxAPI. ( I48b5e )
رفع اشکال
- Added test material for SwipeToDismissBox ( I9febc )
Version 1.0.0-alpha03
4 آگوست 2021
androidx.wear.compose:compose-foundation:1.0.0-alpha03 and androidx.wear.compose:compose-material:1.0.0-alpha03 are released. Version 1.0.0-alpha03 contains these commits.
تغییرات API
- Added CurvedText component, that allows developers to easily write text following the curvature a circle (usually at the edge of a circular screen) ( Id1267 )
- We have renamed
CardDefaults.imageBackgroundPainter()toCardDefaults.imageWithScrimBackgroundPainter()to make it clear that the background image with have a scrim drawn over it. ( I53206 ) - Adding ScalingLazyColumn component that provides a list component for Wear Material that gives a fisheye view with the list contents scaling down in size and becoming transparent as they scale towards the edge of the component. ( I7070c )
رفع اشکال
- We changed the default color of the appName content in AppCard in response to a UX Spec update. The default color for the appName is now
MaterialTheme.colors.onSurfaceVariant. Additionally added a missing parameter doc description for the title slot. ( Ic4ad1 )
نسخه 1.0.0-alpha02
21 جولای 2021
androidx.wear.compose:compose-foundation:1.0.0-alpha02 and androidx.wear.compose:compose-material:1.0.0-alpha02 are released. نسخه 1.0.0-alpha02 حاوی این commit ها است.
ویژگی های جدید
- Added a new class CurvedRow to laid out composables in an arc ( I29941 )
- Added a new type of card for use in applications (TitleCard), also add support for having images as the background to Cards to emphasize their contents ( I53b0f )
تغییرات API
- Add support for radial alignment to CurvedRow (similar to the vertical alignment in a row) ( Id9de5 )
- Add a new class CurvedRow to laid out composables in an arc ( I29941 )
- Added a new type of card for use in applications (TitleCard), also add support for having images as the background to Cards to emphasize their contents ( I53b0f )
- Added toggle icons (checkbox, switch and radio buttons) to ToggleChipDefaults to make it easier for developers to configure ToggleChip and SplitToggleChips ( I7b639 )
- The start and end content padding for Chips has been updated so that it is consistently 14.dp regardless of whether the Chip has an icon present or not (was previously 12.dp if icon present and 14.dp if not) ( I34c86 )
رفع اشکال
- Add tests for CurvedRow ( I93cdb )
- Tying Wear Compose dependencies to Compose 1.0.0-rc01. ( Ie6bc9 )
- Changed the handing of background image painting in Cards and Chips so that the image is Cropped rather than being stretched in order to maintain image proportions. ( I29b41 )
- Added more demos and integration tests for Button and ToggleButton. ( 5e27ed2 )
- Added more Chip tests to cover the content colors for imageBackgroundChips ( Ia9183 )
نسخه 1.0.0-alpha01
1 ژوئیه 2021
androidx.wear.compose:compose-foundation:1.0.0-alpha01 and androidx.wear.compose:compose-material:1.0.0-alpha01 are released. نسخه 1.0.0-alpha01 حاوی این commit ها است.
ویژگی های جدید
Wear Compose is a Kotlin, Compose-based library that supports Wear Material design, an extension of Material Design for WearOS wearables. This first alpha release contains early, functional implementations of the following:
- Material theme - configures the colors, typography and shapes consistently across the components used from this library.
- Chip, CompactChip - chips are stadium shaped and variations are available to take icon, label and secondary label content.
- - ToggleChip, SplitToggleChip - a specialized type of chip that includes a slot for a bi-state toggle icon such as a radio button or checkbox. In addition, the SplitToggleChip has two tappable areas, one clickable and one toggleable.
- Button, CompactButton - buttons are circular in shape, with a single content slot for an icon or minimal text (maximum 3 characters).
- ToggleButton - a button that turns an action on or off, with a single slot for icon or minimal text (maximum 3 characters).
- Card, AppCard - rectangular shaped with rounded corners, offering slots for content such as app icon, time, title and body.
Future releases will extend the Widget set adding support for Wear Material Design pickers, sliders, lists, page indicators, dialogs, scroll rsb indicators, toasts and more.
Additionally support will be provided for other Wearable Specific features such as curved layouts and text, as well as scaffolding to make it easy for developers to build Wearable apps/overlays.
Wear Compose Material is designed with the same principles as Compose Material, although being targeted at wearables. The Wear Compose Material library should be used in place of the Compose Material library when building for a Wearable device.
The two “Material” libraries should be considered mutually exclusive and should not be mixed in the same app. If developers find themselves including the Compose Material library in their dependencies it would suggest that either a) there are components missing from the Wear Compose Material library, please let us know what you need, or b) are using a component that we do not recommend for use on a Wearable Device.