نوشتن را بپوشید

با ارائه قابلیت‌هایی برای پشتیبانی از اندازه‌های مختلف دستگاه و حرکات ناوبری، می‌توانید با استفاده از Jetpack Compose برنامه‌هایی برای دستگاه‌های Wear OS بنویسید.
آخرین به‌روزرسانی انتشار پایدار کاندیدای انتشار انتشار بتا انتشار آلفا
۲۲ اکتبر ۲۰۲۵ ۱.۵.۴ - - ۱.۶.۰-آلفا۰۴

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

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

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

شیار

dependencies {
    implementation "androidx.wear.compose:compose-foundation:1.5.4"

    // For Wear Material Design UX guidelines and specifications
    implementation "androidx.wear.compose:compose-material:1.5.4"

    // For integration between Wear Compose and Androidx Navigation libraries
    implementation "androidx.wear.compose:compose-navigation:1.5.4"

    // For Wear preview annotations
    implementation("androidx.wear.compose:compose-ui-tooling:1.5.4")
    
    // 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.5.4")

    // For Wear Material Design UX guidelines and specifications
    implementation("androidx.wear.compose:compose-material:1.5.4")

    // For integration between Wear Compose and Androidx Navigation libraries
    implementation("androidx.wear.compose:compose-navigation:1.5.4")
    
    // For Wear preview annotations
    implementation("androidx.wear.compose:compose-ui-tooling:1.5.4")

    // 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 کمک می‌کند. اگر مشکلات جدیدی کشف کردید یا ایده‌هایی برای بهبود این کتابخانه دارید، به ما اطلاع دهید. لطفاً قبل از ایجاد یک کتابخانه جدید، نگاهی به مشکلات موجود در این کتابخانه بیندازید. می‌توانید با کلیک بر روی دکمه ستاره، رأی خود را به یک مشکل موجود اضافه کنید.

ایجاد یک مسئله جدید

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

پوشیدنی نوشتن نسخه ۱.۶

نسخه ۱.۶.۰-آلفا۰۴

۲۲ اکتبر ۲۰۲۵

androidx.wear.compose:compose-*:1.6.0-alpha04 منتشر شد. نسخه 1.6.0-alpha04 شامل این کامیت‌ها است.

تغییرات API

  • پیاده‌سازی reverseLayout برای TransformingLazyColumn ( I19f9e ، b/352513793 )
  • آیکون ConfirmationDialogDefaults.VariantFailureIcon برای استفاده در FailureConfirmationDialog اضافه شد. این آیکون خطای عمومی جدید ممکن است در برخی موارد، در مقایسه با ConfirmationDialogDefaults.FailureIcon که اتصال قطع شده به تلفن را نشان می‌دهد، ترجیح داده شود. ( Ifc851 , b/443115305 )

رفع اشکالات

  • بهبود عملکرد Picker با بازسازی استفاده از LaunchedEffect . ( I94519 , b/418192973 )
  • اشکالی در SwipeDismissableNavHost در API36+ برطرف شد، که در آن فشردن دکمه بازگشت در حین انیمیشن پیش‌بینی‌کننده بازگشت، انیمیشن را متوقف و مجدداً راه‌اندازی می‌کرد. پیاده‌سازی اکنون از SeakableTransitionState.animateTo به جای Animatable استفاده می‌کند، که کمی بهبود عملکرد دارد. ( I2241f ، b/428156670 )
  • اشکالی که در مرتب‌سازی اعلان‌های دسترسی‌پذیری در AlertDialog وجود داشت، برطرف شد. در این مشکل، دکمه تأیید به جای «Confirm.Button» استاندارد، به صورت «Button.Confirm» نمایش داده می‌شد. ( Ic2381 ، b/429378202 )
  • بهبود نمایش اعداد TimePicker در صفحه نمایش‌های کوچک. ( I68386 ، b/447625365 )
  • شاخه Lazy Layout از Wear Compose Foundation حذف شد - این بدان معناست که TransformingLazyColumn اکنون از پیاده‌سازی Lazy Layout از Compose Foundation، شامل پیش‌واکشی، استفاده می‌کند و در بیشتر موارد از بهبود عملکرد در زمان‌بندی فریم‌ها بهره‌مند می‌شود. ( Idd743 ، b/445911630 )

نسخه ۱.۶.۰-آلفا۰۳

۸ اکتبر ۲۰۲۵

androidx.wear.compose:compose-*:1.6.0-alpha03 منتشر شد. نسخه 1.6.0-alpha03 شامل این کامیت‌ها است.

تغییرات API

  • پارامتری به TimePicker اضافه شد تا مؤلفه زمانی که در ابتدا مورد توجه قرار گرفته است را مشخص کند. انتخاب به طور پیش‌فرض بر اساس زبان و TimePickerType روی اولین مؤلفه موجود انجام می‌شود. ( Ie5dfe ، b/437015874 )
  • پارامتر استفاده نشده targetProgress در متد drawCircularProgressIndicator CircularProgressIndicator حذف شد. ( Ieeb3c ، b/430544552 )

رفع اشکالات

  • پیاده‌سازی پشتیبانی از TransformingLazyColumn verticalAlignment - اکنون از چیدمان‌های استاندارد که از بالا، پایین یا مرکز محور هستند، پشتیبانی می‌کند. ( I2e630 ، b/444143326 )
  • بهبود محاسبه عرض متن منحنی برای در نظر گرفتن فضاهای قبل و بعد از متن (ممکن است اسکرین‌شات‌هایی که شامل متن منحنی هستند، به خصوص وقتی پس‌زمینه‌ای مانند TimeText دارند، خراب شوند). ( I924a4 ، b/446601899 )
  • WarpedCurvedTextRenderer بنیاد Compose به‌روزرسانی شد تا EmojiCompatInitializer از androidx.emoji2 انتخاب کند تا خطای کلاس زمان اجرا برطرف شود. ( I589b4 ، b/444422736 )
  • ScalingLazyColumn به‌روزرسانی شد تا روی گره قابل اسکرول با CollectionInfo تمرکز کند، به طوری که در زمینه‌های بیشتری، مانند Material3 AlertDialog ، با rotary نیز کار کند ( I6be3c ، b/445332360 ).

نسخه ۱.۶.۰-آلفا۰۲

۲۴ سپتامبر ۲۰۲۵

androidx.wear.compose:compose-*:1.6.0-alpha02 منتشر شد. نسخه 1.6.0-alpha02 شامل این کامیت‌ها است.

تغییرات API

  • بهبود رندر متن منحنی، به ویژه برای فونت‌های خطی، با معرفی قابلیت تاب دادن متن با استفاده از پارامتر جدید CurvedTextStyle warpOffset ( If5dcb ).

رفع اشکالات

  • بهینه‌سازی ذخیره‌سازی انیمیشن آیتم‌ها هنگام اسکرول در TransformingLazyColumn ( I62ae8 )
  • نسخه‌های OpenOnPhoneDialog و ConfirmationDialog به‌روزرسانی شده‌اند تا مقدار FLAG_KEEP_SCREEN_ON تنظیم کنند، به طوری که انیمیشن‌ها تا انتها اجرا شوند و دیالوگ‌ها طبق انتظار خود به خود بسته شوند. ( Iad7d4 )
  • اشکالی که باعث می‌شد Modifier.edgeSwipeToDismiss هنگام استفاده با SwipeDismissableNavHost در API 36 به بعد از کار بیفتد، برطرف شد. ( Ifc13d )
  • مستندات و نظرات مربوط به پارامتر جدید CurvedTextStyle warpOffset به‌روزرسانی شد تا به درستی به حالت نامشخص (Unspecified) اشاره کند. ( I41aa5 )

نسخه ۱.۶.۰-آلفا۰۱

۱۰ سپتامبر ۲۰۲۵

androidx.wear.compose:compose-*:1.6.0-alpha01 منتشر شد. نسخه 1.6.0-alpha01 شامل این کامیت‌ها است.

تغییرات API

  • انواع غیرقابل کلیک برای Card ، TitleCard ، OutlinedCard و AppCard اضافه شد ( I509bb ، b/406690146 )
  • پارامتر interactionSource از APIهای کارت‌های غیرقابل کلیک جدید حذف شد. ( If0c7a ، b/440323280 )
  • یک نوع MinutesSeconds جدید به کامپوننت TimePicker اضافه شد که فقط ستون‌های دقیقه و ثانیه را نمایش می‌دهد و ستون ساعت را حذف می‌کند ( Ia9e94 ، b/438004664 )

رفع اشکالات

  • رفع مشکل استفاده از پارامتر اصلاح‌کننده HorizontalPagerScaffold به گونه‌ای که HorizontalPager در صورت اضافه کردن Modifier.fillMaxSize() ‎ ( I07ae1 ، b/441682601 ) نشانگر صفحه را از دست ندهد.
  • جهت ScrollIndicator به طور پیش‌فرض با جهت طرح‌بندی محتوا هم‌تراز می‌شود. ( I0da0f ، b/441489028 )
  • مشکل ScrollAway هنگام استفاده با TransformingLazyColumn برطرف شد. TimeText پس از رفتن به صفحه دیگر و برگشتن به عقب، به درستی پیمایش نمی‌شد. ( Ic0ef1 ، b/433549148 )
  • اصلاح گزارش‌دهی TransformingLazyColumn از معانی SCROLL_BACKWARDS و SCROLL_FORWARDS برای موارد لبه‌ای در بالا/پایین صفحه نمایش. ( I5c28d ، b/405205994 )
  • رفع اشکال در SwipeDismissableNavHost که انتقال‌های در حال انجام پس از کشیدن به عقب در API 36 به عنوان تکمیل‌شده علامت‌گذاری نمی‌شدند. ( Ife72e ، b/441089689 )
  • مقدار پیش‌فرض OpenOnPhoneMaxSweepAngle به ۲۰۰ درجه به‌روزرسانی کنید تا از کوتاه شدن برخی از ترجمه‌های عبارت «Check your phone» جلوگیری شود. ( Ib2e4c , b/428243902 )

نسخه ۱.۵ را بپوشید (Wear Compose)

نسخه ۱.۵.۴

۲۲ اکتبر ۲۰۲۵

androidx.wear.compose:compose-*:1.5.4 منتشر شد. نسخه ۱.۵.۴ شامل این کامیت‌ها است.

رفع اشکالات

  • بهبود عملکرد Picker با بازسازی استفاده از LaunchedEffect . ( I94519 , b/418192973 )
  • اشکالی در SwipeDismissableNavHost در API36+ برطرف شد، که در آن فشردن دکمه بازگشت در حین انیمیشن پیش‌بینی‌کننده بازگشت، انیمیشن را متوقف و مجدداً راه‌اندازی می‌کرد. پیاده‌سازی اکنون از SeakableTransitionState.animateTo به جای Animatable استفاده می‌کند، که کمی بهبود عملکرد دارد. ( I2241f ، b/428156670 )
  • اشکالی که در مرتب‌سازی اعلان‌های دسترسی‌پذیری در AlertDialog وجود داشت، برطرف شد. در این مشکل، دکمه تأیید به جای «Confirm.Button» استاندارد، به صورت «Button.Confirm» نمایش داده می‌شد. ( Ic2381 ، b/429378202 )

نسخه ۱.۵.۳

۸ اکتبر ۲۰۲۵

androidx.wear.compose:compose-*:1.5.3 منتشر شد. نسخه ۱.۵.۳ شامل این کامیت‌ها است.

رفع اشکالات

  • پیاده‌سازی پشتیبانی از TransformingLazyColumn verticalAlignment - اکنون از چیدمان‌های استاندارد که از بالا، پایین یا مرکز محور هستند، پشتیبانی می‌کند. ( I2e630 ، b/444143326 )

نسخه ۱.۵.۲

۲۴ سپتامبر ۲۰۲۵

androidx.wear.compose:compose-*:1.5.2 منتشر شد. نسخه ۱.۵.۲ شامل این کامیت‌ها است.

رفع اشکالات

  • بهینه‌سازی ذخیره‌سازی انیمیشن آیتم‌ها هنگام اسکرول در TransformingLazyColumn ( I62ae8 )
  • تغییرات OpenOnPhoneDialog و ConfirmationDialog برای تنظیم FLAG_KEEP_SCREEN_ON به‌روزرسانی شده‌اند، به طوری که انیمیشن‌ها تا انتها اجرا می‌شوند و دیالوگ‌ها طبق برنامه خودبه‌خود حذف می‌شوند. ( Iad7d4 )
  • اشکالی که باعث می‌شد Modifier.edgeSwipeToDismiss هنگام استفاده با SwipeDismissableNavHost در API 36 به بعد از کار بیفتد، برطرف شد. ( Ifc13d )
  • مستندات و نظرات مربوط به پارامتر جدید CurvedTextStyle warpOffset به‌روزرسانی شد تا به درستی به حالت نامشخص (Unspecified) اشاره کند. ( I41aa5 )

نسخه ۱.۵.۱

۱۰ سپتامبر ۲۰۲۵

androidx.wear.compose:compose-*:1.5.1 منتشر شد. نسخه ۱.۵.۱ شامل این کامیت‌ها است.

رفع اشکالات

  • رفع مشکل استفاده از پارامتر اصلاح‌کننده HorizontalPagerScaffold به گونه‌ای که HorizontalPager در صورت اضافه کردن Modifier.fillMaxSize() ‎ ( I07ae1 ، b/441682601 ) نشانگر صفحه را از دست ندهد.
  • جهت ScrollIndicator به طور پیش‌فرض با جهت طرح‌بندی محتوا هم‌تراز می‌شود. ( I0da0f ، b/441489028 )
  • مشکل ScrollAway هنگام استفاده با TransformingLazyColumn برطرف شد. TimeText پس از رفتن به صفحه دیگر و برگشتن به عقب، به درستی پیمایش نمی‌شد. ( Ic0ef1 ، b/433549148 )
  • اصلاح گزارش‌دهی TransformingLazyColumn از معانی SCROLL_BACKWARDS و SCROLL_FORWARDS برای موارد لبه‌ای در بالا/پایین صفحه نمایش. ( I5c28d ، b/405205994 )
  • رفع اشکال در SwipeDismissableNavHost که انتقال‌های در حال انجام پس از کشیدن به عقب در API 36 به عنوان تکمیل‌شده علامت‌گذاری نمی‌شدند. ( Ife72e ، b/441089689 )
  • مقدار پیش‌فرض OpenOnPhoneMaxSweepAngle به ۲۰۰ درجه به‌روزرسانی کنید تا از کوتاه شدن برخی از ترجمه‌های عبارت «Check your phone» جلوگیری شود. ( Ib2e4c , b/428243902 )

نسخه ۱.۵.۰

۲۷ آگوست ۲۰۲۵

androidx.wear.compose:compose-*:1.5.0 منتشر شد. نسخه ۱.۵.۰ شامل این کامیت‌ها است.

تغییرات مهم از زمان ۱.۴.۰

اولین نسخه از کتابخانه Wear Compose Material 3 که از سیستم طراحی جدید Material 3 Expressive پشتیبانی می‌کند. این نسخه شامل موارد زیر است:

  • به‌روزرسانی MaterialTheme و قالب‌بندی رنگی پویا.
  • کامپوننت‌های جدید AppScaffold, ScreenScaffold ، HorizontalPagerScaffold و VerticalPagerScaffold برای طرح‌بندی ساختار صفحه نمایش و هماهنگ‌سازی انیمیشن‌های ScrollIndicator ، TimeText ، HorizontalPageIndicator و VerticalPageIndicator .
  • تغییر شکل IconButton ، TextButton ، IconToggleButton و TextToggleButton ، با انواع مختلفی که هنگام فشار دادن یا تیک زدن، متحرک می‌شوند.
  • EdgeButton ) که شکل خاصی برای پایین صفحه نمایش طراحی کرده است.
  • ButtonGroup یک گروه رسا از دکمه‌ها را در یک ردیف پیاده‌سازی می‌کند که هنگام لمس، شکل و فرم خود را تغییر می‌دهند.
  • AlertDialog و ConfirmationDialog با تغییراتی برای محتوای دیالوگ اضافی.
  • کامپوننت‌های TimePicker و DatePicker .
  • شاخص‌های پیشرفت شامل CircularProgressIndicator (با تغییرات قطعه‌بندی‌شده)، ArcProgressIndicator و LinearProgressIndicator می‌شوند.

علاوه بر این، Wear Compose Foundation 1.5.0 شامل موارد زیر است:

  • TransformingLazyColumn ، یک لیست با قابلیت پیمایش عمودی و تنبل که از انیمیشن‌های تغییر مقیاس و شکل‌دهی پشتیبانی می‌کند.
  • پشتیبانی از صفحه‌بندی در Wear Compose Foundation با HorizontalPager و VerticalPager .
  • گروه‌های کانونی سلسله مراتبی - برای حاشیه‌نویسی اجزای قابل ترکیب در یک برنامه کاربردی استفاده می‌شود تا بخش فعال ترکیب را پیگیری کرده و کانون را هماهنگ کند.

درباره ( Material 3 Expressive برای Wear OS ) بیشتر بخوانید

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

نسخه ۱.۵.۰-rc02

۱۳ آگوست ۲۰۲۵

androidx.wear.compose:compose-*:1.5.0-rc02 منتشر شد. نسخه 1.5.0-rc02 شامل این کامیت‌ها است.

رفع اشکالات

  • اشکالی در TimePicker برطرف شد که در آن رشته‌های طولانی و بین‌المللی برای دوره (AM/PM) می‌توانستند طرح‌بندی را مختل کنند. ( I0fa81 )

نسخه ۱.۵.۰-rc01

۳۰ ژوئیه ۲۰۲۵

androidx.wear.compose:compose-*:1.5.0-rc01 منتشر شد. نسخه 1.5.0-rc01 شامل این کامیت‌ها است.

رفع اشکالات

  • 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 اکنون برای هر دو LayoutDirections چپ به راست و راست به چپ ( I6d427 ) ثابت است.
  • SwipeToReveal برای اقدامات در مرکز عمودی دوباره برقرار شد. اگر hasPartiallyRevealedState = true باشد، RevealState باید هنگام وقوع پیمایش، به RevealValue.Covered توسط فراخواننده بازنشانی شود. ( I6473d )
  • SwipeDismissableNavHost اکنون به درستی محتوا را برای API 36 به بعد برش می‌دهد. ( Ib9a44 )

نسخه ۱.۵.۰-بتا۰۶

۱۶ ژوئیه ۲۰۲۵

androidx.wear.compose:compose-*:1.5.0-beta06 منتشر شد. نسخه 1.5.0-beta06 شامل این کامیت‌ها است.

رفع اشکالات

  • رفع مشکل انیمیشن EdgeButton وقتی که LazyColumn یا ScalingLazyColumn دارای reverseLayout = true هستند. ( I46a1a )
  • اشکالی در ScreenScaffold که باعث می‌شد در صورت ارائه ScrollIndicator/PageIndicator لمس برای کاوش در Talkback کار نکند، برطرف شد. ( I6dcee )
  • TransformingLazyColumn اکنون با خواندن مقدار itemHeight ارائه شده توسط TransformationSpec در background painter، امکان تغییر شکل سفارشی از TransformationSpec را فراهم می‌کند. ( I6a599 )
  • انتقال رنگ‌های فعال/غیرفعال‌شده‌ی انیمیشنی برای IconButton ، برای سازگاری با IconToggleButton . ( Ife10a )
  • برای جلوگیری از پرش قابل توجه به حداقل اندازه نقطه هنگام انیمیشن، حداقل بخش‌بندی در CircularProgressIndicator حذف شد. به عنوان بخشی از این تغییر، پارامتر targetProgress در drawCircularProgressIndicator اکنون استفاده نمی‌شود. ( I33309 )
  • Picker اکنون نقش معنایی ValuePicker را دارد که می‌تواند توسط خوانندگان صفحه نمایش برای دسترسی بیشتر به pickerها استفاده شود. Picker همچنین برچسب‌های کلیک دسترسی به‌روزرسانی شده‌ای دارد که بین تنظیم مقدار در حالت فقط خواندنی و انتخاب مقدار فعلی در حالت دیگر تفاوت قائل می‌شوند. ( I33309 )

نسخه ۱.۵.۰-بتا۰۵

۲ ژوئیه ۲۰۲۵

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 )
  • مدیریت آیتم‌های anchor در TransformingLazyColumn هنگام حذف آیتم‌ها اصلاح شد. ( I841a8 )
  • PickerGroup اکنون وقتی که autocentering فعال است و picker انتخاب شده (در مرکز) تغییر می‌کند، Pickerها را به صورت افقی متحرک می‌کند. ( Ic82c4 )

نسخه ۱.۵.۰-بتا۰۴

۱۸ ژوئن ۲۰۲۵

androidx.wear.compose:compose-*:1.5.0-beta04 منتشر شد. نسخه 1.5.0-beta04 شامل این کامیت‌ها است.

رفع اشکالات

  • رفع اشکال طرح‌بندی در TransformingLazyColumn ، که در آن محتوایی که درون صفحه نمایش قرار می‌گیرد، اکنون به درستی از بالای صفحه ترازبندی می‌شود ( I80115 )
  • مشکلی که در TransformingLazyColumn وجود داشت و باعث می‌شد آیتم پایینی هنگام اسکرول کردن به پایین‌ترین قسمت لیست با EdgeButton به اشتباه مقیاس‌بندی شود، برطرف شد. روند اسکرول اکنون هنگام بازیابی طرح‌بندی، از یک گرادیان نزولی پیروی می‌کند. ( Iea375 )
  • TransformingLazyColumn اکنون ارتفاع آیتم را درون background painter می‌خواند، که TransformationSpecs سفارشی اجازه می‌دهد تا morphing را پیاده‌سازی کند. ( I022f0 )
  • SwipeToReveal اکنون اقدامات آشکار شده را به درستی در مرکز عمودی قرار می‌دهد. ( I4419b )
  • اشکالی در SwipeToReveal که مانع از عملکرد صحیح آن با swipe-to-dismiss در صورت استفاده همزمان از view و compose در صفحه می‌شد، برطرف شد. ( I5dc0e )
  • اشکالی که باعث می‌شد اکشن‌های SwipeToReveal هنگام اسکرول با یک انحراف عمودی ترسیم شوند، برطرف شد ( I29444 )
  • AlertDialog ، ConfirmationDialog ، OpenOnPhoneDialog و SwipeToReveal اکنون paddingها و اندازه‌هایی را که به صورت درصدی از اندازه صفحه نمایش محاسبه می‌شوند، گرد می‌کنند. ( I76367 )
  • ButtonDefaults.outlinedButtonBorder اکنون پس از فعال/غیرفعال کردن وضعیت، به‌روزرسانی می‌شود و اندازه ( If2ddd ) را تغییر می‌دهد.
  • اشکالی که در ارتفاع EdgeButton در صفحات نمایش پیچیده با Pager و ScreenScaffold رخ می‌داد، برطرف شد. ( I946e3 )
  • مشکل رقابتی که می‌توانست باعث توقف انیمیشن‌های Placeholder شود، برطرف شد ( I53530 )
  • بهبود عملکرد HorizontalPageIndicator و VerticalPageIndicator با ترسیم روی Canvas. ( Ifae1e )
  • شکل EdgeButton اصلاح شد تا انتقال بین بیضی و دایره‌هایی که طرح کلی را تشکیل می‌دهند، نرم‌تر شود. ( I7721e )
  • اشکالی در LevelIndicator که باعث توقف انیمیشن‌ها به دلیل ترکیب‌بندی‌های غیرضروری می‌شد، برطرف شد ( I45d08 )

نسخه ۱.۵.۰-بتا۰۳

۴ ژوئن ۲۰۲۵

androidx.wear.compose:compose-*:1.5.0-beta03 منتشر شد. نسخه 1.5.0-beta03 شامل این کامیت‌ها است.

تغییرات API

  • OpenOnPhoneDialog اکنون فقط متن پیام را در TalkBack اعلام می‌کند و از معنای آیکون صرف نظر می‌کند. OpenOnPhoneDialogDefaults به‌روزرسانی شده است تا پارامتر iconContentDescription و contentDescription از icon() حذف کند. همچنین، ConfirmationDialogDefaults اکنون پارامترهای اصلاح‌کننده‌ای در ترکیب‌های SuccessIcon و FailureIcon دارد. ( Id2ae2 )

رفع اشکالات

  • ترتیب اعمال افکت پارامترهای SurfaceTransformation تغییر کرد. پیش از این، تبدیل‌های اعمال شده به کامپوننت‌های Wear Material3 به صورت زیر انجام می‌شد: background painter، container transformation، content transformation. اکنون، دو مورد اول معکوس شده‌اند و ما هر اصلاح‌کننده‌ای که بین آنها ارسال می‌شود را اعمال می‌کنیم، بنابراین تحت تأثیر تبدیل‌های container قرار می‌گیرد. این مورد مواردی مانند استفاده از یک افکت چشمک‌زن placeholder با عناصر در یک TLC با استفاده از پارامتر transformation را برطرف می‌کند. ( I786cf )
  • RevealState.Saver اضافه شده است تا برای بازیابی وضعیت SwipeToReveal هنگام ایجاد مجدد فعالیت یا فرآیند استفاده شود. تابع rememberRevealState اکنون به طور پیش‌فرض از این Saver استفاده می‌کند. ( Ie0ecb )
  • دکمه‌های عملیات اولیه و ثانویه SwipeToReveal باید به طور پیش‌فرض روی ButtonDefault.Height تنظیم شوند (اشکالی که در آن این دکمه‌ها حداکثر ارتفاع را برای دکمه‌های بلندتر پر می‌کردند، برطرف شد). ( Ibfba1 )
  • تغییر SwipeToReveal برای تنظیم مجدد آخرین کامپوننتی که با آن تعامل داشته است، زمانی که حرکت کشیدن به راست انجام می‌شود. ( Ia8450 )
  • SwipeToReveal تغییر داده شد تا در حالت Revealing قرار گیرد، زمانی که موقعیت انتهایی کشیدن انگشت بین لنگرهای آشکار شده و آشکار شده قرار دارد و به لنگر آشکار شدن نزدیک‌تر است. ( If4458 )
  • اکنون محتوای ButtonGroup به درستی در طرح RTL معکوس شده است ( Ib378d )
  • AnimatedText اکنون از جهت متن RTL (Rate Text) پشتیبانی می‌کند ( I4533c )
  • TransformingLazyColumn اکنون وقتی آیتم پایینی حذف می‌شود، اندازه آیتم‌ها را به درستی تغییر می‌دهد ( Idacab )
  • TransformingLazyColumn اکنون فقط یک مرحله اندازه‌گیری انجام می‌دهد که با کاهش زمان فریم، عملکرد را بهبود می‌بخشد. ( I501a1 )

نسخه ۱.۵.۰-بتا۰۲

۲۰ مه ۲۰۲۵

androidx.wear.compose:compose-*:1.5.0-beta02 منتشر شد. نسخه 1.5.0-beta02 شامل این کامیت‌ها است.

رفع اشکالات

  • پروفایل‌های پایه برای کتابخانه‌های فونداسیون، متریال و متریال۳ به‌روزرسانی شدند. ( I53f06 )
  • رفع اشکال در TransformingLazyColumn ، که در آن آیتم‌ها هنگام حذف آیتم پایینی تغییر اندازه می‌دادند. ( Idacab )
  • اشکالی که در TransformingLazyColumn وجود داشت و باعث می‌شد لیست در بالا یا پایین لیست گیر کند، برطرف شد ( I49d00 )
  • OpenOnPhoneDialog در TalkBack باید متن منحنی را اعلام کند، نه توضیحات محتوای آیکون. ( I4efe8 )
  • اشکالی در SwipeToReveal که باعث می‌شد وقتی hasPartiallyRevealedState روی false تنظیم شده است، لنگر اشتباه را در RevealState.currentValue گزارش دهد، برطرف شد. ( I9c7cf )
  • دکمه‌های لغو SwipeToReveal اکنون به طور پیش‌فرض ButtonDefaults.Height هستند. ( I1f6c8 )
  • عملکرد BasicSwipeToDismissBox با حذف استفاده از Canvas برای ترسیم اسکریم بهبود یافته است. ( I68f2c )
  • رفع اشکال دسترسی در اسلایدر، که در آن درصد اعلام شده با مقدار پس از به‌روزرسانی‌ها مطابقت نداشت ( I91146 )
  • اشکالی در پیاده‌سازی placeholderShimmer برطرف شد. ( IEe39b)
  • با بهینه‌سازی محاسبه‌ی ScrollProgress به میزان 30 درصد، عملکرد TransformingLazyColumn بهبود یافته است. ( I4c4cb )

نسخه ۱.۵.۰-بتا۰۱

۷ مه ۲۰۲۵

androidx.wear.compose:compose-*:1.5.0-beta01 منتشر شد. نسخه 1.5.0-beta01 شامل این کامیت‌ها است.

نسخه ۱.۵.۰-بتا۰۱ از Compose برای 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 دکمه انتخاب موجود است (انواع «تقسیم‌شده» دکمه‌های تغییر وضعیت و انتخاب نیز ارائه شده است).
  • ButtonGroup - یک گروه رسا از دکمه‌ها را در یک ردیف پیاده‌سازی می‌کند که هنگام لمس، شکل می‌گیرند.
  • انواع AlertDialog از دکمه‌های ok/cancel یا EdgeButton پشتیبانی می‌کنند.
  • ConfirmationDialog برای نمایش پیام با زمان انقضا در دسترس است و از انیمیشن‌های ویژه برای موفقیت، شکست و انواع باز شدن روی گوشی پشتیبانی می‌کند.
  • انتخابگرها - انواع TimePicker و DatePicker و همچنین کامپوننت‌های Picker و PickerGroup برای ساخت صفحات انتخابگر شخصی شما پشتیبانی می‌شوند.
  • ProgressIndicators - شاخص‌های پیشرفت دایره‌ای و خطی پشتیبانی می‌شوند (شاخص CircularProgressIndicator دارای تغییرات قطعه‌بندی شده و نامشخص است).
  • کارت‌ها - تعدادی از انواع کارت‌ها موجود است، از جمله TitleCard که طرح‌بندی‌های خاصی را برای کارت‌هایی با عنوان، زمان، زیرنویس یا جایگاه‌های محتوا ارائه می‌دهد. TitleCard همچنین می‌تواند یک تصویر پس‌زمینه برای تقویت معنای اطلاعات موجود در کارت داشته باشد.
  • Pagers - کامپوننت‌های HorizontalPagerScaffold ، VerticalPagerScaffold و AnimatedPage انیمیشن‌های HorizontalPageIndicator و VerticalPagerIndicator را هماهنگ می‌کنند. HorizontalPager و VerticalPager در کتابخانه Wear Compose Foundation منتشر شده‌اند.
  • جانگهدارها - برای موقعیت‌هایی که هیچ محتوای موقتی در دسترس نیست، یک شکل اسکلتی روی یک جزء ترسیم می‌کند.
  • اسلایدرها و استپرها - هم اسلایدرها و هم استپرها به کاربران اجازه می‌دهند از بین طیف وسیعی از مقادیر انتخاب کنند. اسلایدرها فشرده‌تر هستند و می‌توانند تقسیم‌بندی شوند، در حالی که استپر یک جزء تمام صفحه است که معمولاً با یک StepperLevelIndicator جفت می‌شود.
  • SwipeToReveal - برای افزودن اقدامات اضافی به یک composable هنگام کشیدن از راست به چپ استفاده می‌شود.

علاوه بر این، Wear Compose Foundation 1.5.0-beta01 شامل این اجزای جدید است:

  • TransformingLazyColumn - یک لیست تنبل با قابلیت اسکرول عمودی که از انیمیشن‌های تغییر مقیاس و شکل‌دهی پشتیبانی می‌کند.
  • گروه‌های تمرکز سلسله مراتبی - برای حاشیه‌نویسی اجزای قابل ترکیب در یک برنامه، پیگیری بخش فعال ترکیب و هماهنگ‌سازی تمرکز استفاده می‌شود.
  • Pagers - کامپوننت‌های HorizontalPager و VerticalPager ، ساخته شده بر روی کامپوننت‌های Compose Foundation با بهبودهای مخصوص Wear برای بهبود عملکرد و پایبندی به دستورالعمل‌های Wear OS.

تغییرات API

  • به‌روزرسانی رابط برنامه‌نویسی کاربردی (API) Hierarchical Focus - تغییر نام Modifier.hierarchicalFocus به Modifier.hierarchicalFocusGroup و حذف پارامتر فراخوانی؛ حذف سربار Modifier.hierarchicalFocusRequester با پارامتر FocusRequester ؛ ایجاد یک CompositionLocal و LocalScreenIsActive جدید تا کامپوننت‌ها بتوانند صفحه فعال را تشخیص داده و بررسی کنند ( I5ff7c ).
  • SwipeToReveal از Wear Compose Foundation منسوخ شده و APIهای SwipeToReveal در Wear Compose Material و Wear Compose Material3 جایگزین شده‌اند. لطفاً برای ادامه استفاده از APIها، ایمپورت‌های Wear Foundation SwipeToReveal با ایمپورت‌های Wear Compose Material/ Wear Compose Material3 جایگزین کنید. ( Ia147d ).
  • وابستگی‌های Wear Compose Material3 SwipeToReveal روی Foundation به بسته material3 منتقل شدند، مانند RevealValue ، RevealDirection ، RevealActionType ، RevealState ، rememberRevealState . توسعه‌دهندگان باید importهای این کلاس‌ها و توابع را از androidx.wear.compose.foundation به androidx.wear.compose.material3 ( I640e6 ) تغییر دهند.
  • API مربوط به Wear Compose Material3 SwipeToReveal به شرح زیر به‌روزرسانی شد: پارامترهای primaryAction ، onFullSwipe ، secondaryAction ، undoPrimaryAction ، undoSecondaryAction و hasPartiallyRevealedState به کامپوننت SwipeToReveal اضافه شد؛ امکان سفارشی‌سازی positionalThreshold و animationSpec از RevealState حذف شد؛ lastActionType ، revealThreshold و width از RevealState حذف شد؛ سازنده RevealState تغییر کرد تا به جای anchors، یک RevealDirection بپذیرد؛ توابع createRevealAnchors ، anchors و bidirectionalAnchors حذف شدند؛ توابع SwipeToRevealScope primaryAction ، secondaryAction ، undoPrimaryAction و undoSecondaryAction به PrimaryActionButton ، SecondaryActionButton ، UndoActionButton تغییر نام داده و به توابع Composable تبدیل شدند؛ RevealActionType به عنوان داخلی علامت‌گذاری شد. ( I885d0 ). (این عبارت به نظر مجموعه‌ای تصادفی از حروف و اعداد است و معنای قابل ترجمه‌ای ندارد.)
  • API SwipeToReveal به شرح زیر به‌روزرسانی شد: نام onFullSwipe به onSwipePrimaryAction تغییر یافت؛ نام SwipeToRevealNonAnchoredSample تغییر یافت تا استفاده از پارامتر hasPartiallyRevealedState را نشان دهد؛ actionButtonHeight حذف شد، زیرا مقدار پیش‌فرض، ارتفاع پیش‌فرض دکمه است و ارتفاع بزرگتر را می‌توان با استفاده از یک اصلاح‌کننده تنظیم کرد؛ SmallActionButtonHeight از SwipeToRevealDefaults حذف شد؛ پارامتر value در سازنده‌های RevealValue و RevealDirection به صورت private ( I465ce ) تنظیم شد.

رفع اشکالات

  • مشکل مدیریت EdgeButton در ScreenScaffold برطرف شد، به طوری که پس از حذف یک آیتم TransformingLazyColumn ، EdgeButton با انیمیشن در جای خود قرار می‌گرفت ( I6d366 ).
  • وابستگی‌های Wear Compose در کتابخانه‌های Compose به نسخه ۱.۸.۰ ( I2ef3f ) به‌روزرسانی شد.
  • حرکت CircularProgressIndicator نامشخص به‌روزرسانی شد تا دیگر به طور موقت پسرفت نکند. ( Ieddb1 ).
  • اشکال SwipeDismissableNavHost برطرف شد - فوکوس پس از کشیدن به عقب به درستی تغییر نمی‌کرد و باعث می‌شد ورودی چرخشی از کار بیفتد (این مشکل برای API 36+ بود که از پیش‌بینی به عقب استفاده می‌کند). ( Ieddb1 ).
  • مستندات اصلاح‌شده برای رابط برنامه‌نویسی کاربردی سلسله مراتبی فوکوس ( Idf2ff ).
  • مستندات مربوط به Button و Card به‌روزرسانی شد تا بیان شود که چگونه containerPainter و disabledContainerPainter ، containerColor و disabledContainerColor را نادیده می‌گیرند ( I4a453 ).
  • تغییر TimeText در نسخه قبلی که BroadcastReceiver به یک thread worker منتقل می‌کرد، به حالت قبل برگردانده شد، زیرا این تغییر برای برنامه‌هایی که threading خود را در حین پیمایش مدیریت می‌کنند، مشکلاتی ایجاد می‌کرد ( I34d02 ).
  • نمونه‌های Picker به‌روزرسانی شدند تا فراخوانی‌های غیرضروری remember حذف شوند و در عوض rememberUpdatedState در Picker برای به خاطر سپردن آخرین تابع lambda contentDescription ( Icb5b1 ) استفاده شود.
  • سبک‌های متن در TimePicker و DatePicker به‌روزرسانی شدند، به طوری که تغییر فونت دیگر منجر به کوتاه شدن متن نمی‌شود. ( I26194 ).
  • اکنون ترازبندی پیش‌فرض متن ListHeader و ListSubHeader به ترتیب روی مرکز و شروع تنظیم شده است ( I78339 ).
  • به‌روزرسانی نمونه‌ها و دموهای Foundation و Material Swipe to Reveal برای اعلام اقدامات دسترسی سفارشی (اقدامات سفارشی باید به صورت معنایی در محتوا اضافه شوند، نه در خود ترکیب‌بندی SwipeToReveal ). ( Ie92a3 ).
  • مقدار پیش‌فرض MaxLines که روی محتوای EdgeButton تنظیم شده بود، بر اساس اندازه آن به‌روزرسانی شد - اکنون برای خیلی کوچک مقدار ۱، برای کوچک و متوسط ​​مقدار ۲ و برای بزرگ مقدار ۳ است ( Ie35f6 ).
  • LocalReduceMotion ساده‌شده به طوری که ناظر فقط یک بار ثبت می‌شود تا عملکرد بهبود یابد. ( Ib1979 ).
  • برای بهبود عملکرد، تعداد ترسیم‌های مجدد در ScrollIndicator به حداقل رسید ( Ia7a67 ).
  • اشکالی در TransformingLazyColumn برطرف شد، که در آن، وقتی EdgeButton به ارتفاع کامل خود می‌رسید، بالاترین آیتم قابل مشاهده در لیست به درستی مقیاس‌بندی نمی‌شد ( I30580 ).

نسخه ۱.۵.۰-آلفا۱۴

۲۳ آوریل ۲۰۲۵

androidx.wear.compose:compose-*:1.5.0-alpha14 منتشر شد. نسخه 1.5.0-alpha14 شامل این کامیت‌ها است.

تغییرات API

  • تمام وابستگی‌های Material SwipeToReveal در Foundation SwipeToReveal به پکیج Material منتقل شدند، مانند RevealValue ، RevealDirection ، RevealActionType ، RevealState ، rememberRevealState . توسعه‌دهندگان باید importهای این کلاس‌ها و توابع را از androidx.wear.compose.foundation به androidx.wear.compose.material تغییر دهند. ( Ib7cb8 )
  • API مربوط به HierarchicalFocusCoordinator به‌روزرسانی شد تا به جای composables، از modifiers استفاده کند.
  • یادداشت‌های مهاجرت:
    • می‌توان HierarchicalFocusCoordinator(function, content) را با اضافه کردن یک Modifier.hierarchicalFocus(function()) به content یا composable محصورکننده جایگزین کرد.
    • 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 )

نسخه ۱.۵.۰-آلفا۱۳

۹ آوریل ۲۰۲۵

androidx.wear.compose:compose-*:1.5.0-alpha13 منتشر شد. نسخه 1.5.0-alpha13 شامل این کامیت‌ها است.

تغییرات API

  • پروژه‌های منتشر شده با کاتلین ۲.۰ برای استفاده به KGP 2.0.0 یا جدیدتر نیاز دارند ( Idb6b5 )
  • ویژگی targetPage به PagerState اضافه شد ( I4de8b )

رفع اشکالات

  • از ترکیب‌بندی مجدد غیرضروری در طول برگشت پیش‌بینی‌شده جلوگیری کنید. ( Iecd6d )
  • مشکل ویژگی isScrollable در ScrollInfoProvider که مقدار فعلی را برمی‌گرداند، برطرف شد. ( Icbfb8 )

نسخه ۱.۵.۰-آلفا۱۲

۲۶ مارس ۲۰۲۵

androidx.wear.compose:compose-*:1.5.0-alpha12 منتشر شد. نسخه 1.5.0-alpha12 شامل این کامیت‌ها است.

تغییرات API

  • پیاده‌سازی پیش‌فرض SwipeToReveal از gestureInclusion را بهبود بخشید تا فقط در صورتی که وضعیت کامپوننت Covered باشد، از حرکات صرف نظر شود. ( I7e3d6 )
  • برای SwipeToReveal ، bidirectionalGestureInclusion به جای یک تابع، به یک مقدار val تبدیل کردیم و @FloatRange به پارامتر edgeZoneFraction در gestureInclusion اضافه کردیم ( Ica7c3 ).

رفع اشکالات

  • تغییر SwipeToReveal bidirectionalGestureInclusion برای برگرداندن یک شیء به جای یک کلاس. ( I29597 )
  • غیرفعال کردن استفاده از فناوری‌های لمسی هنگام اجرای تست‌ها تحت RoboElectric . ( I58bd1 )
  • فاصله‌های بین دکمه‌های محتوا و عملگر و همچنین فاصله بین آیکون و متن دکمه‌های عملگر SwipeToReveal به‌روزرسانی کنید. ( Ic46cb )

نسخه ۱.۵.۰-آلفا۱۱

۱۲ مارس ۲۰۲۵

androidx.wear.compose:compose-*:1.5.0-alpha11 منتشر شد. نسخه 1.5.0-alpha11 شامل این کامیت‌ها است.

تغییرات API

  • PagerState به‌روزرسانی شد، Compose Foundation PagerState به عنوان کلاس پایه حذف و ویژگی‌های currentPage ، currentPageOffsetFraction و pageCount اضافه شدند. رابط GestureInclusion به‌روزرسانی شد و نام متد به ignoreGestureStart تغییر یافت. ( I4ae07 )
  • به عنوان روش پیشنهادی برای دریافت آفست SwipeToDismissBoxState ، requireOffset به SwipeToDismissBoxState اضافه کنید ( I21042 ).
  • CurvedModifier.semantics اضافه شد، که در ابتدا از توصیف محتوا و شاخص پیمایش پشتیبانی می‌کرد ( I0b093 )
  • We have added CurvedModifier.clearAndSetSemantics to provide a means by which curved semantics can be turned off. CurvedText continues to default the content description to the text, but timeTextCurvedText and timeTextSeparator do not now announce their contents. ( I4b568 )
  • HorizontalPager 's default handling of swipe gestures has been renamed to PagerDefaults.gestureInclusion . The default behavior is now to only ignore swipe gestures that start on the left edge of the first page, and only then when Talkback is turned off. In other cases, the default behavior is that swipe gestures will not be ignored by the pager, so they will not be available to swipe-to-dismiss handlers. ( Iee486 )
  • Added rotary overscroll for rotaryScrollable api. Overscroll and nested scroll were added to rotaryScrollable fling behavior. This change should bring on-par overscroll and nested scroll functionality between touch scroll and rotary scroll. ( I71926 )
  • Added support for an edge-swipe zone to SwipeToReveal . Foundation SwipeToReveal 's default behavior is now to disallow swiping when the gesture starts from the edge. Material3 SwipeToReveal 's default behavior is now to disallow swiping when the gesture starts from the edge, when the SwipeDirection is set to single direction. ( I32ef0 )
  • TLC now uses empty contentPadding by default instead of putting first and last items into center. ( I77ab7 )

رفع اشکالات

  • Wear Compose libraries have been updated to the Kotlin 2.0 compiler. ( I2de79 )
  • Fixed the curved LetterSpacing sample on foundation. ( Iebf7c )

Version 1.5.0-alpha10

۲۶ فوریه ۲۰۲۵

androidx.wear.compose:compose-*:1.5.0-alpha10 is released. Version 1.5.0-alpha10 contains these commits .

تغییرات API

  • Make SwipeToRevealDefaults public. ( I0c34c )
  • We have replaced the swipeToDismissEdgeZoneFraction parameter in HorizontalPager . Instead a new parameter, gestureInclusion has been introduced which can be used to achieve necessary swipe to dismiss behaviour. gestureInclusion takes in an instance of GestureInclusion which decides whether the subsequent scroll event should proceed or not. Allowing a gesture means that the Pager consumes it - otherwise, it will be handled elsewhere such as by a swipe-to-dismiss handler. The new default behaviour is to disallow gestures on the leftmost edge of the first page in the Pager, and hence allow swipe to dismiss in this region. All other pages will permit the Pager to consume all gestures, meaning Swipe to dismiss cannot be triggered from them. To achieve Swipe to dismiss behaviour on all pages, simply provide a custom GestureInclusion instance (see PagerDefaults.disableLeftEdgeOnFirstPage ) that ignores the current page. Another breaking change introduced here is that the Pager component is no longer full screen by default, instead add Modifier.fillMaxSize() to achieve this behaviour. ( I9d3aa )
  • We have renamed createAnchors to createRevealAnchors in the swipe-to-reveal API( If5999 )
  • We have removed RevealScope from the swipe-to-reveal API. ( Ie4ad5 )
  • We have removed Revealing and Revealed from RevealValue in the swipe-to-reveal API. ( I8dbc5 )
  • We have renamed SwipeDirection to RevealDirection in the swipe-to-reveal API. ( I7472f )
  • We have changed the signature of the positionalThreshold parameter of SwipeToReveal 's rememberRevealState function. ( I29c0a )
  • We have added a new overscrollEffect parameter added to ScalingLazyColumn , TransformingLazyColumn and ScreenScaffold . ( I0cee8 )
  • When using PagerDefaults#snapFlingBehaviour , the pagerSnapDistance parameter has been replaced with an Int parameter maxFlingPages , which can be used to specify the max number of pages the Pager should fling. ( I8cfc0 )
  • Wear Pager now has its own PagerScope instead of using Compose Foundation PagerScope . ( I9195b )
  • We have added support for lineHeight on Curved text ( I1c936 )
  • We have added initialAnchorItemIndex and initialAnchorItemOffset to TransformingLazyColumnState and rememberTransformingLazyColumnState to that the initial scroll position can be specified in TransformationLazyColumn . ( I0a0d5 )
  • runWithTimingDisabled به نفع runWithMeasurementDisabled منسوخ کنید، که رفتار را واضح‌تر توصیف می‌کند - همه معیارها متوقف می‌شوند. علاوه بر این، سوپرکلاس MicrobenchmarkScope در معرض دید قرار دهید زیرا تعریف مجدد تابع runWithMeasurementDisabled برای دسترسی آزاد امکان‌پذیر نیست، زیرا درون‌خطی است. ( I9e23b ، b/389149423 ، b/149979716 )
  • We have added TransformingLazyColumnItemScrollProgress.Unspecified to the API to avoid boxing on TransformingLazyColumnItemScrollProgress . ( I0835d )

رفع اشکالات

  • Improve Kdoc for CurvedTextStyle ( Id45e3 )
  • We have made SwipeableV2 (part of the SwipeToReveal implementation) internal instead of public but restricted to library group. ( Idbb94 )
  • We have added tests to HierarchicalFocusCoordinator ( I1ce54 , b/395548918 )
  • We have made improvements to SwipeToReveal in wear compose foundation samples. ( I5f307 )
  • Fix scroll axis semantic data for verticalScrollAxisRange in TransformingLazyColumn for accessibility ( I68123 )
  • Improve performance of rotary haptics on Wear4+ by removing unnecessary background threads ( I39cfe )
  • Change SwipeDismissableNavHost to use PredictiveBackNavHost only on API 36 onwards. ( I59bed )
  • We have added a guard against a crash when accessing the reducemotion setting. ( I01e2c )
  • We have implemented prefetching for TransformingLazyColumn to reduce jank ( Icca88 )

Version 1.5.0-alpha09

۲۹ ژانویه ۲۰۲۵

androidx.wear.compose:compose-*:1.5.0-alpha09 is released. Version 1.5.0-alpha09 contains these commits .

تغییرات API

  • On CurvedTextStyle , we have split letter spacing into clockwise letter spacing and counter clockwise letter spacing. This is required because clockwise letters fan out from the baseline whereas counter-clockwise letters fan in (so larger letter spacing is needed) ( I4b848 )
  • The CompositionLocal LocalReduceMotion has been simplified to return a Boolean instead of a ReduceMotion object. The ReduceMotion interface has now been deprecated. Previous invocations such as LocalReduceMotion.current.enabled() can be replaced with LocalReduceMotion.current ( I4937f )
  • In PagerDefaults , snapAnimationSpec has been renamed to SnapAnimationSpec . ( I20c9a )

Version 1.5.0-alpha08

۱۵ ژانویه ۲۰۲۵

androidx.wear.compose:compose-*:1.5.0-alpha08 is released. Version 1.5.0-alpha08 contains these commits .

تغییرات API

  • We have updated all Wear Compose libraries to 'explicit API' mode. ( Iebf9f )
  • We have made the pager's snap animation parameter part of PagerDefaults . ( Ifff64 )
  • We have added an offset parameter was to SwipeToDismissBoxState . ( I586bd )

رفع اشکالات

  • Rotary platform haptics are now called for Wear OS versions after V ( Idb03e )

Version 1.5.0-alpha07

۱۱ دسامبر ۲۰۲۴

androidx.wear.compose:compose-*:1.5.0-alpha07 is released. Version 1.5.0-alpha07 contains these commits .

تغییرات API

  • TransformingLazyColumnState now provides a way to observe the current scroll progress based on anchor item indices. ( I72b01 )
  • We have added animations to TransformingLazyColumn when adding, removing and moving items, if they have the new Modifier.animateItem . ( Iecb9c )
  • TransformingLazyColumn now exposes values for beforeContentPadding and afterContentPadding . ( Iccd5f )
  • TransformingLazyColumn now provides the composition local LocalTransformingLazyColumnItemScope which components (such as Card s and Button s in Material3) can use to automatically morph when placed inside a TransformingLazyColumn . Callers can disable automatic morphing using the new TransformExclusion wrapper. ( I1652f )

رفع اشکالات

  • We have updated min and max fling velocities for rotary on devices targeting U onwards. ( I33559 )
  • We have fixed a crash that occurred if an item in TransformingLazyColumn did not contain any composables ( Idb99d )
  • We have added ScrollFeedbackProvider support for rotary haptics on Android Vanilla ice cream. ( Ibc553 )
  • We have applied an increased touch slop when using SwipeToReveal in order to reduce the chances of accidentally triggering a swipe when vertically scrolling. ( Ic0672 )
  • We have updated SwipeDismissableNavHost to use PredictiveBackHandler when available with API 35 onwards. In that case, new animations will be applied. ( I08c11 )

Version 1.5.0-alpha06

۱۳ نوامبر ۲۰۲۴

androidx.wear.compose:compose-*:1.5.0-alpha06 is released. Version 1.5.0-alpha06 contains these commits .

تغییرات API

  • We have simplified the ScrollInfoProvider for PagerState by removing the orientation parameter, which is no longer needed. The new behavior is for TimeText to remain in place for both horizontal and vertical paging. ( I71767 )
  • TransformingLazyColumn was introduced in earlier releases. We are now removing Wear's LazyColumn aliases (which were forwarding to TransformingLazyColumn ) in favor of the new name TransformingLazyColumn . We have also removed TransformingLazyColumnVisibleItemInfo 's height property - please use measuredHeight instead. ( I0ea1e )
  • We have changed the PagerDefaults.snapFlingBehavior snapAnimationSpec from a Tween to a Spring spec.( I10d02 , b/349781047 , b/303807950 )
  • We have promoted the LocalReduceMotion CompositionLocal to stable ( Ia6f32 )

رفع اشکالات

  • We have updated Modifier.rotaryScrollable to use focusTargetWithSemantics for better semantics support in rotary. ( Ief0a0 )
  • We have updated the minimum API dependency to 1.7.4 for Compose libraries. ( I88b46 )
  • We have disabled width morphing in TransformingLazyColumn as a workaround to a clipping bug. ( I3dfb8 )
  • We have fixed a bug that caused disappearing items after overscroll with TransformingLazyColumn ( Id7668 )
  • We have added LazyLayoutSemantics for TransformingLazyColumn . ( Ia8f56 )

Version 1.5.0-alpha05

۳۰ اکتبر ۲۰۲۴

androidx.wear.compose:compose-*:1.5.0-alpha05 is released. Version 1.5.0-alpha05 contains these commits .

تغییرات API

  • We have added support for animateScrollTo on TransformingLazyColumnState so that scrolling to an item can be animated. ( I4097d )
  • We have added requestScrollTo on TransformingLazyColumnState to defer scrolling to the next measurement. ( I20a5e )
  • We have added support for contentPadding in TransformingLazyColumn . ( I3a69c )

رفع اشکالات

  • We have fixed a bug in rendering the TransformingLazyColumn when the content height is shorter than the screen height. ( I6c3e1 )
  • The ScrollInfoProvder for TransformingLazyColumn now correctly tracks the first item. ( I1e4a3 )
  • TransformingLazyColumnState now saves its state ( anchorItemIndex and anchorItemScrollOffset ). ( I3d265 )

Version 1.5.0-alpha04

۱۶ اکتبر ۲۰۲۴

androidx.wear.compose:compose-*:1.5.0-alpha04 is released. Version 1.5.0-alpha04 contains these commits .

تغییرات API

  • We have renamed the Wear Compose Foundation LazyColumn to TransformingLazyColumn so that the distinction is clearer between this and the Compose Foundation LazyColumn . ( I0608b )
  • Added rotary support for Horizontal/Vertical pagers, enabling users to navigate pagers using rotary input devices. ( I9770d )
  • We have updated the new PagerDefaults to make clear that the pager will snap-to-page by default. ( Iff7d0 )
  • TransformingLazyColumnItemScrollProgress is now a value class which should improve the performance. ( Ic399e )
  • TransformingLazyColumn now supports rotary out of the box. ( I05206 )
  • TransformingLazyColumnState now supports scrollToItem . ( I507b3 )
  • Removed @ExperimentalWearFoundationApi from SwipeToReveal API ( I34a66 )

Version 1.5.0-alpha03

۲ اکتبر ۲۰۲۴

androidx.wear.compose:compose-*:1.5.0-alpha03 is released. Version 1.5.0-alpha03 contains these commits .

تغییرات API

  • We have added support for bi-directional swiping in SwipeToReveal , for rare cases where the current screen does not support swipe to dismiss. . The default is still to swipe-to-reveal only on right-to-left swipes and it is strongly advised to respect the default behavior to avoid conflict with swipe to dismiss. ( Ifac04 )
  • We have updated LazyColumnState to override canScrollForward and canScrollBackward - this now stops scrolling when the first or last item is exactly at the center of the screen. ( Ia77d7 )
  • We have added new HorizontalPager and VerticalPager components which address common issues, such as focus handling and interacting with system swipe to dismiss that could occur on Wear. ( I2902b )
  • We have added support for LazyColumn to expose the client's key and contentType through layoutItems . ( I1bd9c )

رفع اشکالات

  • We have updated the curved text animations to be smoother, using paint flags. ( I73a15 )
  • We have updated the Material Dialog documentation to reflect that onDismissRequest is not called after show flag is set to false. ( Ifd8d6 )
  • We have fixed a bug with the vignette animation in the Material Dialog ( I126bf )

Version 1.5.0-alpha02

۱۸ سپتامبر ۲۰۲۴

androidx.wear.compose:compose-*:1.5.0-alpha02 is released. Version 1.5.0-alpha02 contains these commits .

تغییرات API

  • We have added support for the Wear Compose LazyColumn with our ScreenScaffold (and added an implementation of ScrollInfoProvider for LazyColumnState ). ( Ib8d29 )
  • We have added viewportSize to LazyColumnLayoutInfo . ( I4187f )

رفع اشکالات

  • We have fixed a bug so that rotary scrolling is now disabled in ScalingLazyColumn when the userScrollEnabled flag is set to false . ( I490ab , b/360295825 )
  • We have made a bug fix to address unexpected vertical padding on curved text. The curved text height now more closely matches the actual space used by the text. Please note that this is likely to break screenshot tests that involve curved text ( Iaa6ef )
  • We have reverted a bug fix to Dialog where the onDismissRequest callback was called when showDialog was set to false, because in some cases this resulted in onDismissRequest being called multiple times. ( I64656 )

Version 1.5.0-alpha01

۴ سپتامبر ۲۰۲۴

androidx.wear.compose:compose-*:1.5.0-alpha01 is released. Version 1.5.0-alpha01 contains these commits .

تغییرات API

  • We have added a new LazyColumn into the Wear Compose Foundation library with associated LazyColumnState and LazyColumnScope APIs. This serves as the foundation for building customisable scaling and morphing effects with Wear Compose. ( Ib3b22 )
  • We have added an indexed version of itemsIndexed into LazyColumnScope as part of the new LazyColumn API. ( Ib4a57 )
  • We have added LazyColumn modifiers in order to support scaling and morphing behaviors. ( Ie229a )
  • HierarchicalFocusCoordinator has been promoted to stable. ( I31035 )
  • We have added support for letter spacing to curved text. ( I3c740 )
  • Added a rotationLocked parameter to CurvedLayout.curvedComposable to stop components being rotated. ( I66898 )
  • The temporary LocalUseFallbackRippleImplementation API from wear material and wear material3 has been removed ( I62282 )
  • Removed WearDevices.SQUARE from the @WearPreviewDevices multi-preview ( I11c02 )

رفع اشکالات

  • SwipeToReveal now positions the revealed items on the visible portion of the screen, this helps when SwipeToReveal is used within a list, so the items are always interactable and never fall outside the screen. ( I38929 )
  • SwipeToReveal now resets the lastActionType to None when animatedTo has completed. ( I59b03 )
  • Improved the documentation for the new rotationLocked parameter on curvedComposable . ( Ifbd57 )
  • Fixed a crash when passing NaN into ScalingLazyColumnSnapFlingBehavior 's performFling . ( Ic13da )
  • Fixed bug on curved layout size modifier ( I0fedf )
  • We have added support for letter spacing specified in 'sp'. ( I9f6e3 )
  • We have fixed a bug in Material2 Dialog where the onDismissRequest callback was not being called when the dialog became invisible ( I64656 )
  • Renamed LayoutCoordinates.introducesFrameOfReference to LayoutCoordinates.introducesMotionFrameOfReference to better reflect its purpose. Renamed related function to calculate coordinates based on that flag. ( I3a330 )

نسخه ۱.۴

Version 1.4.1

۱۲ فوریه ۲۰۲۵

androidx.wear.compose:compose-*:1.4.1 is released. Version 1.4.1 contains these commits .

رفع اشکالات

  • We have guarded against a crash when accessing the global reducemotion setting, which was triggered on some platforms where that setting was not provided. ( I01e2c )

نسخه ۱.۴.۰

۴ سپتامبر ۲۰۲۴

androidx.wear.compose:compose-*:1.4.0 is released. Version 1.4.0 contains these commits .

Important changes since 1.3.0

  • ScalingLazyColumn and Picker now support rotary input by default - it is recommended to remove explicit rotary handling and defer to the default system behavior. If necessary, use the rotaryScrollableBehavior parameter to configure either scroll or snap behavior - for snap behavior, it is recommended to provide snap behavior and touch scrolling capabilities using the flingBehavior parameter.
  • Modifier.rotaryScrollable is a new modifier that connects rotary events with scrollable containers, allowing users to scroll using a crown or a rotating bezel on their Wear OS device.
  • SwipeDismissableNavHost now provides an entry animation for in-app transitions.
  • PositionIndicator is now shown by default when a screen is first displayed.

Additional changes

Version 1.4.0-rc01

۲۱ آگوست ۲۰۲۴

androidx.wear.compose:compose-*:1.4.0-rc01 is released. Version 1.4.0-rc01 contains these commits .

  • We have updated the Compose dependencies to 1.7.0-rc01 and pinned Wear Compose Navigation to androidx.lifecycle 2.8.3

Version 1.4.0-beta03

June 12, 2024

androidx.wear.compose:compose-*:1.4.0-beta03 is released. Version 1.4.0-beta03 contains these commits .

رفع اشکالات

  • We have updated Modifier.rotaryScrollable to replace use of 'focusable' with 'focusTarget' which improves performance. ( Id294b )
  • We have fixed an issue where the ProgressIndicator repeated its announcement under TalkBack . ( I94563 )
  • We have updated the Wear Compose library baseline profiles. ( I3cbc3 )

Version 1.4.0-beta02

۲۹ مه ۲۰۲۴

androidx.wear.compose:compose-*:1.4.0-beta02 is released. Version 1.4.0-beta02 contains these commits .

رفع اشکالات

  • We have increased the boundary width passed to screen readers from curved text in order to address issues with truncation ( Id865f ).
  • We have constrained the boundary of the HorizontalPageIndicator that was passed to screen readers - previously the indicator occupied the full screen ( Id8d7a ).

Version 1.4.0-beta01

May 14, 2024

androidx.wear.compose:compose-*:1.4.0-beta01 is released. Version 1.4.0-beta01 contains these commits .

The 1.4-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.4 includes the following new functionality:

  • We have added Modifier.rotaryScrollable , a new modifier that connects rotary events with scrollable containers, allowing users to scroll via a crown or a rotating bezel on their Wear OS device. In addition, ScalingLazyColumn and Picker now support rotary input by default. Use the rotaryScrollableBehavior parameter to configure either scroll or snap behavior. For snap behavior, it is recommended to provide snap via the flingBehavior parameter as well for touch scrolling.
  • SwipeDismissableNavHost now provides an entry animation for in-app transitions.
  • PositionIndicator is now shown by default when a screen is first displayed.
  • SelectableChip and SplitSelectableChip have been added as a variation on ToggleChip - use this with RadioButton in order to provide selectable semantics instead of toggleable semantics for accessibility
  • ListHeader now supports height adjustments when contents need extra height to accommodate large font sizes.

رفع اشکالات

  • We have fixed a bug where selectable chips announced double tap to toggle when already selected. ( I7ed88 )

Version 1.4.0-alpha08

۱ مه ۲۰۲۴

androidx.wear.compose:compose-*:1.4.0-alpha08 is released. Version 1.4.0-alpha08 contains these commits .

تغییرات API

  • We have made the following changes to the new rotary API: renamed Modifier.rotary to Modifier.rotaryScrollable ; renamed the RotaryBehavior interface to RotaryScrollableBehavior and its function handleScrollEvent to performScroll ; renamed RotaryScrollableAdapter to RotaryScrollableLayoutInfoProvider and removed the scrollableState property. ( I0c8a6 )
  • We have made additional changes to the rotary API: renamed RotaryScrollableLayoutInfoProvider to RotarySnapLayoutInfoProvider (because this provider is only needed for rotary with snap); changed the type of the snapOffset parameter in RotaryScrollableDefaults.snapBehavior snapOffset from Int to Dp. ( Iddebe )
  • We have renamed the clickInteractionSource parameter on SplitSelectableChip to containerInteractionSource . ( Ia8f84 )
  • We have updated the click callback parameter names for SplitSelectableChip - from onClick to onSelectionClick and from onBodyClick to onContainerClick . ( I32237 )

رفع اشکالات

  • We have updated the horizontal padding for PositionIndicator to 2dp (was 5dp), in order to fix a bug where the PositionIndicator (scroll bar) overlaps scrollable content. Please note that this change is expected to break existing screenshots that include the PositionIndicator due to the change of padding. ( I57472 )
  • We have improved the documentation for the new rotary API by describing the differences between low-res and hi-res rotary devices. ( I63abe )
  • We have addressed an out-of-range exception in SwipeDismissableNavHost that could be triggered when interpolated alpha values were less than zero. ( Ib75a1 , b/335782510 )

Version 1.4.0-alpha07

۱۷ آوریل ۲۰۲۴

androidx.wear.compose:compose-*:1.4.0-alpha07 is released. Version 1.4.0-alpha07 contains these commits .

تغییرات API

  • We have added Modifier.rotary , a new modifier that connects rotary events with scrollable containers, allowing users to scroll via a crown or a rotating bezel on their Wear OS device. In addition, ScalingLazyColumn and Picker now support rotary input by default, with new overloads that include the rotaryBehavior parameter for specifying the configuration of either scroll or snap. If the rotaryBehavior parameter is set to snap, then it is recommended to provide snap via the flingBehavior parameter as well, for touch scrolling. ( I2ef6f )
  • NestedScroll sources Drag and Fling are being replaced by UserInput and SideEffect to accommodate for the extended definition of these sources that now include animations (Side Effect) and Mouse Wheel and Keyboard (UserInput). ( I40579 )
  • We have added SelectableChip and SplitSelectableChip to make the distinction clearer between toggle controls such as Switch/Checkbox and selectable controls such as RadioButton . This replaces the previously added overloads of ToggleChip/SplitToggleChip with selectionControl parameters. ( Ia0217 )
  • Updated visibility modifier of IndeterminateStrokeWidth in ProgressIndicatorDefaults to public. ( I5b5a4 )

Version 1.4.0-alpha06

۳ آوریل ۲۰۲۴

androidx.wear.compose:compose-*:1.4.0-alpha06 is released. Version 1.4.0-alpha06 contains these commits .

رفع اشکالات

  • We have added an internal draft of rotary support, as part of the larger effort of migrating Rotary behavior into AndroidX from Horologist. ( I617d1 )
  • We have added an internal draft of haptics support, as part of the larger effort of migrating Rotary behavior into AndroidX from Horologist. ( I5568a )

Version 1.4.0-alpha05

۲۰ مارس ۲۰۲۴

androidx.wear.compose:compose-*:1.4.0-alpha05 is released. Version 1.4.0-alpha05 contains these commits .

تغییرات API

  • We have made the initialCenterItemIndex and initialCenterItemScrollOffset properties of ScalingLazyListState public. ( I0c616 )
  • We have made the FullScreenStrokeWidth from ProgressIndicatorDefaults public. ( Ibea23 )

رفع اشکالات

  • We have improved the performance of PositionIndicator by decreasing the number of calls to layoutInfo from ScalingLazyColumn . ( Idc83d )

Version 1.4.0-alpha04

۶ مارس ۲۰۲۴

androidx.wear.compose:compose-*:1.4.0-alpha04 is released. Version 1.4.0-alpha04 contains these commits .

تغییرات API

  • We have added a new overload for ToggleChip and SplitToggleChip that takes a selectionControl parameter instead of the toggleControl parameter. This should be used with the RadioButton control in order to provide selectable semantics instead of toggleable semantics for accessibility ( I1d6d9 )
  • We have updated parameter names for the new selectionControl overload from onSelected to onSelect for ToggleChip and SplitToggleChip ( I1a971 )

Version 1.4.0-alpha03

February 21, 2024

androidx.wear.compose:compose-*:1.4.0-alpha03 is released. Version 1.4.0-alpha03 contains these commits.

تغییرات API

  • The Modifier.inspectable wrapper has been deprecated. This API will create more invalidations of your modifier than necessary, so its use is now discouraged. Developers are encouraged to implement the inspectableProperties() method on ModifierNodeElement if they would like to expose modifier properties to tooling. ( Ib3236 )

رفع اشکالات

  • We have fixed a documentation bug for WearPreview* annotations. ( Id526d )

Version 1.4.0-alpha02

۷ فوریه ۲۰۲۴

androidx.wear.compose:compose-*:1.4.0-alpha02 is released. Version 1.4.0-alpha02 contains these commits.

رفع اشکالات

  • We have fixed a bug in swipe-to-reveal, where it was possible to interact with (and cancel) a committed action on one item by starting to swipe another item.( Ide059 )
  • We have updated the ListHeader to support height adjustments when contents need extra height to accommodate large font sizes. ( I7290c , b/251166127 )

Version 1.4.0-alpha01

۲۴ ژانویه ۲۰۲۴

androidx.wear.compose:compose-*:1.4.0-alpha01 is released. Version 1.4.0-alpha01 contains these commits.

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

  • We have added entry animation to SwipeDismissableNavHost for in-app transitions.( cfeb79a )
  • PositionIndicator is now shown by default when a screen is first displayed. This change was introduced in order to help meet Wear Quality guidelines. Unfortunately, it means that screenshot tests will need to be updated on screens that include PositionIndicator , as the PositionIndicator would not previously have been displayed. ( 419cef7 )

تغییرات API

  • We have added a new ripple API in wear:compose-material and wear:compose-material3 libraries which replaces the deprecated rememberRipple . Also adds a temporary CompositionLocal , LocalUseFallbackRippleImplementation , to revert Material components to using the deprecated rememberRipple/RippleTheme APIs. This will be removed in the next stable release, and is only intended to be a temporary migration aid for cases where you are providing a custom RippleTheme . See developer.android.com for migration information and more background information behind this change. ( af92b21 )
  • We have updated ColorScheme to be immutable, making individual color updates less efficient, but making more common usage of colors more efficient. The reasoning behind this change is that the majority of apps wouldn't have updating individual colors as a main use case. This is still possible but it will recompose more than before, in turn we significantly decrease the amount of state subscriptions through all of the material code and will impact initialization and runtime cost of more standard use cases. ( f5c48b7 )
  • Wear material and Wear material3 components exposing a MutableInteractionSource in their API have been updated to now expose a nullable MutableInteractionSource that defaults to null. There are no semantic changes here: passing null means that you do not wish to hoist the MutableInteractionSource , and it will be created inside the component if needed. Changing to null allows for some components to never allocate a MutableInteractionSource , and allows for other components to only lazily create an instance when they need to, which improves performance across these components. If you are not using the MutableInteractionSource you pass to these components, it is recommended that you pass null instead. It is also recommended that you make similar changes in your own components. ( f8fa920 )
  • We have updated rememberExpandableState to save expandable state. This ensures that data is stored when navigating to another screen and restored when coming back to the original screen. ( 5c80095 )

رفع اشکالات

  • We have updated the ReduceMotion setting to use a lifecycle aware listener. ( 7c6b122 )
  • We have updated TouchExplorationStateProvider 's Listener to be lifecycle aware ( be28b01 )
  • We have removed the materialcore layer for CompactButton to improve performance ( 25db8e9 )
  • We have made BasicSwipeToDismissBox more robust to NaN offsets to avoid exceptions ( b983739 )
  • We have updated BasicSwipeToDismissBox to ensure alpha values are within the range 0,1
  • We have fixed a bug in the ToggleButton , SplitToggleButton , Checkbox , Switch and RadioButton so that accessibility announcements are not repeated (previously, semantic roles were duplicated) ( d11eeb7 )

نسخه ۱.۳

Version 1.3.1

۳ آوریل ۲۰۲۴

androidx.wear.compose:compose-*:1.3.1 is released. Version 1.3.1 contains these commits .

رفع اشکالات

  • We have fixed a bug in swipe-to-reveal, where it was possible to interact with (and cancel) a committed action on one item by starting to swipe another item. ( Ide059 )

نسخه ۱.۳.۰

۲۴ ژانویه ۲۰۲۴

androidx.wear.compose:compose-*:1.3.0 is released. Version 1.3.0 contains these commits.

Important changes since 1.2.0

  • The SwipeToDismissBoxState class, SwipeToDismissValue enumeration, and Modifier.edgeSwipeToDismiss extension function are now each part of the androidx.wear.compose.foundation package, instead of the androidx.wear.compose.material package. This updated architecture allows you to implement gesture handling independently from other design considerations. Material Design workflows, such as applying colors from a configured theme, are handled separately.
  • The SwipeToRevealCard and SwipeToRevealChip classes help you implement the recommended swipe-to-reveal guidance . The SwipeToRevealSample class demonstrates how to use these components.
  • Our 1.3.0-alpha02 release introduced a change that causes Chip and ToggleChip objects to grow in height to better support user-selected font scaling. This can cause some clipping to occur. To fix this issue, the large shape for MaterialTheme now uses a larger corner radius (26 dp instead of 24 dp). Chip and ToggleChip objects use this new corner radius to avoid clipping content on the corners of Chip and ToggleChip .

    • Most Chips and ToggleChips are unchanged, given their default 52 dp height. However, Chip and ToggleChip objects that contain multiple lines of primary or secondary label text, or for which the height has been overridden, could cause screenshot tests to break.

Additional changes

For a more complete set of the changes introduced in version 1.3.0, see the beta01 release notes .

Recommendations for implementation

  • If your app allows users to pan around the screen's content, such as in a map-based app, turn off swipe handling by setting userSwipeEnabled to false in the SwipeDismissableNavHost composable, and include a button that allows users to go to the previous screen.
  • To turn off animations for a position indicator during fade-in and position-change animations within a scrolling list, use a SnapSpec object.
  • While waiting for a media app to load content for playback, show a blank Placeholder composable.
  • To create a collection of expandable items on demand, consider using the experimental ExpandableStateMapping class.

Version 1.3.0-rc01

۱۰ ژانویه ۲۰۲۴

androidx.wear.compose:compose-*:1.3.0-rc01 is released. Version 1.3.0-rc01 contains these commits.

رفع اشکالات

  • We have updated the MaterialTheme large shape to use a 26dp rounded corner radius and this will now be used by Chip and ToggleChip . This change is needed to support height adjustments when contents need extra height to accommodate large font sizes—otherwise, the existing stadium shape clips some text content.

    Text clipped on corners
    Figure 1 : Text clipped on corners.
    Text not clipped
    Figure 2 : Text not clipped.

    This change may cause a breakage in screenshot tests. ( I2e6ae )

Version 1.3.0-beta02

۱۳ دسامبر ۲۰۲۳

androidx.wear.compose:compose-*:1.3.0-beta02 is released. Version 1.3.0-beta02 contains these commits.

رفع اشکالات

  • We have restored the intended swipe motion in BasicSwipeToDismissBox . This had been altered in a previous release, such that the slide part of the transition occurred while the finger was touching the screen. ( Id8e76 )

Version 1.3.0-beta01

۱۵ نوامبر ۲۰۲۳

androidx.wear.compose:compose-*:1.3.0-beta01 is released. Version 1.3.0-beta01 contains these commits.

The 1.3-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.3 includes the following new functionality:

  • SwipeToDismissBoxState , SwipeToDismissValue and Modifier.edgeSwipeToDismiss have been migrated from androidx.wear.compose.material to androidx.wear.compose.foundation , along with the underlying swipe-to-dismiss implementation in BasicSwipeToDismissBox . This allows the gesture handling for swipe-to-dismiss to be used independently of Material Design, for example from the SwipeDismissableNavHost in androidx.wear.compose.navigation . SwipeToDismissBox from androidx.wear.compose.material is still recommended to be used with Material Design, because it pulls colors from the MaterialTheme , then delegates the remaining implementation to the BasicSwipeToDismissBox .
  • SwipeDismissableNavHost now supports a new userSwipeEnabled parameter so that swipe handling can be turned off for screens where it is not required.
  • BasicSwipeToDismissBox has improved focus handling using HierarchicalFocusCoordinator .
  • SwipeToReveal has new SwipeToRevealCard and SwipeToRevealChip composables in Material that follow the recommended UX guidance for Card and Chip . It also has undo support for the secondary action.
  • DefaultTextStyle now turns off font padding to be consistent across the Android Platform.
  • Chip and ToggleChip now adjust their height to accommodate content that has grown due to large fonts for accessibility
  • PositionIndicator now has individual animation specs for the fade-in, fade-out and position-change animations. For performance reasons, we recommend that fade-in and position-change are turned off when used with scrollable lists.
  • ExpandableStateMapping provides a new way to generate ExpandableStates when they need to be created on demand and not necessarily with a @Composable scope.
  • Placeholder now allows resetting if the content is no longer in the ready state. Also, the reduce motion setting now applies to the shimmering effect and wipe-off motion on Placeholder .

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

  • PositionIndicator is not initially shown when a screen is first displayed. We intend to make a change in an early 1.4 alpha so that it will be initially shown, but without any animation.

تغییرات API

  • We have renamed the Foundation level SwipeToDismissBox to BasicSwipeToDismissBox . This makes the distinction clearer between the Foundation level component and the Material level SwipeToDismissBox . The latter pulls colors from the MaterialTheme to be used in scrims and delegates the remaining implementation to the BasicSwipeToDismissBox . ( Ibecfc )
  • We have marked rememberExpandableStateMapping as experimental and improved the performance of expandableItem . ( I5f6bc )
  • We have replaced the SwipeToRevealAction class in the Material SwipeToReveal Card and Chip APIs with a slot-based API using SwipeToRevealPrimaryAction , SwipeToRevealSecondaryAction and SwipeToRevealUndoAction composables. Please see sample code for examples on how to use the new API. ( Ia8943 )
  • We have replaced the PositionIndicator animation flags with AnimationSpec parameters. The individual animations can be disabled by passing snap as the AnimationSpec . ( I6c523 )

رفع اشکالات

  • We have fixed a bug triggered by limited curved text when size is limited ( I50efe )
  • We have addressed a potential NaN crash related to curvedComposable ( I970eb )
  • We have reverted the removal of the position change highlight animation on PositionIndicator . ( Ieb424 )
  • We have removed the material-core layer for material Chip to improve its performance. ( If2dcb )

Version 1.3.0-alpha08

۱۸ اکتبر ۲۰۲۳

androidx.wear.compose:compose-*:1.3.0-alpha08 is released. Version 1.3.0-alpha08 contains these commits.

تغییرات API

  • We have added individual flags to PositionIndicator overloads, to control different animations: showFadeInAnimation , showFadeOutAnimation and showPositionAnimation . The previous API has been deprecated and forwards calls to the new one. For performance reasons and for UX consistency, when the PositionIndicator is used with a scrollable list, we recommend switching off showFadeInAnimation and showPositionAnimation flags. If PositionIndicator is used as a standalone indicator, for example for volume change, then we recommend having all 3 animations turned on. ( I44294 )
  • We have deprecated the Material SwipeToDismissBoxState , SwipeToDismissValue and edgeSwipeToDismiss following the migration of Swipe-to-Dismiss functionality to wear.compose.foundation . Please replace with the wear.compose.foundation equivalents. ( Iee8c9 )

رفع اشکالات

  • We have updated the baseline profiles for wear compose foundation, material and navigation libraries. ( Idb060 )
  • We have reverted a behavioral change for PositionIndicator introduced in a previous CL, such that the PositionIndicator was animated when a screen was initially displayed. We intend to make a similar change in an early 1.4 alpha, so that the PositionIndicator is initially displayed, but without any animation. ( I41843 )
  • We have addressed some performance issues in PositionIndicator . ( I1c654 , b/302399827 )
  • We have optimized performance of the touch exploration state provider default implementation to rely on State<Boolean> rather than derived state. ( Ieec4d )
  • We have set systemGestureExclusion rectangles for Android 13 and higher. ( Ib1f4b )

Version 1.3.0-alpha07

۴ اکتبر ۲۰۲۳

androidx.wear.compose:compose-*:1.3.0-alpha07 is released. Version 1.3.0-alpha07 contains these commits.

تغییرات API

  • We have added individual flags to PositionIndicator to control different animations: showFadeInAnimation , showFadeOutAnimation and showPositionAnimation . The previous API has been deprecated and forwards calls to the new one. For performance reasons and for UX consistency, when the PositionIndicator is used with a scrollable list, we recommend switching off showFadeInAnimation and showPositionAnimation flags. If PositionIndicator is used as a standalone indicator, for example for volume change, then we recommend having all 3 animations turned on. ( Ia2d63 )

رفع اشکالات

  • We have made improvements to the swipe to reveal motion by adding a fade animation to the primary action text, and fading the secondary action/changing the icon scale on full swipe expansion. ( Ib7223 )
  • It is recommended that Swipe to Reveal actions are made accessible and we have added custom accessibility actions to our Swipe to Reveal samples. ( I42224 )
  • We have improved the performance of SwipeToDismissBox , including refactoring to ensure that the initial logic does not trigger a recomposition. The SwipeToDismissBox is now drawn as the full screen size. ( Ie0aa2 )
  • We have fixed a bug when the PositionIndicator incorrectly disappeared. ( I2091a )
  • Improved performance of PositionIndicator by optimizing recompositions. New flags to control the animations ( fadeIn , fadeOut and positionChange ) have been added subsequently (see API Changes) ( Ifac7d )
  • We have added Microbenchmark tests for PositionIndicator ( Idf875 )

Version 1.3.0-alpha06

۲۰ سپتامبر ۲۰۲۳

androidx.wear.compose:compose-*:1.3.0-alpha06 is released. Version 1.3.0-alpha06 contains these commits.

رفع اشکالات

  • We have added support for Modifier.edgeSwipeToDismiss with SwipeToReveal . ( I95774 , b/293444286 )
  • We have added samples for the Material SwipeToRevealChip and SwipeToRevealCard . ( Ieb974 )
  • We have updated the baseline profiles for Wear Compose Foundation and Material libraries. ( I1dd1f )

Version 1.3.0-alpha05

۶ سپتامبر ۲۰۲۳

androidx.wear.compose:compose-*:1.3.0-alpha05 is released. Version 1.3.0-alpha05 contains these commits.

رفع اشکالات

  • We have added handling in Swipe to Reveal so that only one item at a time can be swiped. ( I3cd7a )
  • Improved the documentation of ScalingLazyColumnDefaults to better match its actual behavior. ( I886d3 )

Version 1.3.0-alpha04

۲۳ آگوست ۲۰۲۳

androidx.wear.compose:compose-*:1.3.0-alpha04 is released. Version 1.3.0-alpha04 contains these commits.

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

  • We have added undo support for the secondary action of SwipeToReveal . ( I7a22d )

تغییرات API

  • Add HorizontalPageIndicator in Wear Material3 library. ( Ifee99 )
  • Updated Wear Compose preview tooling to use the androidx.wear.tooling.preview library. ( Ib036e )

رفع اشکالات

  • Fix a bug in round buttons where modifiers were not chained correctly. ( I5e162 )

Version 1.3.0-alpha03

۹ آگوست ۲۰۲۳

androidx.wear.compose:compose-*:1.3.0-alpha03 is released. Version 1.3.0-alpha03 contains these commits.

تغییرات API

  • We have added two new composables in Material for implementing SwipeToReveal with Cards and Chips. These composables follow the recommended UX guidance on the component and make it easier for developers to implement SwipeToReveal with the existing components in Wear Material. ( I7ec65 )
  • We have turned on the FloatRange annotations as API constraints, which were previously stated in comments. ( Icb401 )

رفع اشکالات

  • We have moved the initial scrolling logic of ScalingLazyColumn inside onGloballyPositioned() . ( Ic90f1 )
  • We are now using drawWithCache in PositionIndicator , ProgressIndicator , and SelectionControls to optimize stroke allocations. ( I5f225 , b/288234617 )
  • We have fixed checkbox tick visibility in disabled states. ( Ib25bf )
  • We have updated Placeholder to allow resetting to show the placeholder if the content is no longer in the ready state. ( Ibd820 )
  • We have made some fixes to flaky Placeholder tests ( Idb560 )

Version 1.3.0-alpha02

۲۶ ژوئیه ۲۰۲۳

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 generate ExpandableStates , for cases in which they need to be created on demand, not necessarily within a @Composable scope ( Iff9e0 )
  • SwipeToDismissBox has been migrated from androidx.wear.compose.material to androidx.wear.compose.foundation package. ( I275fb )
  • Updated API files to annotate compatibility suppression. ( I8e87a , b/287516207 )
  • We have made the height constants for Chip , CompactChip and ToggleChip public ( Idbfde )
  • We have made the horizontal and vertical paddings for Chip and CompactChip public. ( Ieeaf7 )
  • Added functionality to turn off swipe handling in SwipeDismissableNavHost via the new userSwipeEnabled parameter. ( Id2a0b , b/230865655 )
  • We have updated the Wear Compose Navigation library to use the new SwipeToDismissBox from Wear Compose Foundation. ( I4ff8e )

رفع اشکالات

  • We have fixed a z-order bug where expandedItem did not show the correct content after clicking a button's behavior when they have buttons. ( I1899d , b/289991514 )
  • Improve focus handling of SwipeToDismissBox (and hence SwipeDismissableNavHost ) using the HierarchicalFocusCoordinator ( 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 SwipeToDismissBox to Foundation, the Material SwipeToDismissBox implementation now forwards to Foundation and supplies default color values from its theme.( If8451 )
  • We have added heading semantics to ListHeader . ( Ic5420 )
  • Chip and ToggleChip will 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 )
  • Stepper and InlineSlider now support repeated clicks on long press so that you can quickly increase/decrease value of Stepper and InlineSlider by holding the + or - buttons. ( I27359 )

Version 1.3.0-alpha01

۲۱ ژوئن ۲۰۲۳

androidx.wear.compose:compose-*:1.3.0-alpha01 is released. Version 1.3.0-alpha01 contains these commits.

رفع اشکالات

  • As announced in 1.2.0-alpha07 and 1.2.0-alpha10 , we are now changing the DefaultTextStyle to 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 )
Text clipped with large font size
Figure 1 : Text clipped.
  • It is no longer present when font padding is turned off:
Text not clipped with large font size
Figure 2 : Text not clipped.
  • We have updated wear.compose.foundation to be an API dependency of wear.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 TimeText to use the locale when choosing the format for 12 or 24 hour time. ( If4a3d )
  • We have fixed an inconsistency in SwipeToDismissBox contentScrimColor default 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.

نسخه ۱.۲

نسخه ۱.۲.۱

۱۸ اکتبر ۲۰۲۳

androidx.wear.compose:compose-*:1.2.1 is released. Version 1.2.1 contains these commits.

رفع اشکالات

  • Fixed a bug when the PositionIndicator incorrectly disappeared. ( 7a167f )

Version 1.2.0

۹ آگوست ۲۰۲۳

androidx.wear.compose:compose-*:1.2.0 is released. Version 1.2.0 contains these commits.

Important changes since 1.1.0

Version 1.2.0-rc01

۲۶ ژوئیه ۲۰۲۳

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

۷ ژوئن ۲۰۲۳

androidx.wear.compose:compose-*:1.2.0-beta02 is released. Version 1.2.0-beta02 contains these commits.

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

  • We have added the new experimental LocalReduceMotion CompositionLocal variable which disables scaling and fading on ScalingLazyColumn . ( 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 SwipeToDismissBox contentScrimColor parameters ( I2d70f )
  • We have fixed the DefaultTextStyle default value used for the IncludeFontPadding setting ( I737ed )

Version 1.2.0-beta01

May 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:

  • expandableItem and expandableItems are two new Foundation components that support expanding items within a ScalingLazyColumn . Use expandableItem for a single expandable item, such as Text in which the number of lines. Use expandableItems for a group of expandable items and expandableButton to 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 includes userScrollEnabled to 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 the HierarchicalFocusCoordinator API 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 migrated ScalingLazyColumn and associated classes from androidx.wear.compose.material.ScalingLazyColumn to androidx.wear.compose.foundation.lazy.ScalingLazyColumn . Please update to use the Foundation.Lazy version.
  • 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 additional enableRangeSemantics parameter to facilitate disabling the default range semantics.
  • Previews - we have added the following custom annotations for previewing composables on Wear screens: WearPreviewSmallRound previews the composable on a small, round device; WearPreviewLargeRound previews the composable on a large round device; WearPreviewSquare previews the composable on a square device. Also, the following and multi-preview annotations: WearPreviewFontScales previews the composables on a wear device with multiple font sizes, while WearPreviewDevices previews the composables on different wear devices.
  • We have added a DefaultTextStyle to Wear Compose which defaults the PlatformTextStyle.includeFontPadding property 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 angularWidthDp in CurvedSize.kt ( Iab75c )
  • SwipeDismissableNavHost now logs a warning with potential causes of empty backstack. This is done to prevent unexpected crashes caused because of IllegalArgumentException which was thrown when the backstack was empty. ( I04a81 , b/277700155 )

Version 1.2.0-alpha10

۱۰ مه ۲۰۲۳

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 RevealScope to action composables in SwipeToReveal , which gives access to the offset at which additional actions are revealed. ( I3fd56 )

رفع اشکالات

  • Fixed an issue with ScalingLazyColumn being stuck on Wear API 33 after fling ( Ic4599 )
  • We have made some performance improvements to PositionIndicator for jank reduction. ( I35e92 )
  • We have fixed a bug in Chip and CompactChip where the semantic role was no longer being set to Role.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:

Text clipped with large font size
Figure 1 : Text clipped.
  • It is no longer present when font padding is turned off:
Text not clipped with large font size
Figure 2 : Text not clipped.

The new setting can be adopted now by overriding the typography in your theme - see example code .

Version 1.2.0-alpha09

April 19, 2023

androidx.wear.compose:compose-*:1.2.0-alpha09 is released. Version 1.2.0-alpha09 contains these commits.

تغییرات API

  • Add angularSizeDp to the CurvedModifier api for setting angular width in DP ( I89a52 )

رفع اشکالات

  • We have fixed accessibility issues in our time picker demos( Id0eb7 )

Version 1.2.0-alpha08

۵ آوریل ۲۰۲۳

androidx.wear.compose:compose-*:1.2.0-alpha08 is released. Version 1.2.0-alpha08 contains these commits.

تغییرات API

  • We have renamed ExpandableItemsState to ExpandableState . ( If85ea )
  • We have added expandableButton to 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 expandableItem to keep its content centered through the animation. ( I2f637 )
  • Updated ToggleControls to avoid extra recompositions when manually animating the colors using State. ( I5d319 )

Version 1.2.0-alpha07

۲۲ مارس ۲۰۲۳

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 that PickerGroup handles 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 DefaultTextStyle to Wear Compose which defaults the PlatformTextStyle.includeFontPadding property 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 UpsideDownCake preview dependency via activity-compose that blocked publishing apps to the Google Play Store. ( I6443d )

Version 1.2.0-alpha06

۸ مارس ۲۰۲۳

androidx.wear.compose:compose-*:1.2.0-alpha06 is released. Version 1.2.0-alpha06 contains these commits.

تغییرات API

  • Add CurvedBox component, 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: WearPreviewSmallRound previews the composable on a small, round device; WearPreviewLargeRound previews the composable on a large round device; WearPreviewSquare previews the composable on a square device. Also, the following and multi-preview annotations: WearPreviewFontScales previews the composables on a wear device with multiple font sizes, while WearPreviewDevices previews 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 HierarchicalFocusCoordinator as 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 the focusEnabled parameter 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 , CompactChip and ToggleButton . This improves the contrast for accessibility. ( I527cc )

Version 1.2.0-alpha05

۲۲ فوریه ۲۰۲۳

androidx.wear.compose:compose-*:1.2.0-alpha05 is released. Version 1.2.0-alpha05 contains these commits.

تغییرات API

  • Updated PickerGroup API 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 the PickerGroup . If set as false, PickerGroup will reset the minimum constraints. ( I3e046 )
  • We have added animateScrollToOption to the Picker API in order to support programmatic animation to a specific Picker option ( I6fe67 )

رفع اشکالات

  • We have updated HorizontalPageIndicator to support right-to-left layouts. ( Ia4359 )
  • Added Screenshot tests for right-to-left layout in HorizontalPageIndicator ( I6fbb8 )
  • Added further tests to SwipeDismissableNavHostTest that use TestNavHostController ( I61d54 )

Version 1.2.0-alpha04

۸ فوریه ۲۰۲۳

androidx.wear.compose:compose-*:1.2.0-alpha04 is released. Version 1.2.0-alpha04 contains these commits.

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

  • PickerGroup for 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, the PickerGroup handles 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 enableRangeSemantics parameter in order to facilitate disabling the default range semantics ( Ia61d4 )

رفع اشکالات

  • Allow ScalingLazyColumn to be nested within a horizontally scrolling page ( Iec3f8 , b/266555016 )
  • Improvement of Stepper kdocs and StepperTest tests clean-up. ( Ic118e )
  • Updated androidx.navigation dependency to version 2.5.3 ( If58ed )

Version 1.2.0-alpha03

۲۵ ژانویه ۲۰۲۳

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) from androidx.wear.compose.material.ScalingLazyColumn to andrdoidx.wear.compose.foundation.lazy.ScalingLazyColumn (see this example for migration). This new location more closely matches that of compose.foundation.lazy.LazyColumn and 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 :

  • PositionIndicator apis targeting Material ScalingLazyColumn have been deprecated - please update to Foundation.Lazy ScalingLazyColumn . Additionally anchorType field was added to ScalingLazyListLayoutInfo . ( I29d95 )
  • ScalingLazyColumn has been marked as deprecated in the Wear Compose Material package ( I16d34 )
  • We have updated the ScrollAway modifier to use ScalingLazyListState from Wear Compose Foundation.Lazy and deprecated the overload that took ScalingLazyListState from Wear Compose Material. ( Ifc42c )
  • We have updated the Dialog APIs to use ScalingLazyListState from Foundation.Lazy and deprecated the overloads that used Material ScalingLazyListState ( Ic8960 )
  • We have updated the Picker APIs to use ScalingParams from Foundation.Lazy and deprecated the overloads that used Material ScalingParams . ( Idc3d8 )

رفع اشکالات

  • We have fixed a bug that caused unnecessary recompositions in ScalingLazyListState.centerItemIndex by ensuring that it only pushes updates when the value actually changes ( Ia9f38 )
  • We have improved the performance of SwipeToDismissBox ( I3933b )
  • Added benchmark tests for ScalingLazyColumn in Wear Compose Foundation ( Ie00f9 )
  • We have updated some internal ScalingLazyColumn classes methods in Material to use their equivalents from Foundation.Lazy ( I38aab )
  • We have fixed some issues in Picker tests and add more tests for checking scroll with offset ( I6ac34 )
  • We migrated the ScalingLazyColumn Integration Demos to depend on Foundation.Lazy instead of Material ScalingLazyColumn ( Ic6caa )
  • We have added optional fromDate/toDate parameters to our DatePicker demo ( I961cd )

Version 1.2.0-alpha02

January 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 minLines is added to Wear Text for consistent behaviour with BasicText ( I24874 )
  • CompactChipTapTargetPadding has been made public so that it appears in the documentation ( If1e70 , b/234119038 )

رفع اشکالات

  • Disable multiplatform builds for wear.compose packages ( Iad3d7 )
  • Fix kdocs for scrollToOption ( I6f9a0 )
  • PlaceholderState.rememberPlaceholderState() updated to use rememberUpdatedState to that the state will update if the onContentReady lambda. ( I02635 , b/260343754 )
  • We have fixed a text jittering issue seen in the Picker component by leveraging the new compositing strategy added to Modifier.graphicsLayer . ( I99302 )
  • We have fixed a bug that caused flickering in our DatePicker demo ( 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

۷ دسامبر ۲۰۲۲

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 HierarchicalFocusCoordinator composable 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.TimeFormat12Hours to remove AM/PM in TimeText . This will change the default value of timeSource parameters in TimeText API. ( I1eb7f )
  • We have extended the Picker API to improve accessibility for screens with multi-picker. There is a new property userScrollEnabled to control whether the picker is active for user scrolling. ( I3c3aa )

رفع اشکالات

  • We have changed the default border width for an OutlinedButton/OutlinedCompactButton from 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 ScalingLazyColumn appearing to scroll into place we have added an estimated autoCentering topPadding when the contents are empty. This change calculates the amount of top padding needed by assuming an initial item of height 0.dp. For ScalingLazyListAnchorType.ItemStart this will calculate the correct top padding, for ScalingLazyListAnchorType.ItemCenter this 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 SwipeToDismiss animation to match the Wear platform. ( I9003e )
  • We have fixed PositionIndicator handling of LazyListState and ScalingLazyListState for list items of size 0 to avoid divide by zero errors.( Ic28dd )

نسخه ۱.۱

نسخه ۱.۱.۲

۸ فوریه ۲۰۲۳

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.centerItemIndex by ensuring that it only pushes updates when the value actually changes ( Ia9f38 )

نسخه ۱.۱.۱

January 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 use rememberUpdatedState to that the state will update if the onContentReady lambda. ( I02635 , b/260343754 )

نسخه ۱.۱.۰

۷ دسامبر ۲۰۲۲

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

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

  • 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/OutlinedCompactButton from 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 ScalingLazyColumn appearing to scroll into place we have added an estimated autoCentering topPadding when the contents are empty. This change calculates the amount of top padding needed by assuming an initial item of height 0.dp. For ScalingLazyListAnchorType.ItemStart this will calculate the correct top padding, for ScalingLazyListAnchorType.ItemCenter this 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 SwipeToDismiss animation to match the Wear platform.( I9003e )
  • We have fixed PositionIndicator handling of LazyListState and ScalingLazyListState for list items of size 0 to avoid divide by zero errors.( Ic28dd )

Version 1.1.0-rc01

۹ نوامبر ۲۰۲۲

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 , OutlinedChip and OutlinedCompactChip . ( I8249c )
  • We have fixed a bug in Modifier.scrollAway so that if the specified itemIndex is invalid (for example, if that item index is out of range), then the TimeText will now still be displayed. ( I2137a )
  • We have updated the SwipeToDismissBox animation 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.scrollAway to only read the scrollState inside 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.placeholder and Modifier.placeholderShimmer when applied to the same composable. ( Ie96f4 , b/256583229 )
  • We have changed the default border width for an OutlinedCompactChip/OutlinedChip from 2.dp to 1.dp to match final UX specs. ( Ib3d8e )
  • We have fixed a bug in rememberPickerState where 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/centerItemOffset so that if two items sit either side of the viewport center line the one that is closest will be considered as the centerItem . ( I30709 , b/254257769 )
  • We have corrected a bug in the ScalingLazyListState.layoutInfo.visibleItemsInfo which was reporting incorrect offsets during ScalingLazyColumn initialization. Now an empty list will be returned until all list items are visible and have the correct offsets. Check for ScalingLazyListState.layoutInfo.visibleItemsInfo.isNotEmpty() will confirm that the ScalingLazyColumn initialization is complete and items are visible. ( I3a3b8 )

Version 1.1.0-beta01

۲۴ اکتبر ۲۰۲۲

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 contentDescription parameter 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 gradientRatio to zero had the side-effect of changing the alignment.
    • Chip/ToggleChip - We have updated the default gradients for Chip/ToggleChip to bring them in line with the latest UX spec. ChipDefaults.gradientBackgroundChipColors has 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 new OutlinedChip and OutlinedButton composables that provide a transparent Chip/Button with a thin border.
    • Card - Updated the default gradients for Cards to bring them in line with the latest UX spec. CardDefaults.cardBackgroundPainter has been updated to start from 30% of primary and end at 20% of onSurfaceVariant (was previously 20% to 10% onSurfaceVariant ). ToggleChip.toggleChipColors changes 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 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.
    • InlineSlider/Stepper - Button roles added so that Talkback can recognise them as buttons.
    • Scaffold - PositionIndicator now 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 the PositionIndicator on screen.
    • CurvedText/TimeText - Added Modifier.scrollAway , which scrolls an item vertically in/out of view, based on scroll state (with overloads to work with Column , LazyColumn and ScalingLazyColumn ). ScrollAway is typically used to scroll a TimeText out of view as the user starts to scroll a list of items upwards.
    • CurvedText/TimeText - Added support for fontFamily , fontStyle and fontSynthesis in CurvedTextStyle , usable on curvedText and basicCurvedText
    • CurvedText/TimeText - Added fontWeight to the constructor and copy method on CurvedTextStyle
    • ToggleControls - Added animated Checkbox , Switch and RadioButton toggle controls for use with ToggleChip and SplitToggleChip . These can be used instead of the static icons provided by ToggleChipDefaults ( switchIcon , checkboxIcon and radioIcon ).
    • 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 of curvedText ( Idc422 )

رفع اشکالات

  • curveText and basicCurvedText will 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 Picker when PickerState.repeatedItems = false to add an explicit setting of autoCentering params on the Pickers internal ScalingLazyColumn to ensure that it is possible to scroll the zero'th option to the center of the view. ( I8a4d7 )

Version 1.1.0-alpha07

October 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 , fontStyle and fontSynthesis in CurvedTextStyle , usable on curvedText and basicCurvedText . 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 with Modifier.offset (previously it was in pixels). Also, refactored as a LayoutModifier for efficiency. ( I9f94b )
  • As part of the new toggle controls API, we have renamed RadioButton's circleColor to ringColor . ( I28fa9 )
  • We have added animated Checkbox , Switch and RadioButton toggle controls for use with ToggleChip and SplitToggleChip . These can be used instead of the static icons provided by ToggleChipDefaults ( switchIcon , checkboxIcon and radioIcon ). ( I8a8c4 )

Version 1.1.0-alpha06

۲۱ سپتامبر ۲۰۲۲

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 with Column , LazyColumn and ScalingLazyColumn ). ScrollAway is typically used to scroll a TimeText out of view as the user starts to scroll a list of items upwards. ( I61766 )

رفع اشکالات

  • The PositionIndicator now 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 the PositionIndicator on screen. ( Ie6106 , b/244409133 )

Version 1.1.0-alpha05

۷ سپتامبر ۲۰۲۲

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 InlineSlider and Stepper so 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

۲۴ آگوست ۲۰۲۲

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 ScalingLazyColumn that 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

۱۰ آگوست ۲۰۲۲

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 Chips and Buttons and new OutlinedChip and OutlinedButton composables that provide a transparent Chip/Button with a thin border. ( Id5972 )

تغییرات API

  • Added overloads for modifying button shapes ( Icccde )

رفع اشکالات

  • We have corrected the size of the toggle control area of the ToggleChip as 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 including ToggleChips they may need to be updated. ( I514c8 , b/240548670 )

Version 1.1.0-alpha02

July 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

۲۹ ژوئن ۲۰۲۲

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 contentDescription parameter 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/Card to bring them in line with latest UX spec. ChipDefaults.gradientBackgroundChipColors has been updated to start from 50% of primary rather than 32.5%. CardDefaults.cardBackgroundPainter has been updated to start from 30% of primary and end at 20% of onSurfaceVariant (was previously 20% to 10% onSurfaceVariant ). ToggleChip.toggleChipColors changes 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 ) behind Chip/ToggleChips that 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 gradientRatio to zero had the side-effect of changing the alignment. ( I712b8 )

نسخه ۱.۰

نسخه ۱.۰.۲

۷ سپتامبر ۲۰۲۲

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 )

نسخه ۱.۰.۱

۲۴ آگوست ۲۰۲۲

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 ScalingLazyColumn that could result in lists with a small (typically exactly 2) number of list items not completing initialization and as a result being transparent. ( 076c61 )

نسخه ۱.۰.۰

July 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

۲۲ ژوئن ۲۰۲۲

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/Card to bring them in line with the latest UX spec. ChipDefaults.gradientBackgroundChipColors has been updated to start from 50% of primary rather than 32.5%. CardDefaults.cardBackgroundPainter has been updated to start from 30% of primary and end at 20% of onSurfaceVariant (was previously 20% to 10% onSurfaceVariant). ToggleChip.toggleChipColors changes 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 ) behind Chip/ToggleChips that 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

۱۵ ژوئن ۲۰۲۲

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 a ScalinglazyColumn has a mixture of ListHeader() and Chip() components as the width will tend to grow/shrink as ListHeader items are scrolled in/out of view. ( I37144 , b/235074035 )
  • We have fixed a bug in the ScalingLazyColumn that 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 ScalingLazyColumn easing as items reach the edge of the screen to match UX spec updates. Old values CubicBezierEasing(0.25f, 0.00f, 0.75f, 1.00f) -> new values CubicBezierEasing(0.3f, 0f, 0.7f, 1f) . To keep the old behavior you can override the scalingParams of ScalingLazyColumn ( Ie375c )
  • We have added padding to the CompactChip in 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 using CompactChips as they will be taking up additional space. ( I3d57c )

Version 1.0.0-beta03

۱ ژوئن ۲۰۲۲

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. Version 1.0.0-beta03 contains these commits.

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

  • We have made ScalingLazyColumn work in Compose @Preview mode. ( I3b3b6 , b/232947354 )

تغییرات API

  • We have changed the default value for the ScalingLazyColumn.horizontalAlignment property from Start to CenterHorizontally to 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 set horizontalAlignment = 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 TimeText closer to UX specs ( Ib7ea1 )

Version 1.0.0-beta02

۱۸ مه ۲۰۲۲

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. Version 1.0.0-beta02 contains these commits.

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

  • 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/SplitToggleChip to stop them from doing fillMaxWidth by default. Instead they will grow to fit their contents. To keep the previous behavior simply add modifier = Modifier.fillMaxWidth() ( I60a2c , b/232206371 )

رفع اشکالات

  • CurvedTextStyle constructor taking a TextStyle now also respects the fontWeight (This may be added to the constructor and copy methods in future revisions of the API) ( Ieebb9 )
  • Edge swiping improvements. When Modifier.edgeSwipeToDismiss is 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 )
  • HorizontalPageIndicator now 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 ScalingLazyColumn and Picker ( I49539 )
  • Edge swiping improvements. When Modifier.edgeSwipeToDismiss is 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 )

نسخه ۱.۰.۰-بتا۰۱

۱۱ مه ۲۰۲۲

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. Version 1.0.0-beta01 contains these commits.

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 , CompactButton and ToggleButton - 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. CompactButton offers a single slot to take any content (icon, image or text) and is circular in shape with background size extra small. CompactButton has optional transparent padding around the background that increases the clickable area. ToggleButton is 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 AppCard and TitleCard giving 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 ToggleControl slot to show an icon such as a switch or radio button to show the checked state of the component. In addition, the SplitToggleChip has 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 with curvedRow and curvedColumn , to lay out components around circular devices. See Wear Component Foundation below for more details on CurvedLayout and CurvedModifier (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 , PositionIndicator and Vignette ) 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. ScalingLazyColumn is 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 CurvedLayout is 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 a CurvedLayout is 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 from CurvedModifier .

  • basicCurvedText - an element in the CurvedLayout DSL, basicCurvedText allows developers to easily write curved text following the curvature of a circle (usually at the edge of a circular screen). basicCurvedText can be only created within the CurvedLayout to ensure the best experience, like being able to specify the positioning, and using CurvedModifiers . 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 . If curvedComposable has 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 with curvedComposable .

  • curvedRow and curvedColumn - similar to Row and Column, curvedRow and curvedColumn can be nested inside a CurvedLayout to lay elements out as needed. For a curvedRow , the angular layout direction and radial alignment may be specified. For a curvedColumn , 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 CompositionLocal internal class ( I42490 )
  • We have added constant values for Button , CompactButton and ToggleButton icon sizes, as guidance ( I57cab )
  • Add enabled parameter to AppCard and TitleCard . Now they have a similar API to androidx.compose.material Cards. 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 AppCard and TitleCard ( I85391 , b/228869805 )

Version 1.0.0-alpha21

۲۰ آوریل ۲۰۲۲

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 , .radialGradientBackground and .angularGradientBackground ( I8f392 )
  • Allow curved text overflow mode (clip/ellipsis/visible) to be specified. ( I8e7aa )
  • Added CurvedModifier.weight modifier, 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 , .angularSize and .radialSize modifiers 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 & insideOut parameters and replaced with more expressive constants on new classes. Curved layout direction can now be LayoutDirection aware, and it is inherited when not specified ( If0e6a )
  • We have replaced autoCenter: Boolean with autoCenter: AutoCentringParams in order to fix an API issue with the ScalingLazyColumn . ( Ia9c90 )
  • We have renamed iconTintColor and toggleControlTintColor to iconColor and toggleControlColor throughout the API (Chip/ToggleChip/Dialog/Slider/Stepper/...) as the color is applied to the icon/toggleControl slot. ( Ied238 )
  • Rewrite PageIndicatorStyle enum into value class ( I2dc72 )
  • We have added RowScope/ColumnScope/BoxScope to 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 that timeColor and appColor default to contentColor , these properties can still all be individually overridden if needed. ( I26b59 )
  • Made SwipeToDismissBoxState.Companion object private ( I39e84 )
  • Fix parameters order for InlineSlider and Stepper . A simple change to follow api guidelines ( I11fec )
  • We have removed the Saver object for SwipeToDismissBoxState as it was not used. ( Ifb54e )
  • We have updated CompactChip to 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 ScalingLazyListLayoutInfo to enable developers to know the amount of contentPadding and autoCenteringPadding that has been applied. These can be useful for developers when calculating fling/scroll ( I7577b )
  • We have implemented in/out transitions for Dialog. A showDialog parameter 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 added SwipeToDismissBox overload. ( I682a0 )
  • In order to better support i18n and a11y we have changed ToggleChip and SplitToggleChip so that they no longer have a default for the toggleControl slot. We have also changed ToggleChipDefaults so 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() and RadioIcon()->radioIcon() - this allows and encourages developers to create their own Icon() composables with an appropriate contentDescription set. ( I5bb5b )
  • We have added a SwipeDismissableNavHostState parameter to SwipeDismissableNavHost . This supports use of edge-swiping on screens used as navigation destinations, because SwipeToDismissBoxState can now be hoisted and used to initialize both SwipeDismissableNavHostState and Modifier.edgeSwipeToDismiss on 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

۶ آوریل ۲۰۲۲

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 edgeSwipeToDismiss modifier for SwipeToDismiss . Allows swipeToDismiss to 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 no CurvedModifiers are provided yet, and the ability to create custom modifiers may be available later) ( I9b8df )
  • EdgeSwipe modifier documentation and default values update for better understanding .( I6d00d )
  • Add PageIndicator slot into Scaffold. By adding PageIndicator directly into Scaffold we might assure that it will be correctly shown on circular devices. ( Ia6042 )
  • Remove default Icons from InlineSlider and 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 SwipeToDismissBox overload with an onDismissed parameter to support the common usage of triggering a navigation event when the swipe gesture has completed. ( I50353 , b/226565726 )
  • Removed ExperimentalWearMaterialApi annotations from TimeText usage ( Ide520 )
  • We have marked ScalingLazyList/Column scope 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 flingBehaviour property to the Picker and a PickerDefaults.flingBehaviour() method to enable configuration of the fling behavior such as adding RSB support. PickerState now implements the ScrollableState interface. ( 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

۲۳ مارس ۲۰۲۲

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 CurvedRow to CurvedLayout , and reworked to be a scope with a DSL. Using this DSL, more complex curved layouts can be specified using a series of nested curvedRow and curvedColumn (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) and curvedText (wear material aware curved text). ( Ib776a )
  • Make the side for the PositionIndicator configurable. 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 renamed SwipeDismissTarget .Original to SwipeToDismissValue.Default and SwipeDismissTarget.Dismissal to SwipeToDismissValue.Dismissed . We have also moved SwipeToDismissBoxDefaults.BackgroundKey and SwipeToDismissBoxDefaults.ContentKey to SwipeToDismissKeys.Background , SwipeToDismissKeys.Content respectively. ( 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 )
  • SwipeToDismissBoxState has been refactored to restrict the scope of ExperimentalWearMaterialApi to Modifier.swipeable and SwipeableState , which are now used internally. SwipeToDismissBoxState now has currentValue , targetValue , isAnimationRunning and snapTo members to support common use cases - please let us know if you require any further properties to be made available. Also fixed the behavior of SwipeableState in 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 ScalingLazyColumn can 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 SwipeToDismissBox so 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 CircularProgressIndicator functions 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 ScalingLazyColumn in-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.snapFlingBehavior to improve the end of the animation ( If3260 )

Version 1.0.0-alpha18

March 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 SplitToggleChip has 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 new ToggleDefaults.splitToggleChipColors() to support the new color scheme. We have also simplified the toggleChipColors() methods removing the splitBackgroundOverlayColor ( I7e66e )
  • We have added unadjustedSize to the ScalingLazyListItemInfo as 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 PickerState so that the numberOfOptions can be updated. This supports use-cases such as a DatePicker , 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 PositionIndicator when is a scrollbar and can't scroll. ( Id0a7f )
  • For consistency with Scaffold, our full-screen Dialog component now displays a PositionIndicator and a Vignette . We are also now using ScalingLazyColumn instead of Column , which means that the Dialog contents are now in ScalingLazyListScope (and typically need to be enclosed by item { /* content */ }). Dialog supports the verticalArrangement parameter accordingly. ( Idea13 )
  • We have changed the name of ToggleChip and SplitToggleChip toggleIcon 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 ScalingLazyColumn autoCentering so that it will provide only enough space to make sure the items with index ScalingLazyListState.initialCenterItemIndex or 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'ing ScalingLazyColumn will not be able to scroll above the initialCenterItemIndex/initialCenterItemScrollOffset ( I22ee2 )
  • We have added a demo for a Date Picker and fixed a bug in PickerState where the initiallySelectedOption was not applied until the Picker had been displayed. ( Id0d7e )
  • In order to reduce the clipping of wider ScalingLazyColumn items on circular screens we have increased the default horizontal content padding from 8 to 10 dp. ( I0d609 )
  • Ensure the PositionIndicator is shown when scrolling. ( Ied9a2 )

Version 1.0.0-alpha17

۲۳ فوریه ۲۰۲۲

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 . Set flingBehavior = 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 TimeText custom fonts & styles on square device ( Iea76e )
  • ScalingLazyListLayoutInfo now has reverseLayout , viewportSize and orientation properties matching those from LazyListLayoutInfo ( I4f258 , b/217917020 )
  • ScalingLazyColumn now has a userScrollEnabled property matching that from LazyList ( I164d0 , b/217912513 )
  • Pickers now have a gradient on the top and bottom by default ( Iab92a )

رفع اشکالات

  • We have modified ScalingLazyColumn so 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 of LazyColumn . If you want to reinstate the old behaviour then pass Modifier.fillMaxWidth()/width()/widthIn() to the ScalingLazyColumn ( I51bf8 )
  • We have improved the exception message in SwipeDismissableNavHost.kt that was triggered if the navigation backstack was empty. ( I1b1dc )

Version 1.0.0-alpha16

۹ فوریه ۲۰۲۲

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 flingBehavior parameter, 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 ScalingLazyListState from 0->1. This means that unless overridden on state construction with ScalingLazyListState.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 ScalingLazyColumn default extraPadding that 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 using viewportVerticalOffsetResolver . ( I76be4 )
  • Fix an issue with TimeText on multiple lines on square device ( Ibd3fb )
  • We have modified ScalingLazyColumn so 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 of LazyColumn . If you want to reinstate the old behavior then pass Modifier.fillMaxSize() to the ScalingLazyColumn - 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

۲۶ ژانویه ۲۰۲۲

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 autoCentering to the ScalingLazyColumn . 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 Dialog component 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 be Alert or Confirmation (renamed from earlier components AlertDialog and ConfirmationDialog ) - Alert , Confirmation and Dialog are all in the androidx.wear.compose.material.dialog package. Alert and Confirmation can be used as navigation destinations. Also, added ColumnScope to Alert and Confirmation parameters as necessary. ( Ia9014 )
  • We have removed onSurfaceVariant2 from the Compose for WearOS Material Theme Colors and replaced uses in the library with onSurfaceVariant . ( Icd592 )
  • Added a method to programmatically select an option on the PickerState , the initially selected option can now also be specified when creating a PickerState . ( I92bdf )
  • We have added support for customizing the fling behavior of the ScalingLazyColumn . ( I1ad2e , b/208842968 )
  • We have added NavController.currentBackStackEntryAsState() to the Wear.Compose.Navigation library. ( If9028 , b/212739653 )
  • Added Modifier.onRotaryScrollEvent() and Modifier.onPreRotaryScrollEvent() for Wear devices with a rotating side button.( I18bf5 , b/210748686 )

Version 1.0.0-alpha14

۱۲ ژانویه ۲۰۲۲

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 ScalingLazyListState to 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.ItemCenter has been added to the ScalingLazyList to control whether the center ( ScalingLazyListAnchorType.ItemCenter ) or Edge ( ScalingLazyListAnchorType.ItemStart ) should be aligned to the viewport's centerline.

    As a result the ScalingLazyListItemInfo.offset and ScalingLazyListItemInfo.adjustedOffset have changed and will now reflect the offset of the item with respect to both the position of the list item and the anchorType of the list. Eg for a ScalingLazyColumn with anchorType of ItemCenter and an list item positioned with its center on the centerline of the viewport the offset would be 0 .

    The new methods are scrollTo , animatedScrollTo , centerItemIndex , and centerItemOffset . ( 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

۱۵ دسامبر ۲۰۲۱

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 RangeIcons internal (referenced internally by InlineSlider and Stepper ). ( I927ec )

رفع اشکالات

  • Fixed an issue where SwipeDismissableNavHost would add a destination to the Compose hierarchy before it has reached the CREATED Lifecycle state, resulting in an IllegalStateException . This fix was a prerequisite to updating dependency on navigation-compose to 2.4.0-beta02 and 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=true or shrinkResources=true ). ( Ib2a98 )

  • Added tests for Stepper in Wear Compose ( I2d03a )

  • Added samples for SwipeDismissableNavHost in Wear Compose Navigation. ( I85f06 )

نسخه ۱.۰.۰-آلفا۱۲

۱ دسامبر ۲۰۲۱

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 )

نسخه ۱.۰.۰-آلفا۱۱

November 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 )

نسخه ۱.۰.۰-آلفا۱۰

۳ نوامبر ۲۰۲۱

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 minSdkVersion of 23 . ( If2655 )

رفع اشکالات

  • Update transition handling in SwipeDismissableNavHost in a SideEffect ( I04994 , b/202863359 )
  • Update transition handling in SwipeDismissableNavHost ( I1cbe0 , b/202863359 )

نسخه ۱.۰.۰-آلفا۰۹

۲۷ اکتبر ۲۰۲۱

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 )

نسخه ۱.۰.۰-آلفا۰۸

۱۳ اکتبر ۲۰۲۱

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 body properties to content and moved them to the end of the property list to allow them to be provided as a trailing lambda. Also renamed bodyColor to contentColor for 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 )

نسخه ۱.۰.۰-آلفا۰۷

۲۹ سپتامبر ۲۰۲۱

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 of Navigator instances that will be added to the returned NavController to 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 )

نسخه ۱.۰.۰-alpha06

۱۵ سپتامبر ۲۰۲۱

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 SwipeDismissableNavHost composable that hosts a navigation graph and provides backwards navigation via swipe gestures
    • NavGraphBuilder.composable extension to assist with constructing navigation graphs
    • rememberSwipeDismissableNavController() to allow hoisting state
  • 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 SwipeDismissableNavHost to support rememberSaveable by 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 performGesture and GestureScope , which have been replaced by performTouchInput and TouchInjectionScope . ( 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 future. ( 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 )
    1. TitleCard spacing between Title and Body reduced from 8.dp to 2.dp.
    2. TitleCard header font changed from body to title3.
    3. Card background gradient changed to make the background appear darker.

نسخه ۱.۰.۰-آلفا۰۵

۱ سپتامبر ۲۰۲۱

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 )

نسخه ۱.۰.۰-آلفا۰۴

۱۸ آگوست ۲۰۲۱

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 @ExperimentalWearMaterialApi to SwipeDismissTarget enum, part of the SwipeToDismissBox API. ( I48b5e )

رفع اشکالات

  • Added test material for SwipeToDismissBox ( I9febc )

نسخه ۱.۰.۰-آلفا۰۳

۴ آگوست ۲۰۲۱

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() to CardDefaults.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 )

نسخه ۱.۰.۰-آلفا۰۲

۲۱ ژوئیه ۲۰۲۱

androidx.wear.compose:compose-foundation:1.0.0-alpha02 and androidx.wear.compose:compose-material:1.0.0-alpha02 are released. Version 1.0.0-alpha02 contains these commits.

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

  • 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 )

نسخه ۱.۰.۰-آلفا۰۱

۱ ژوئیه ۲۰۲۱

androidx.wear.compose:compose-foundation:1.0.0-alpha01 and androidx.wear.compose:compose-material:1.0.0-alpha01 are released. Version 1.0.0-alpha01 contains these commits.

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

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.