بنیاد نوشتن

برنامه های Jetpack Compose را با بلوک های ساختمانی آماده بنویسید و پایه را گسترش دهید تا قطعات سیستم طراحی خود را بسازید.
آخرین به روز رسانی انتشار پایدار کاندید را آزاد کنید نسخه بتا انتشار آلفا
21 آگوست 2024 1.6.8 1.7.0-rc01 - -

ساختار

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

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

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

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

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

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

شیار

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

android {
    buildFeatures {
        compose true
    }

    composeOptions {
        kotlinCompilerExtensionVersion = "1.5.15"
    }

    kotlinOptions {
        jvmTarget = "1.8"
    }
}

کاتلین

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

android {
    buildFeatures {
        compose = true
    }

    composeOptions {
        kotlinCompilerExtensionVersion = "1.5.15"
    }

    kotlinOptions {
        jvmTarget = "1.8"
    }
}

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

بازخورد

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

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

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

نسخه 1.7

نسخه 1.7.0-rc01

21 آگوست 2024

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

رفع اشکال

  • هنگامی که هر عنصری در داخل یک والد متمرکز می‌شود که قابل تمرکز (یا کلیک) و غیرفعال است، خرابی در رگرسیون برطرف شد. ( b/317561689 )

نسخه 1.7.0-beta07

7 آگوست 2024

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

رفع اشکال

  • توابع مربوط به ورودی متن SemanticsNodeInteraction performTextReplacement ، performTextInput و performTextClearance اکنون هنگام فراخوانی آنها در TextFields فقط خواندنی، خطاهای ادعایی ایجاد می کند. ( I4ae8f )
  • رفع اشکال بصری در هایپرلینک ها. ( I23311 )
  • اصلاح کننده contentReceiver ثابت با برخی از IME ها کار نمی کند.
  • تولید سرعت: جلوگیری از انتشار مقادیر NaN در Compose UI و Foundation.

نسخه 1.7.0-beta06

24 جولای 2024

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

نسخه 1.7.0-beta05

10 جولای 2024

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

رفع اشکال

  • اصلاح برای درمان مقادیر Nan در SnapFlingBehavior و Pager.

نسخه 1.7.0-beta04

26 ژوئن 2024

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

رفع اشکال

  • هنگام اندازه‌گیری خطوط نوشتاری بسیار بزرگ (مانند 10 هزار کاراکتر) از خرابی جلوگیری کنید ( 8157ab )
  • رفع اندازه‌گیری متن بسیار بزرگ که باعث خرابی در BasicTextField جدید می‌شود ( 6b7575 )
  • تغییر رفتار در اندازه‌گیری سطر/ستون را برمی‌گرداند که استفاده از متن را در سناریوهای خاص قطع می‌کند ( 69e8ba )

نسخه 1.7.0-beta03

12 ژوئن 2024

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

نسخه 1.7.0-beta02

29 مه 2024

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

تغییرات API

  • یک API آزمایشی برای پیکربندی رفتار واکشی اولیه LazyGrids مشابه با API آزمایشی موجود برای LazyLists اضافه می کند. این شامل پشتیبانی از پیش واکشی موارد در LazyGrids تودرتو می شود. مشابه LazyListPrefetchStrategy ، پیش‌فرض پیاده‌سازی این است که 2 مورد اول تودرتو از هر شبکه واکشی شود، اما این می‌تواند توسط LazyGridPrefetchStrategy(nestedPrefetchItemCount) و LazyListPrefetchStrategy#onNestedPrefetch API پیکربندی شود. ( I591c4 )
  • تغییر نام SemanticsProperties.Editable به IsEditable و تغییر SemanticsPropertyReceiver.editable به val isEditable . این ویژگی اکنون یک بولی است و همیشه توسط فیلدهای متنی مشخص می شود. ( I8acd8 )
  • مقادیر پیش‌فرض basicMarquee را به شی MarqueeDefaults منتقل کرد. ( I12ff6 )
  • پارامتر basicMarquee delayMillis به repeatDelayMillis تغییر نام داد. ( I12ff6 )
  • به‌روزرسانی API برای استایل کردن پیوندها: TextLinkStyles به TextStyle منتقل کرد و TextDefaults از مواد حذف کرد ( I5477b )

رفع اشکال

  • تغییر نام LayoutCoordinates.introducesFrameOfReference به LayoutCoordinates.introducesMotionFrameOfReference برای انعکاس بهتر هدف آن. تغییر نام تابع مرتبط برای محاسبه مختصات بر اساس آن پرچم. ( I3a330 )
  • "Default" از ویژگی های MarqueeDefaults حذف شد. ( I1d8a0 )
  • "Marquee" از ویژگی های MarqueeDefaults حذف شد. ( Iad4f4 )
  • TextLinkStyles از کلاس TextStyle حذف کرد. در عوض، TextLinkStyles بخشی از سازنده LinkAnntation و روش AnnotatedString.fromHtml است ( I90b2b )
  • رفع اشکالی که در آن پیجر هنگام پرت کردن به سمت یک کران در حالی که قبلاً در کران قرار داشت، ضربه می خورد. ( I9f373 , b/339171222 )
  • اکنون BTF2 دارای حرکات صحیح انتخاب ماوس است. ( Ibe8c6 )

مشارکت خارجی

  • برای بهبود دقت، "محاسبه زمان نوشتن/اندازه گیری از نوع محتوا را بر اساس واکشی اولیه" ارسال کنید ( Iea622 )
  • برای بهبود دقت، محاسبه زمان نوشتن/اندازه‌گیری از نوع محتوا را بر اساس واکشی اولیه انجام دهید ( Ibccb1 )
  • تغییر دهنده های WindowInsetsPadding را از مجموعه منبع رایج در دسترس قرار دهید ( I070b2 )

نسخه 1.7.0-beta01

14 مه 2024

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

تغییرات API

  • ویژگی KeyboardOptions.shouldShowKeyboardOnFocus اضافه شد و برای سازگاری باینری پنهان شده بود. ( I15cfe )
  • Modifier.anchoredDraggable اکنون دلتاهای کشیدن را به طور پیش‌فرض برای مؤلفه‌های با جهت افقی هنگامی که در طرح‌بندی RTL استفاده می‌شود، معکوس می‌کند. ( I3c6d9 )
  • AnnotatedString.hasEqualsAnnotations اکنون hasEqualAnnotations است. ( I685c0 )
  • API را برای دریافت پیوندهای مضمون مواد در متن به روز کرد. به طور خاص، روش‌ها را از TextDefaults برای ساخت LinkAnnotations با مضمون حذف کرد و HTML را با پیوندهای مضمون تجزیه کرد. در عوض، یک کلاس TextLinkStyles اضافه کرد که اجازه می دهد تا به پیوندها به عنوان یک پارامتر به Text composable استایل دهید. ( I31b93 )
  • به جای onDragStarted و onDragStopped ، تماس‌های غیر معلق جایگزین شد. ( I59de8 )

رفع اشکال

  • رفع اشکالی که در آن پیجر وقتی contentPadding بزرگتر از محدودیت های ورودی بود از کار می افتاد. پیجر اکنون مقادیر منفی برگردانده شده از PageSize را به 0 وادار می کند. ( Iba5d8 , b/314008560 )

نسخه 1.7.0-alpha08

1 مه 2024

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

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

  • منوی زمینه کلیک راست را به BasicTextField و SelectionContainer با مواردی برای برش، کپی، چسباندن و انتخاب همه اعمال اضافه کرد. ( If8c93 , Ia2b49 , I6f268 )

تغییرات API

  • درخواست‌های واکشی اولیه LazyLayout اکنون می‌توانند به‌عنوان فوری علامت‌گذاری شوند، به این معنی که انتظار داریم این مورد در فریم بعدی مورد نیاز باشد و می‌خواهیم بودجه فریم را نادیده بگیریم تا مطمئن شویم کارهای بیشتری از قبل انجام می‌دهیم ( Id513f )
  • isPositionedByParentWithDirectManipulation به introducesFrameOfReference تغییر نام داد. توجه داشته باشید که اکنون اثر معکوس دارد، به این معنی که به طور پیش‌فرض، اکثر LayoutCoordinates یک چارچوب مرجع معرفی می‌کنند، و تنها زمانی که تحت دستکاری مستقیم قرار می‌گیرد، ویژگی نادرست خواهد بود. برای جست‌وجوی موقعیت فقط با آنهایی که چارچوب مرجع را معرفی می‌کنند، از positionInLocalFrameOfReference(...) استفاده کنید. یا positionInLocalLookaheadFrameOfReference از LookaheadScope . ( Ifc5f7 )
  • تغییر نام onClicked به onClick در داخل LinkInteractionListener ( Iaa35c )
  • بر اساس بازخورد شورای API، اقدام lambda را برای getScrollViewportLength تغییر دهید. ( IBC74a )
  • تغییر نام APIهای نمایندگی دستخط قلم. ( Ica45f , b/327271923 )
  • تغییر نام TextInclusionStrategy.isInside به isIncluded . نوع برگشتی Paragraph/MultiParagraph#getRangeForRect() را غیر قابل پوچ کنید. ( I51f26 )

رفع اشکال

  • "انتخاب همه" را به همه منوهای متنی در SelectionContainer اضافه کرد. ( Ib750e , b/240143283 )
  • ضبط اسکرین شات طولانی برای محفظه های اسکرول با reverseScrolling=true ثابت شد. ( I7c59c )
  • مشکلی را برطرف کرد که در آن currentValue AnchoredDraggableState با نزدیک شدن به مرزهای ایالت تغییر می کرد. ( Iea30b , b/333846848 )

مشارکت خارجی

  • تغییر نام به PrefetchExecutor -> PrefetchScheduler برای انعکاس بهتر مسئولیت های آن. ( Ib9154 )
  • پشتیبانی برای واکشی از قبل موارد در LazyLists تو در تو (به عنوان مثال LazyColumn که LazyRows تودرتو را ارائه می دهد) اضافه شده است. انتظار می رود این تغییر افت فریم را در حین پیمایش برای این LazyLists کاهش دهد. پیش‌فرض پیاده‌سازی، واکشی دو مورد اول تودرتو است، اما این رفتار را می‌توان با LazyLayoutPrefetchStrategy(nestedPrefetchItemCount) و LazyListPrefetchStrategy#onNestedPrefetch جدید کنترل کرد. ( I51952 )

نسخه 1.7.0-alpha07

17 آوریل 2024

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

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

  • یک شی TextDefaults اضافه کرد که حاوی متدهایی برای ساخت LinkAnnotation و تجزیه رشته با برچسب HTML است که MaterialTheme روی پیوندها اعمال می کند. ( I98532 , b/139312671 )
  • پشتیبانی از ظاهر آیتم و انیمیشن ناپدید شدن به LazyVerticalGrid و LazyHorizontalGrid اضافه شد. قبلاً امکان اضافه کردن Modifier.animateItemPlacement() اصلاح کننده برای پشتیبانی از قرار دادن (ترتیب مجدد) انیمیشن ها وجود داشت. ما این اصلاح‌کننده را منسوخ کردیم و یک اصلاح‌کننده غیر تجربی جدید به نام Modifier.animateItem() معرفی کردیم که به شما امکان می‌دهد از هر سه نوع انیمیشن پشتیبانی کنید: ظاهر (fade in)، ناپدید شدن (fade out) و مرتب‌سازی مجدد. ( Ib7d12 , b/330510929 )
  • پشتیبانی از ظاهر آیتم و انیمیشن ناپدید شدن به LazyVerticalStaggeredGrid و LazyHorizontalStaggeredGrid اضافه شد. قبلاً امکان اضافه کردن Modifier.animateItemPlacement() اصلاح کننده برای پشتیبانی از قرار دادن (ترتیب مجدد) انیمیشن ها وجود داشت. ما این اصلاح‌کننده را منسوخ کردیم و یک اصلاح‌کننده غیر تجربی جدید به نام Modifier.animateItem() معرفی کردیم که به شما امکان می‌دهد از هر سه نوع انیمیشن پشتیبانی کنید: ظاهر (fade in)، ناپدید شدن (fade out) و مرتب‌سازی مجدد. ( I69bc9 , b/330511290 )

تغییرات API

  • ContextMenuColors و LocalContextMenuTheme مرتبط ProvidableCompositionLocal را اضافه می کند. رنگ های منوی زمینه در فیلدهای متن و متن قابل انتخاب را می توان با ارائه ترکیب محلی تغییر داد. ( Ifa154 )
  • پیوندهای متنی علاوه بر استایل معمولی، گزینه استایل حالت فشرده را نیز دریافت کردند، شناور و فوکوس شدند. ( I5f864 , b/139312671 )
  • ViewConfiguration.HandwritingGestureLineMargin را برای حرکات دست خط معرفی کنید. پشتیبانی از ژست دست خط برای BasicTextField . ( Ie6e13 , b/325660505 )
  • DelegatableNode.scrollIntoView برای نسخه 1.7 حذف شد، زیرا ما وقت نداشتیم تا بقیه سطح API مربوطه را تثبیت کنیم. این تابع در 1.8 مجدداً معرفی خواهد شد ( I6cf61 , b/333421581 , b/332900232 )
  • هنگام جستجو در مختصات Layout، اکنون می‌توانید از آرگومان excludeDirectManipulationOffset برای حذف افست مجموعه‌ای از Layouts والدین که فرزندان خود را با استفاده از Placeable.PlacementScope.withDirectManipulationPlacement قرار داده‌اند، استفاده کنید. به همین ترتیب، Layout که موقعیت فرزندان خود را مرتباً تغییر می‌دهد، اکنون می‌تواند آنها را با استفاده از withDirectManipulationPlacement (مانند Scroll که به طور پیش‌فرض پیاده‌سازی شده است) قرار دهد. این به انیمیشن‌های مبتنی بر approachLayout کمک می‌کند تا بصری‌تر باشند، و اکنون این فرصت را دارند که متمایز کنند چه افستی باید متحرک شود و چه چیزی مستقیماً هنگام تصمیم‌گیری برای متحرک کردن رویکرد خود اعمال شود. ( I60ec7 )
  • requestScrollToItem برای LazyStaggeredGrid معرفی کنید. برای هر اندازه گیری، مشتری اکنون می تواند با فراخوانی requestScrollToItem از حفظ فهرست بر اساس کلید انصراف دهد. این رفتار موجود را به هیچ وجه تغییر نمی دهد مگر اینکه requestScrollToItem فراخوانی شود. ( I63983 )
  • requestScrollToPage در پیجر معرفی کنید. برای هر گذر اندازه گیری، مشتری اکنون می تواند با فراخوانی requestScrollToPage از حفظ فهرست بر اساس کلید انصراف دهد. این رفتار موجود را به هیچ وجه تغییر نمی دهد مگر اینکه requestScrollToPage فراخوانی شود. ( IC4213 )
  • requestScrollToItem برای LazyGrids معرفی شد. برای هر اندازه گیری، مشتری اکنون می تواند با فراخوانی requestScrollToItem از حفظ فهرست بر اساس کلید انصراف دهد. این رفتار موجود را به هیچ وجه تغییر نمی دهد مگر اینکه requestScrollToItem فراخوانی شود. ( I0a7a0 )
  • ClickableText به عنوان منسوخ علامت گذاری شده است. برای افزودن پیوند به متن، یک AnnotatedString با یک LinkAnnotation مربوط به پیوند خود ایجاد کنید و این AnnotatedString به Text composable ارسال کنید ( I34d4b , b/323346994 )
  • UrlAnnotation منسوخ شده است، به جای آن LinkAnnotation.Url استفاده کنید. اگر از موضوع‌بندی Material استفاده می‌کنید، از شی TextDefaults برای ایجاد حاشیه‌نویسی با مضمون Material روی آن استفاده کنید ( I8d180 , b/323346545 )
  • String.parseAsHtml به AnnotatedString.Companion.fromHtml تغییر نام داد ( I43dcd )
  • آرگومان های سبک ( linkStyle ، focusedLinkStyle ، hoveredLinkStyle ) و شنونده تعامل پیوند به روش parseAsHtml اضافه شده است. هنگامی که رشته برچسب‌گذاری شده HTML را با تگ‌های <a> تجزیه می‌کند، این روش برای هر تگ یک LinkAnnotation.Url ایجاد می‌کند و اشیاء استایل و شنونده تعامل پیوند را به هر حاشیه‌نویسی ارسال می‌کند. ( I7c977 )
  • اکنون LinkAnnotation آرگومان های استایل مبتنی بر حالت و LinkInteractionListener را می گیرد. برای دریافت هایپرلینک، این حاشیه نویسی را به AnnotatedString اضافه کنید. با عبور از focusedState و/یا hoveredState می توانید پیکربندی بصری پیوندها را زمانی که فوکوس شده و/یا شناور هستند تعریف کنید. ( I81ce4 , b/139312671 )
  • پرچم ویژگی برای اسکرین شات های طولانی حذف شده است. ( I28648 , b/329128246 )
  • LazyColumn اکنون هدرهای چسبنده را به درستی در اسکرین شات های طولانی ارائه می کند. ( I8d239 , b/329296635 )
  • اکثر APIهای تجربی باقیمانده که با BasicTextField جدید معرفی شدند، تثبیت شد. ( I714e2 )
  • پارامتر textObfuscationCharacter به BasicSecureTextField اضافه شد که کنترل می کند از کدام کاراکتر در هنگام مبهم کردن محتوا استفاده شود. ( I0588b )
  • منابع NestedScroll Drag and Fling با UserInput و SideEffect جایگزین می شوند تا با تعریف گسترده این منابع که اکنون شامل انیمیشن ها (Side Effect) و Mouse Wheel and Keyboard ( UserInput ) می شوند، سازگار شوند. ( I40579 )
  • LocalBringIntoViewSpec را معرفی کنید، یک رفتار پیمایش فوکوس وابسته به پلتفرم که در لایه اصلاح‌کننده Scrollable اعمال می‌شود. ( I27aa5 , b/317453911 )
  • TextFieldCharSequence حذف شد. TextFieldBuffer.originalValues ​​با TextFieldBuffer.originalText و TextFieldBuffer.originalSelection جایگزین شده است. ( I2c7d6 )
  • ImeOptions.hintLocales دیگر پوچ نیست. اگر می‌خواهید یک لیست محلی خالی را ارسال کنید، لطفاً از LocaleList.Empty استفاده کنید. ( IC5bc4 )
  • getOffsetFractionForPage به getOffsetDistanceInPages تغییر نام داد. ( Ia05e2 )

رفع اشکال

  • هنگامی که InputTransformations با next ملحق می شوند، KeyboardOptions آنها اکنون به درستی توسط گزینه های جداگانه با استفاده از روش جدید KeyboardOptions.merge ادغام می شوند. ( Ie5304 , b/295951492 )
  • targetValue AnchoredDraggableState اکنون دیگر آستانه های موقعیتی را در نظر نمی گیرد. اکنون آستانه ضمنی 50% دارد، به این معنی که targetValue در نقطه میانی بین دو لنگر تغییر می‌کند. ( I82c2c )

مشارکت خارجی

  • تغییر نام 2 اسکرول API ( I56a75 )

نسخه 1.7.0-alpha06

3 آوریل 2024

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

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

  • پشتیبانی از ظاهر آیتم و انیمیشن ناپدید شدن به LazyColumn و LazyRow اضافه شد. قبلاً امکان اضافه کردن Modifier.animateItemPlacement() اصلاح کننده برای پشتیبانی از قرار دادن (ترتیب مجدد) انیمیشن ها وجود داشت. ما این اصلاح‌کننده را منسوخ کردیم و یک اصلاح‌کننده غیر تجربی جدید به نام Modifier.animateItem() معرفی کردیم که به شما امکان می‌دهد از هر سه نوع انیمیشن پشتیبانی کنید: ظاهر (fade in)، ناپدید شدن (fade out) و مرتب‌سازی مجدد. ( I2d7f7 , b/150812265 )
  • مشتریان LazyColumn/LazyRow اکنون می‌توانند با فراخوانی یک LazyListState.requestToScroll غیرقابل تعلیق، از حفظ شاخصی بر اساس کلید برای گذرنامه اندازه‌گیری آینده منصرف شوند. ( I98036 , b/209652366 )
  • اضافه شدن متد parseAsHtml برای رشته های استایل دار: امکان تبدیل رشته ای که با تگ های HTML مشخص شده است را به AnnotatedString می دهد. توجه داشته باشید که همه تگ‌ها پشتیبانی نمی‌شوند، برای مثال شما هنوز نمی‌توانید لیست‌های گلوله را نمایش دهید. ( I84d3d )
  • با استفاده از API رسمی Android ( ScrollCaptureCallback ) از اسکرین‌شات‌های طولانی در محفظه‌های پیمایش Compose پشتیبانی آزمایشی اجرا کرد. این ویژگی آزمایشی است و ممکن است در حال حاضر همه موارد را به درستی مدیریت نکند. به همین دلیل در حال حاضر به طور پیش فرض غیرفعال است. برای شرکت کردن، پرچم ComposeFeatureFlag_LongScreenshotsEnabled را روی true تنظیم کنید. این پرچم قبل از نسخه بتا 1.7 حذف خواهد شد. ( I2b055 , b/329296471 )
  • API جدید GraphicsLayer را برای ارائه انعطاف‌پذیری بیشتر در قرار دادن و ارائه نمونه‌های GraphicsLayer و پشتیبانی از ویژگی‌های رندر ذاتی بدون نیاز به هماهنگی با پیاده‌سازی Composable برای تعیین نمونه‌های اصلاح‌کننده GraphicsLayer ، معرفی کنید.

تغییرات API

  • همه پارامترهای KeyboardOptions اکنون به طور پیش فرض دارای یک مقدار نامشخص هستند. روش KeyboardOptions.merge اضافه شد.
  • KeyboardOptions.autoCorrect را به autoCorrectEnabled تغییر نام داد و آن را nullable کرد، جایی که null نشان می دهد هیچ مقداری مشخص نشده است. ( Ia8ba0 , b/295951492 )
  • نام outOfBoundsPageCount به beyondViewportPageCount تغییر یافت. ( I129c6 )
  • fun ClipEntry.getMetadata() به val ClipEntry.clipMetadata تغییر کرده است. ( I50155 )
  • TextFieldState.valueAsFlow() حذف شد. ترجیحاً از snapshotFlow { state.text } یا snapshotFlow { TextFieldCharSequence(state.text, state.selection) } ( I7d629 ) استفاده کنید.
  • سازماندهی مجدد پارامترهای InputTransformation.transformInput . originalValue: TextFieldCharSequence . در عوض TextFieldBuffer اکنون این مقدار را با همان نام حمل می کند. همچنین پارامتر valueWithChanges: TextFieldBuffer را حذف کرد. TextFieldBuffer اکنون محدوده گیرنده در تابع است. ( I919cc )
  • نوع BasicTextField(state) و BasicSecureTextField اکنون به جای KeyboardActionHandler از KeyboardActions برای پردازش اقدامات انجام شده توسط صفحه کلید نرم افزار استفاده می کنند. ( I58dda )
  • APIهای تفویض دست‌نویس قلم برای پشتیبانی از دست‌نویس قلم در فیلدهای ورودی متن «جعلی». ( I9c09c , b/327271923 )
  • تغییر نام KeyboardOptions.shouldShowKeyboardOnFocus به showKeyboardOnFocus . ( Ib4b7a , b/295951492 )
  • پارامتر hintMediaTypes از Modifier.contentReceiver حذف شد. توسعه دهندگان قبلاً تشویق شده بودند که نوع رسانه TransferableContent دریافتی را بررسی کنند زیرا ممکن است با hintMediaTypes پیکربندی شده ناسازگار باشد. ( I82f99 )
  • پارامترهای BasicSecureTextField را دوباره ترتیب داد. پارامترهای keyboardType و imeAction به نفع کلاس KeyboardOptions کامل حذف شد، در حالی که همان پیش‌فرض‌های مناسب برای BasicSecureTextField را حفظ کرد. همچنین پارامتر scrollState حذف کرد. ( Ibbfa9 )
  • نوع TextFieldState.text از TextFieldCharSequence به CharSequence تغییر کرده است. بنابراین، TextFieldState.selection: TextRange و TextFieldState.composition: TextRange? برای خواندن مقادیر انتخاب و ترکیب فعلی به طور مستقیم از شی حالت.
  • TextFieldState.forEachTextValue حذف شد. ( Idb2a2 )
  • توابع ClipboardManager.getClipMetadata و ClipboardManager.hasClip حذف شدند. لطفاً از clipEntry.getMetadata() برای خواندن فراداده ورودی کلیپ فعلی استفاده کنید. همچنین نتیجه ClipboardManager.getClip را در صورت تهی بودن یا نبودن آن بررسی کنید تا متوجه شوید که Clipboard یک کلیپ فعلی دارد یا خیر. ( I50498 )
  • ClipboardManager.setClip اکنون null را می‌پذیرد تا بتواند Clipboard را پاک کند. ( I7d2e9 )
  • ReceiveContentListener به یک رابط تابع تبدیل می شود. همچنین اضافه بار Modifier.receiveContent که یک لامبدا را می گیرد حذف می شود زیرا ReceiveContentListener اکنون یک رابط تابع است.
  • Modifier.receiveContent به Modifier.contentReceiver تغییر نام داد. ( I1e6af )
  • تغییر نام TransferableContent.consumeEach به TransferableContent.consume . ( I1e462 )
  • rememberTextFieldState به یک API پایدار فارغ التحصیل شده است. ( I37999 )

رفع اشکال

  • اشکالی که در آن نوع BasicTextField(state) با صفحه کلیدهای CJK (مبتنی بر ترکیب بندی) کار نمی کرد، رفع شد. ( I54425 )
  • رفع اشکالی که در آن Modifier.dragAndDropTarget() می‌توانست به داده‌های قدیمی در سناریوهای خاصی با استفاده مجدد Modifier.Node ارجاع دهد. ( I05bb1 )
  • تغییر قرارداد اخیر را که در آن AnchoredDraggableState#anchoredDrag تماس‌ها در پایان یک عملیات anchoredDrag قطع می‌شوند، بازگردانده شد. ( I95715 )

نسخه 1.7.0-alpha05

20 مارس 2024

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

تغییرات API

  • ترکیب آزمایشی LocalTextLinkStyle محلی برای استایل دادن به پیوندها حذف شد. ( Iebfa7 )
  • لغو آزمایشی BasicText با آرگومان onLinkClicked حذف شد. یک API جایگزین برای پشتیبانی از پیوندها در آینده دنبال خواهد شد. ( I107d5 )
  • روش‌ها و ویژگی‌های مربوط به Codepoints را در زیر TextFieldState و TextFieldBuffer حذف کرد. همچنین پسوندهای inChars از APIهای مرتبط با انتخاب و ترکیب حذف کرد. ( Ief7ce )
  • AnchoredDraggable 's currentValue اکنون هنگام عبور از یک نقطه لنگر به روز می شود. از settledValue برای دریافت معنایی فعلی currentValue قبلی استفاده کنید، تنها زمانی که در یک لنگر قرار می گیرید به روز می شود. پیشرفت در حال حاضر به عنوان یک تابع (نیاز به نقطه شروع و پایان) به جای یک ویژگی نمایش داده می شود. ( Ibe6e8 , b/318707189 , b/298271489 , b/294991954 )
  • BasicTextField(state) ، TextFieldState ، InputTransformation ، OutputTransformation ، TextFieldLineLimits ، TextFieldDecorator به پایدار درجه بندی می شوند. ( I9582b )
  • InterceptPlatformTextInput را برای کمک به نوشتن تست‌های سطح پایین مرتبط با IME و سایر موارد استفاده سطح پایین IME معرفی کرد. PlatformTextInputTestOverride منسوخ شده است. ( I862ed , b/322680547 )
  • restrictedConstraints() را به دو متد تقسیم کنید: fitPrioritizingWidth() و fitPrioritizingHeight() ( I6d7fd )

مشارکت خارجی

  • 2 API جدید isLastScrollForward / isLastScrollBackward اضافه شد تا جهت پیمایش را برای آخرین عملکرد اسکرول بررسی کند، اگر هنوز اقدامی برای اسکرول انجام نشده است، false را برگردانید. ( I63a0e )

نسخه 1.7.0-alpha04

6 مارس 2024

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

تغییرات API

  • پشتیبانی از ویژگی دست‌نویس قلم در دستگاه‌های بعد از Android U. ( I002e4 )
  • hintLocales به KeyboardOptions اضافه کرد تا TextFields با قابلیت اشاره به IME با زبان‌های خاص برای از پیش تعیین کردن یک زبان ترجیحی ارائه کند. ( ID18c2 )
  • اضافه بارهای Experimental BasicTextField2 و BasicSecureTextField را حذف کرد که value: String و onValueChange: () -> String . ( I568b4 )
  • برای تأثیرگذاری بر معناشناسی BasicTextField2 که بر روی آن اعمال می شود، یک تابع applySemantics اختیاری به InputTransformation اضافه کنید. ( I74a2f , b/170648072 )
  • در این CL ما اقدام معنایی GetScrollViewportLength را اضافه می کنیم تا بتوانیم اطلاعات مربوط به مؤلفه های در حال پیمایش در compose را به سیستم a11y انتقال دهیم. این CL همچنین استفاده از ویژگی مذکور را در فهرست‌های قابل پیمایش بنیاد اعمال می‌کند. ( IC5fa2 )
  • BasicTextField2 به BasicTextField تغییر نام داد. ( Ie5713 )
  • FocusRequester.createRefs اکنون پایدار است ( I4d92c , b/261436820 )
  • DelegatableNode.scrollIntoView() را معرفی کرد تا به گره های اصلاح کننده اجازه دهد مستقیماً درخواست های scrollIntoView را ارسال کنند. ( I2b3b7 , b/299939840 )
  • DelegatableNode.requireView() را معرفی کرد تا به گره های اصلاح کننده اجازه دهد تا View فعلی Android را بدون خواندن یک ترکیب محلی دریافت کنند. ( I40768 )
  • معرفی اطلاعات طرح‌بندی متنی در محدوده ردیف جریان متنی و محدوده ستون جریان متنی، دارای شاخص خط، موقعیت، و محدودیت‌های حداکثر عرض و ارتفاع برای ماندن در موقعیت مشخص. موارد بیش از حداکثر عرض/ارتفاع ممکن است به خط بعدی بروند یا بر اساس تنظیمات سرریز حذف شوند. ( Id13f8 , b/292114798 )

رفع اشکال

  • رفع اشکالی که در شرایط خاص تغییر ویژگی های enabled یا readOnly TextField باعث خرابی می شود. ( Iae17b )

نسخه 1.7.0-alpha03

21 فوریه 2024

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

تغییرات API

  • DelegatableNode.requireLayoutCoordinates() را به عنوان راهی برای دریافت LayoutCoordinates فعلی Modifier.Node بدون نیاز به نادیده گرفتن onPlaced و ذخیره مختصات در یک ویژگی معرفی کرد. ( Ia8657 )
  • DelegatableNode.currentLayoutCoordinates را به عنوان راهی برای بدست آوردن LayoutCoordinates فعلی Modifier.Node بدون نیاز به نادیده گرفتن onPlaced و ذخیره مختصات در یک ویژگی معرفی کرد. ( Iaebaa )
  • بهینه سازی عملکرد در DraggableAnchors که توسط AnchoredDraggable استفاده می شود. ( I89cff )
  • BasicTextField2 و APIهای مرتبط تحت بسته androidx.compose.foundation.text2 به androidx.compose.foundation.text منتقل می شوند. ( I9f635 )
  • BasicTextField2 دیگر پارامتر CodepointTransformation را نمی پذیرد. از BasicSecureTextField یا OutputTransformation استفاده کنید. ( ID34ff )
  • روشی برای مقایسه فقط حاشیه نویسی دو AnnotatedStrings اضافه شده است. ( I32659 )
  • معرفی ContextualFlowRow و Enhanced FlowRow / Column با MaxLines و Overflow . ما هیجان زده هستیم که پیشرفت‌هایی را در FlowRow و FlowColumn آزمایشی اعلام کنیم که اکنون دارای maxLines و پشتیبانی سرریز است، در کنار اولین ContextualFlowRow و ContextualFlowColumn . این به‌روزرسانی برای ارائه اجزای عملکرد بهینه طراحی شده است، جایی که ContextualFlow* برای تعداد زیادی آیتم با استفاده از پیکربندی کوچک maxLines و پویا +N برای دیدن دکمه‌های بیشتر عالی است، و FlowRow و FlowColumn برای تعداد کمی از موارد، کمتر مناسب است. بیش از 100 مورد مهم: برای حفظ رفتار موجود در FlowRow یا FlowColumn که در آن همه موارد بدون توجه به اینکه آیا با حداکثر محور متقاطع مطابقت دارند یا نه، تشکیل شده‌اند، overflow در طول مقداردهی اولیه روی FlowRowOverflow.Visible یا FlowColumnOverflow.Visible تنظیم کنید. ContextualFlowRowSample و FlowRowSample را برای نمونه هایی از این ویژگی های جدید در عمل کاوش کنید. ( Ib9135 , b/293577082 )

رفع اشکال

  • انیمیشن مکان‌نما دیگر فریم‌هایی را بین حالت‌های روشن و خاموش درخواست نمی‌کند. ( Ia2253 )
  • سازندگان کپی منسوخ KeyboardOptions اکنون به درستی همه ویژگی ها را کپی می کنند. ( If12de )

نسخه 1.7.0-alpha02

7 فوریه 2024

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

تغییرات API

  • HorizontalPager ، VerticalPager و PagerState به پایدار ارتقا داده می شوند. ( I67660 , b/316966909 )
  • ترکیب محلی LocalTextLinkStyle اضافه شده است که اجازه می دهد سبک پیوندها را در متن در سراسر برنامه تغییر دهید. اگر از طرح زمینه خود در برنامه استفاده می کنید، باید این ترکیب را بر اساس طرح زمینه خود به صورت محلی تنظیم کنید. هنگام استفاده از تم Material، رنگ پیوند به طور پیش‌فرض روی رنگ اصلی Material تنظیم می‌شود. ( I7eb10 )
  • اصلاح کننده receiveContent معرفی شد که راهی برای دریافت محتوای غنی در Jetpack Compose در اختیار توسعه دهندگان قرار می دهد.
  • receiveContent با BasicTextField2 ادغام می شود تا محتوای غنی ارائه شده توسط صفحه کلید نرم افزار یا از طریق عمل چسباندن Clipboard را بپذیرد. ( I81b72 )
  • در این تغییر، SnapFlingBehavior با TargetedFlingBehavior در پیجر جایگزین می‌کنیم تا سایر موارد استفاده را باز کرده و انعطاف‌پذیری بیشتری ارائه کنیم. ( I762ea )
  • در این تغییر، API های Snapping را پایدار می کنیم. ما همچنین در حال پاکسازی برخی از کدهای آزمایشی و افزودن نمونه های بیشتری به Snapping هستیم. ( ID8da9 )
  • TargetedFlingBehavior را معرفی کنید، یک FlingBehavior که امکان انتشار اطلاعات در مورد وضعیت انیمیشن در حال انجام و افست اسکرول هدف آن را فراهم می کند. ( I6a207 )

رفع اشکال

  • BasicTextField2 اکنون مکان نما را در حین تایپ زمانی که از دید خارج شده یا به دلیل ورودی از دید خارج می شود، در معرض دید قرار می دهد. ( Ieb856 , b/237190748 )

مشارکت خارجی

  • یک API آزمایشی برای پیکربندی رفتار واکشی اولیه LazyLists اضافه می کند. ( I022a4 )

نسخه 1.7.0-alpha01

24 ژانویه 2024

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

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

  • یک Indication API جدید، IndicationNodeFactory اضافه شد. این منجر به اجرای بهتر Indication در مقایسه با API rememberUpdatedInstance قبلی (اکنون منسوخ شده) می شود. برای اطلاعات مهاجرت، به developer.android.com مراجعه کنید.
  • clickable / combinedClickable / selectable / toggleable اکنون یک پارامتر MutableInteractionSource قابل تهی را می پذیرد. اگر تهی باشد، و Indication ارائه شده یک IndicationNodeFactory باشد، Indication را می توان تنها در صورت لزوم ایجاد کرد که عملکرد را بهبود می بخشد. اگر بالابر نمی‌کنید و از MutableInteractionSource استفاده نمی‌کنید، توصیه می‌شود که null را پاس کنید.

تغییرات API

  • DecayAnimation در AnchoredDraggable معرفی کنید، این تغییر یک پارامتر decayAnimationSpec را به AnchoredDraggable اضافه می‌کند که امکان استفاده از انیمیشن پوسیدگی را هنگام قرار گرفتن در یکی از لنگرها فراهم می‌کند. این تغییر همچنین شامل تغییر نام animationSpec موجود به snapAnimationSpec برای کمک به درک کاربرد هر یک از مشخصات است.
  • BasicTextField2 برای استفاده آزمایشی در دسترس است. باید تقریباً برابر ویژگی با BasicTextField باشد و رفتار باید آماده تولید باشد. با این حال، API در حال حاضر آزمایشی باقی مانده است. قبل از تثبیت، به BasicTextField تغییر نام داده و به همان بسته منتقل می شود.
  • اولین پیش نویس OutputTransformation API را برای BasicTextField2 معرفی کرد. این API جایگزین بسیاری از موارد استفاده VisualTransformation در BasicTextField قدیمی است. با این حال، هنوز کامل نشده است، و برخی از چیزها به درستی کار نمی کنند، اما ما از هرگونه بازخوردی در مورد قابلیت استفاده API برای موارد استفاده شما سپاسگزاریم. ( aosp/2708848 )
  • LinkAnnotation را معرفی کرد که به شما امکان می دهد پیوندها و موارد قابل کلیک را به متن اضافه کنید. ویژگی پیوندها هنوز کامل نشده است و تغییرات API بیشتری در راه است.
  • اصلاح کننده receiveContent معرفی شد که راهی برای دریافت محتوای غنی در Jetpack Compose در اختیار توسعه دهندگان قرار می دهد.
  • receiveContent با BasicTextField2 ادغام می شود تا محتوای غنی ارائه شده توسط صفحه کلید نرم افزار یا از طریق چسباندن از Clipboard را بپذیرد.
  • KeyboardOptions.shouldShowKeyboardOnFocus به شما امکان می دهد تا رفتار پیش فرض BasicTextField را برای درخواست صفحه کلید نرم افزاری روی فوکوس غیرفعال کنید.
  • TextInputService و LocalTextInputService اکنون منسوخ شده اند. در عوض از PlatformTextInputModifierNode برای ادغام مستقیم با APIهای پلتفرم IME استفاده کنید. ( aosp/2862698 )
  • Indication#rememberUpdatedInstance منسوخ شده است. جریمه عملکرد غیرقابل اجتناب بالایی دارد و از بهینه سازی های دیگر جلوگیری می کند. در عوض، باید از IndicationNodeFactory API جدید استفاده کنید.

رفع اشکال

  • اکنون وقتی VisualTransformation ارسال می شود، BasicTextField انتخاب کوچکی از نگاشت های افست را از پیش اعتبارسنجی می کند. این کمک می کند تا خطاهای رایج کدنویسی را که منجر به استثناهای غیرقابل بازیابی در اندازه گیری یا رسم پاس های بعدی می شود، پیدا کنید. با پرتاب در حین ترکیب، به احتمال زیاد توسعه دهندگان این خطاها را در طول توسعه مشاهده خواهند کرد که به جلوگیری از خرابی تولید کمک می کند. ( I0fd42 )
  • اگر یک نمایه نامعتبر را برای یک شاخص نامعتبر برگردانید، VisualTransformation پرتاب نمی شود ( b/316401857 )

نسخه 1.6

نسخه 1.6.8

12 ژوئن 2024

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

نسخه 1.6.7

1 مه 2024

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

نسخه 1.6.6

17 آوریل 2024

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

رفع اشکال

  • رفع اشکالی که در شرایط خاص تغییر ویژگی های enabled یا readOnly TextField باعث خرابی می شود. ( Iae17b )

نسخه 1.6.5

3 آوریل 2024

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

رفع اشکال

  • گزارش‌های اشکال‌زدایی را به باگ‌های بازتولید سخت در ردیف/ستون اضافه می‌کند: ( b/300280216 و b/297974033 )

نسخه 1.6.4

20 مارس 2024

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

رفع اشکال

  • حرکت انتخابی با فشار طولانی و سپس کشیدن که از محدوده طرح بندی متن در اولین فریم کشیدن خارج می شود، دیگر خراب نمی شود. ( Icdf90 , b/325307463 )

نسخه 1.6.3

6 مارس 2024

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

نسخه 1.6.2

21 فوریه 2024

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

رفع اشکال

  • رفع نشدن درست تنظیم مجدد AnimateContentSize . ( I07051 )
  • مشکلی را که در برخی شرایط intrinsicHeight متن بیش از حد ذخیره می شود، برطرف کنید. ( 3cd398 , b/217910352 )

نسخه 1.6.1

7 فوریه 2024

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

رفع اشکال

  • هنگام پیمایش بیش از حد، اندازه‌های شبکه پلکانی را برطرف کنید. ( bffc39 )
  • بررسی طرح بندی با ابعاد بزرگ را اضافه کنید. ( e74af5 )
  • قرار دادن اقلام با اندازه 0 را در ابتدای شبکه پلکانی ثابت کنید. ( 785f94 )
  • با همان ترتیبی که onForgotten، در Release تماس بگیرید. ( 31ce3b )

نسخه 1.6.0

24 ژانویه 2024

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

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

  • Modifier جدید Modifier.anchoredDraggable که توانایی کشیدن و متحرک سازی بین مجموعه از پیش تعریف شده لنگرها را باز می کند. این اصلاح کننده قرار است جایگزینی برای Modifier.swipeable باشد. نحوه استفاده از آن و مهاجرت را از Modifier.swipeable در راهنمای مهاجرت بیاموزید.
  • قابلیت کشیدن و رها کردن بین برنامه ها و مؤلفه ها اضافه شده است. برای شروع به DragAndDropTarget ، Modifier.dragAndDropSource و سایر APIها مراجعه کنید.
  • Modifier.draggable2D اصلاح کننده جدیدی است که امکان پشتیبانی آسان از کشیدن دوبعدی را فراهم می کند. نمونه را ببینید.
  • AndroidExternalSurface و AndroidEmbeddedExternalSurface اضافه شده اند تا افزودن اجزای سطح محور در نوشتن آسان تر شود.
  • تغییرات و بهبودهای مختلف API در Pager و snapFlingBehaviour
  • APIهای مختلف تمرکز، متن و ورودی به APIهای پایدار ارتقا یافته اند

نسخه 1.6.0-rc01

10 ژانویه 2024

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

تغییرات API

  • سازنده پسوند DragAndDropTarget() حذف شده است. یک نمونه جدید با استفاده از object: DragAndDropTarget {} . ( I32318 )

نسخه 1.6.0-beta03

13 دسامبر 2023

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

رفع اشکال

  • خرابی‌هایی را که بر متن بسیار بزرگ که با محدودیت‌های بی‌نهایت اندازه‌گیری شده بود را برطرف کنید. ( I1a7df , b/312294386 )
  • PlatformImeOptions اکنون یک کلاس مشخص به جای یک رابط است. ( If40a4 )

نسخه 1.6.0-beta02

29 نوامبر 2023

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

رفع اشکال

  • رفع عدم به‌روزرسانی canScroll پس از پیمایش فقط رله. ( I60a86 )
  • Modifier.animateItemPlacement() و LookaheadScope بعد از اسکرول های کوچک رفع کنید. ( I3a2b7 )

نسخه 1.6.0-beta01

15 نوامبر 2023

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

تغییرات API

  • اصلاح کننده DragAndDropTarget اکنون DragAndDropTarget دریافت کننده را به صراحت دریافت می کند و دارای یک لامبدا برای شرکت در جلسه کشیدن و رها کردن است. اکنون دو تابع کارخانه برای DragAndDropModifierNode وجود دارد. یکی برای دریافت انتقال و دیگری برای انتقال داده ( I69481 )
  • maximumFlingVelocity به روز شد تا به صورت Float نمایش داده شود. اسناد به روز شده برای شفافیت بیشتر در مورد وحدت maximumFlingVelocity . ( I8adc7 )
  • onDragAndDropStart در کارخانه DragAndDropModifierNode به acceptDragAndDropTransfer تغییر نام داده است.

    acceptsDragAndDropTransfer به Modifier dragAndDropTarget اضافه شده است تا از یک جلسه کشیدن و رها کردن پذیرفته شود. اگر به جلسه کشیدن و رها کردن علاقه داشته باشید، این لامبدا یک DragAndDropTarget قابل اجرا برمی‌گرداند. سایر لامبداها برای پردازش رویدادهای درگ با این جایگزین شده اند.

    یک تابع کارخانه DragAndDropTarget برای دریافت از جلسات کشیدن و رها کردن اضافه شده است ( Iebf3a )

  • افشای startDragImmediately در AnchoredDraggable کنترل تشخیص ژست‌های حرکتی هنگام استفاده از آن را می‌دهد. زمانی که ویجت روی یک لنگر هدف متحرک می شود، تنظیم آن مفید است. نمونه را ببینید. ( Ie6d13 , b/285139987 )

  • APIهای Foundation Tooltip اکنون @ExperimentalFoundationApi ( I30b0b ) هستند

  • DragAndDropInfo حذف شده به عنوان یک نوع DragAndDropModifierNode.drag اکنون پارامترهایی را برای transferData ، اندازه دکوراسیون و کشیدن دکوراسیون DrawScope lambda می گیرد.

    DragAndDropTarget به جای اینکه یک روش انتزاعی واحد باشد، متدهایی برای رویدادهای کشیدن و رها کردن خاص دارد

    onDragAndDropEvent در تابع کارخانه برای یک DragAndDropModifierNode به onDragAndDropStart تغییر نام داده است تا بهتر ارتباط برقرار کند که DragAndDropTarget ارائه شده فقط برای یک جلسه کشیدن و رها کردن معتبر است.

    DragAndDropEventType حذف شده است ( I645b1 )

  • تغییر نام PlatformTextInputModifierNode.runTextInputSession به establishTextInputSession . ( I03cd0 )

  • OriginalText با TextSubstitution جایگزین کنید. ( Ifa5a8 )

  • PlatformTextInputModifierNode.textInputSession به runTextInputSession تغییر نام داد. ( Ie9c6b )

  • فرزندان SubcomposeLayout (و طرح‌بندی‌هایی مانند LazyColumn بر اساس آن) که برای استفاده مجدد در آینده حفظ می‌شوند، غیرفعال شده در نظر گرفته می‌شوند. API تست assertIsDeactivated() جدید برای آزمایش چنین گره‌هایی معرفی شد. بقیه Api های آزمایشی به طور پیش فرض گره های غیرفعال شده را فیلتر می کنند. ( I2ef84 , b/187188981 )

  • clippingEnabled پارامتر Modifier.magnifier به clip تغییر نام داد.

  • پارامتر magnifierCenter Modifier.magnifier با حفظ همان رفتار پیش‌فرض قابل تهی شدن است. ( I6aa66 )

  • API های Material SwipeToReveal (برای کارت ها و تراشه ها) اکنون به جای نمونه های مبتنی بر کلاس داده برای ایجاد آن اسلات ها، به یک API مبتنی بر شکاف (همانطور که توسط Compose توصیه می شود) متکی هستند. این یک تغییر اساسی است، لطفاً برای نمونه هایی در مورد نحوه استفاده از API جدید، نسخه آزمایشی و کد نمونه را ببینید. ( Ia8943 )

رفع اشکال

  • برای PageSize.Fixed برابر و هش کد را پیاده سازی کنید. ( Ie3ede , b/300134276 )
  • رفع اشکالی که باعث می‌شد در صورت تغییر minWidth ، طرح BasicText کوچک نشود و minWidth کمتر از محدودیت‌های اندازه‌گیری اولیه maxWidth ( Idb19c ) باشد.
  • پشتیبانی رندر را برای Sweep Gradient در ArcLine اضافه کنید. ( I4d5bb )
  • رفع مشکل سازگاری باینری با تغییر Window Inset ( Iee695 )
  • لایه هسته مواد را برای تراشه/دکمه Material3 بردارید زیرا میکروبنچمارک ها بدون آن عملکرد بهتری را نشان می دهند. ( I55555 )

نسخه 1.6.0-alpha08

18 اکتبر 2023

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

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

  • Modifier.draggable2D اصلاح کننده جدیدی است که امکان پشتیبانی آسان از کشیدن دوبعدی را فراهم می کند. نمونه را ببینید ( Id95f5 , b/214412658 )

تغییرات API

  • Modifier.dragAndDrawSource نام لامبدا onDrawDragShadow را به drawDragDecoration تغییر داده است و DragAndDropInfo پارامتر اندازه را به dragDecorationSize تغییر نام داده است. ( ID0e30 , b/303904810 )
  • پارامتر decorationBox BasicTextField2 به decorator تغییر نام داده است. نوع آن نیز به یک رابط سرگرم کننده معادل TextFieldDecorator تغییر یافته است. ( I23c1c )

رفع اشکال

  • اسناد بهبود یافته در BasicTextField در مورد نیازهای onValueChange . ( I90fc9 , b/160257648 )

نسخه 1.6.0-alpha07

4 اکتبر 2023

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

تغییرات API

  • PlatformTextInputMethodTestOverride را برای نوشتن تست برای ویرایشگرهای متن سفارشی معرفی کرد. ( ID159b )
  • تغییر نام GraphicsSurface به AndroidExternalSurface ( I11680 )
  • اضافه شده DisableNonLinearFontScalingInCompose پرچم موقت برای غیرفعال کردن مقیاس غیر خطی فونت. اگر برای پاک کردن آنها به زمان نیاز دارید DisableNonLinearFontScalingInCompose = true را در آزمایش‌های خود تنظیم کنید. این پرچم در Compose 1.6.0-beta01 حذف خواهد شد. ( IC9486 )
  • مجموعه های ColorList و ColorSet اضافه شدند که از تخصیص اجتناب می کنند. ( I744bd )
  • این تغییر shortSnapVelocityThreshold را حذف می کند که به جزئیات پیاده سازی پیاده سازی های SnapLayoutInfoProvider تبدیل شده است. ( I65f6d )
  • اصلاح‌کننده dragAndDropSource را برای شروع جلسات کشیدن و رها کردن، و اصلاح‌کننده dragAndDropTarget را برای دریافت از جلسات کشیدن و رها کردن اضافه می‌کند ( Ib7828 ، b/286038936 )
  • اسناد و روش موقعیت SnapPositionInLayout را به روز کنید. بالشتک های محتوا را به روش موقعیت در SnapPositionInLayout معرفی کنید. ( ID7938 , b/300116110 )
  • UndoState به TextFieldState اضافه شده است که امکان لغو/بازگردانی تغییرات ایجاد شده توسط کاربر را فراهم می کند. ( ICC024 )

رفع اشکال

  • ثابت basicMarquee متحرک پس از تغییر سرعت. ( ID2e77 , b/297974036 )

نسخه 1.6.0-alpha06

20 سپتامبر 2023

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

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

  • بسته‌بندی‌های جدید Composable برای SurfaceView و TextureView: GraphicsSurface() و EmbeddedGraphicsSurface() . این یک API آزمایشی است و در معرض تغییرات و اصلاحات است. ( I9ddb2 )
  • Modifier.magnifier() اکنون یک API پایدار است. این شامل حذف MagnifierStyle به نفع پارامترهای درون خطی در خود اصلاح کننده است. ( I83bec , b/298381260 , b/262367109 , b/261438887 )

تغییرات API

  • updateCurrentPage و updateTargetPage در ScrollScope معرفی شدند، اینها آخرین قطعات لازم برای امکان سفارشی سازی اسکرول متحرک از طریق PagerState.scroll هستند. ( I9cad5 , b/267744105 , b/243786897 )
  • تراکم را از SnapFlingBehavior حذف کنید. همه پیاده‌سازی‌های SnapLayoutInfoProvider از قبل راهی برای دسترسی به چگالی دارند، دامنه گیرنده را می‌توان حذف کرد که منجر به پیاده‌سازی کمتر پیچیده‌تر SnapFlingBehavior و SnapLayoutInfoProviders می‌شود. ( I153c3 )
  • اصلاح‌کننده‌های بیشتر به‌عنوان پایدار علامت‌گذاری شدند. ( I56af1 , b/298046462 )
  • SnapStepSize از SnapLayoutInfoProvider حذف شد. محاسبه باید با استفاده از اطلاعات Layout انجام شود و از طریق نزدیک یا snapping offsets ارائه شود. ( If320c )

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

  • نوشتن اکنون از مقیاس بندی فونت غیر خطی برای خوانایی و دسترسی بهتر استفاده می کند. هنگامی که مقیاس قلم > 100٪ در تنظیمات سیستم، اندازه متن کوچک به طور معمول افزایش می یابد، اما متن بزرگ فقط کمی افزایش می یابد. همچنین، ارتفاع خطوط تعریف شده در SP به طور خودکار تنظیم می شود تا متناسب با 100٪ ارتفاع در نظر گرفته شده در مقیاس باشد. برای اطلاعات بیشتر به بهترین روش های مقیاس بندی قلم مراجعه کنید. ( I11518 )

رفع اشکال

  • استفاده از rememberSaveable را برای راهنمایی ابزار حذف کنید. ( Icc131 , b/299500338 )

نسخه 1.6.0-alpha05

6 سپتامبر 2023

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

تغییرات API

  • اضافه‌بارهایی را برای BasicSecureTextField اضافه کنید که یک مقدار تغییرناپذیر و یک فراخوان برای تغییر آن مقدار می‌پذیرد، درست مانند BasicTextField API فعلی. ( Ia4882 )
  • Modifier.preferKeepClear() را برای علامت گذاری به عنوان composable به عنوان ترجیح به دور نگه داشتن پنجره های شناور در API 33 و بالاتر اضافه کنید. ( Ib51d5 , b/297260115 )
  • سرعت چرخش در اجزای View مانند ScrollView و RecyclerView در ViewConfiguration.ScaledMaximumFlingVelocity محدود شده است. Compose اکنون حاوی نسخه خودش از maximumFlingVelocity است که اکنون برای Draggable اعمال می شود. ( IBF974 )
  • اضافه بارهای Pager و PagerState منسوخ شده را حذف کرد. ( Iea07e )
  • BasicTooltipBox به compose.foundation اضافه کرد و PlainTooltipBox و RichTooltipBox برای استفاده از TooltipBox با PlainTooltip و RichTooltip جدید به روز کرد. ( I79e1d )

نسخه 1.6.0-alpha04

23 آگوست 2023

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

تغییرات API

  • افزودن رابط کاربری ReusableComposition برای مدیریت چرخه عمر و استفاده مجدد از ترکیبات فرعی. ( I812d1 , b/252846775 )
  • Modifier.focusGroup به APIهای پایدار ارتقا یافته است. ( I7ffa3 )
  • اضافه‌بارهایی را برای BasicTextField2 اضافه کنید که یک مقدار تغییرناپذیر و یک فراخوان برای تغییر آن مقدار می‌پذیرد، درست مانند BasicTextField API فعلی. ( I3f2b8 )
  • GridItemSpan::currentLineSpan اکنون یک API پایدار است. ( Icc29c )
  • بوم‌هایی که contentDescription را می‌پذیرند اکنون یک API پایدار است. ( Ib3d29 )
  • viewportSize در ScrollState معرفی شد، راهی برای دانستن اندازه viewPort جزء که از ScrollState استفاده می کند پس از اندازه گیری اتفاق می افتد. ( I8b85a , b/283102682 )
  • مشکلی که در آن واکشی اولیه در پیجر با رفتار در Views مطابقت نداشت برطرف شد. ( I93352 , b/289088847 )
  • Modifier.consumeWindowInsets(PaddingValues) اکنون پایدار است.
    • API Deprecated Modifier.consumedWindowInsets اکنون حذف شده است. به جای آن Modifier.consumeWindowInsets استفاده کنید. ( Id72bb )

نسخه 1.6.0-alpha03

9 آگوست 2023

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

تغییرات API

  • اضافه بار LazyLayout اضافه شده است، یک لامبدا از LazyLayoutItemProvider را می پذیرد، نه یک شی ساده را مانند قبل. اضافه بار قبلی منسوخ شده است. ( I42a5a )
  • پشتیبانی اضافه شده برای پیکربندی privateImeOptions ( Idb772 )

رفع اشکال

  • فیلدهای نوشتاری ثابت که صفحه‌کلید را نشان می‌دهند و زمانی که readOnly درست است قابل ویرایش هستند. همچنین ثابت شد که صفحه‌کلید در هنگام فوکوس کردن readOnly از درست به نادرست نشان داده نمی‌شود. ( I34a19 , b/246909589 )

نسخه 1.6.0-alpha02

26 جولای 2023

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

تغییرات API

  • PagerLayoutInfo با اطلاعاتی که پس از یک اندازه گیری در Pager جمع آوری می شود، معرفی کرد. همچنین PageInfo ، اطلاعات مربوط به یک صفحه اندازه گیری شده در Pager را معرفی کرد. ( Iad003 , b/283098900 )
  • حاشیه نویسی های اضافی برای تعیین ورودی های مجاز به composable ها ( I51109 )
  • SemanticsNodeInteraction.requestFocus را به عنوان روشی راحت تر و قابل کشف برای درخواست تمرکز در تست ها اضافه کرد. ( Ie8722 )
  • API PlatformTextInput* کاملاً بازطراحی شده. ( I6c93a , b/274661182 , b/267235947 , b/277380808 )
  • SoftwareKeyboardController و LocalSoftwareKeyboardController دیگر آزمایشی نیستند. LocalSoftwareKeyboardController نیز اکنون یک CompositionLocal مناسب است. ( I4c364 )
  • Modifier.transformable اکنون pan delta را در پارامتر canPan فراهم می کند تا به تعیین جهت پان برای مجاز یا غیرمجاز بودن آن کمک کند. ( I692aa , b/266829800 )
  • اصلاح کننده consumeWindowInsets برای گسترش سوپرکلاس AbstractComposeView به روز می کند ( Iacd74 , b/269479941 )

نسخه 1.6.0-alpha01

21 ژوئن 2023

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

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

  • API جدید AnchoredDraggable را در Foundation معرفی کرد. می توان از آن برای ساخت مؤلفه هایی استفاده کرد که می توانند بین حالت های گسسته کشیده شوند، مانند صفحات پایین مدال. این API جایگزین Material's Swipeable API می شود. ( I4a2ed )

تغییرات API

  • پشتیبانی از InputConnection#requestCursorUpdates ( I0c69b )
  • scrollAnimationSpec را برای اجازه دادن به مشخصات انیمیشن سفارشی معرفی کرد. BringIntoViewCalculator به BringIntoViewScroller به روز شد. ( IDb741 )
  • نوع ResourceResolutionException را به پرتاب‌پذیرهایی که هنگام تلاش برای بارگیری دارایی‌های بیت مپ پرتاب می‌شوند، با توضیح مسیر دارایی که بارگیری نشد، اضافه کنید. ( I19f44 , b/230166331 , b/278424788 )
  • ویژگی ها و اقدامات معنایی برای پشتیبانی از ترجمه متن اضافه شده است. ( I4a6bc )
  • یک BringIntoViewCalculator API را معرفی کرد که می تواند برای سفارشی کردن نحوه پاسخ مولفه هایی مانند Scrollable به درخواست های bringIntoView استفاده شود. اضافه بار قابل پیمایش را تغییر داد تا به صورت اختیاری نمونه ای از BringIntoViewCalculator را بپذیرد. ( Iaf5af )

رفع اشکال

  • یک بررسی پرز اضافه کرد تا هشدار دهد که آیا یک MutableInteractionSource در ترکیب بدون به خاطر سپردن آن ایجاد می‌کنید، مشابه بررسی‌های پرز برای ایجاد حالت تغییرپذیر / Animatable . ( I5daae )
  • اضافه شدن پشتیبانی برای انتخاب توسط ماوس. انتخاب مبتنی بر لمس با کلمه گسترش می‌یابد و بر اساس کاراکتر کوچک می‌شود. ( Ic0c6c , b/180639271 )
  • رابط FocusTargetModifierNode اضافه شد که می تواند برای ایجاد یک FocusTarget سفارشی استفاده شود. ( I9790e )

نسخه 1.5

نسخه 1.5.4

18 اکتبر 2023

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

نسخه 1.5.3

4 اکتبر 2023

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

نسخه 1.5.2

27 سپتامبر 2023

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

رفع اشکال

  • رفع یک اشکال در متن که منجر به خرابی در شرایط خاصی می شد که معنایی نامعتبر بود.

نسخه 1.5.1

6 سپتامبر 2023

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

رفع اشکال

  • فیلدهای نوشتاری ثابت که صفحه‌کلید را نشان می‌دهند و زمانی که readOnly درست است قابل ویرایش هستند. همچنین ثابت شد که صفحه‌کلید در هنگام فوکوس کردن readOnly از درست به نادرست نشان داده نمی‌شود. ( I34a19 , b/246909589 )

نسخه 1.5.0

9 آگوست 2023

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

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

  • بسیاری از اصلاح‌کننده‌های اساسی، از جمله Modifier.clickable ، Modifier.draggable ، Modifier.scrollable ، layout modifier و غیره به Modifier.Node API منتقل شده‌اند و هزینه‌های سربار ترکیب اولیه را کاهش می‌دهند.
  • بهبود در پایداری پیجرها. بسیاری از اشکالات برطرف شده است.
  • پارامترهای pageCount اکنون به جای خود پیجر در PagerState وجود دارد

نسخه 1.5.0-rc01

26 جولای 2023

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

رفع اشکال

  • یک بازرسی اختیاری برای توصیه مهاجرت فراخوانی mutableStateOf() به انواع تخصصی مربوطه آنها برای primitive ها در دسترس است. شناسه لینت آن AutoboxingStateCreation است. قبلاً این بازرسی به صورت پیش فرض برای همه پروژه ها فعال بود. برای مشاهده این اخطار در ویرایشگر Android Studio و خروجی های پرز پروژه خود، شدت آن را از اطلاعاتی به هشدار (یا بالاتر) با اعلام warning "AutoboxingStateCreation" در پیکربندی build.gradle یا build.gradle.kts ماژول خود مطابق شکل تغییر دهید ( I34f7e ):

        android {
            lint {
                warning "AutoboxingStateCreation"
            }
            ...
        }
    

نسخه 1.5.0-beta03

28 ژوئن 2023

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

نسخه 1.5.0-beta02

7 ژوئن 2023

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

نسخه 1.5.0-beta01

24 مه 2023

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

تغییرات API

  • PlatformDataProvider برای ارائه ضربان قلب و مراحل روزانه پیاده سازی کنید. رابط SensorGateway از API عمومی حذف شده است. ( I55b84 )

رفع اشکال

  • کاهش تخصیص در طول لیست تنبل / شبکه ها / و غیره. اندازه گیری ( Iaf9e2 )
  • کاهش تخصیص هنگام اعمال عکس های فوری ( I65c09 )
  • تخصیص های حذف شده از انیمیشن های بهار ( Ie9431 )
  • تخصیص حذف شده از TextLayout ( I0fd11 )
  • چندین تخصیص در ردیابی سرعت اشاره گر حذف شد ( I26bae )

نسخه 1.5.0-alpha04

10 مه 2023

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

تغییرات API

  • TextStyle.merge(...) بهینه شده با لیست پارامترهای کامل اضافه شد. ( Iad234 , b/246961787 )
  • یک SnapLayoutInfoProvider را معرفی کنید که می تواند با LazyGridState استفاده شود. ( I92134 , b/269237141 , b/260914964 )
  • آزمایشی Modifier.animateItemPlacement() برای محدوده مورد گریدهای تنبل اضافه شد. شما می توانید آن را بر روی آیتم ها اعمال کنید تا به انیمیشن های تغییر موقعیت اتوماسیون/ ترتیب مجدد دست یابید. ( I4b62d , b/257034719 )
  • GridCells.FixedSize را به پایدار ارتقا دهید. FixedSize یک LazyGrid را تعریف می کند که در آن هر سلول اندازه دقیقی را در محور متقاطع می گیرد و فضای باقیمانده بر اساس آرایش محوری توزیع می شود. ( I8542f )
  • دامنه گیرنده PagerScope برای پیجر و یک تابع کاربردی برای محاسبه یک افست صفحه معین را معرفی کرد. ( If2577 )
  • snapPositionalThreshold هنگام ایجاد یک رفتار پرتاب سریع معرفی کنید. از این پارامتر برای تعیین آستانه موقعیتی برای کوتاه شدن کوتاه در پیجر استفاده کنید. ( If8f7f )
  • جایگزین SnapLayoutInfoProvider.calculateSnappingOffsetBounds با calculateSnappingOffset شد. در این روش جدید، ما به سادگی از آفست بعدی درخواست می کنیم تا به آن بچسبد. محاسبه کرانه‌ها باید در سطح اجرا انجام شود، زیرا ممکن است بسته به اینکه فرد چگونه نیاز به snapping دارد، متفاوت باشد. ( I923a4 )
  • API های LazyStaggeredGrid به پایدار ارتقا یافته اند. ( I633a5 )
  • pageCount از Horizontal/VerticalPager حذف کنید. این باید در ایجاد دولت فراهم شود. PagerState و rememberPagerState را برای پذیرش pageCount به روز کرد. ( Ieb52d , b/266965072 )
  • pageCount از Horizontal/VerticalPager حذف کنید. این باید در ایجاد دولت فراهم شود. PagerState و rememberPagerState را برای پذیرش pageCount به روز کرد. ( Ifa3cb , b/266965072 )
  • shortSnapVelocityThreshold در SnapFlingBehavior پیجر معرفی کنید. ( I7379e , b/275579012 )
  • یک FlowRowScope و FlowColumnScope اضافه می کند. ( I54fe2 )

رفع اشکال

  • هنگامی که محدودیت‌ها minWidth و minHeight دیگر خراب نمی‌شوند، برای دریافت معناشناسی در متن تماس می‌گیرد. ( Ibd072 )
  • رگرسیون که در آن صفحه‌کلید برای فیلدهای متنی داخل دیالوگ‌هایی که توسط Dialog composable ایجاد نشده‌اند نشان داده نمی‌شود، رفع شد. ( I82551 , b/262140644 )

نسخه 1.5.0-alpha03

19 آوریل 2023

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

این نسخه پشته رندر متن جدید را برای Compose فعال می کند. پشته جدید عملکرد بهینه شده است، و نباید هیچ تغییر قابل مشاهده ای مشاهده کنید.

اگر تغییراتی را در متن رندر شده مشاهده کردید، می توانید با تنظیم NewTextRendering1_5 = false اشکال زدایی کنید تا تفاوت رفتار را تأیید کنید. تنظیم این ترکیب مجدد را مجبور می کند. لطفاً هر گونه تفاوت رفتاری را به عنوان اشکال ثبت کنید.

پرچم اشکال‌زدایی قبل از انتشار نسخه 1.5 beta01 حذف خواهد شد. ( Iada23 , b/246960758 )

تغییرات API

  • FlowColumn/FlowRow را درون خط قرار دهید. ( آیداب 37 )

نسخه 1.5.0-alpha02

5 آوریل 2023

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

تغییرات API

  • پشتیبانی از سلول‌های با اندازه ثابت در LazyGrid و مرتب کردن آنها با ترتیب محوری اضافه شده است. ( I83ed9 , b/235121277 , b/267942510 )
  • پشتیبانی از خطوط با اندازه ثابت در LazyStaggeredGrid و مرتب کردن آنها با ترتیب محوری اضافه شده است. ( I7d519 )
  • UrlAnnotation در AnnotatedString اکنون می‌تواند از طریق سرویس‌های دسترس‌پذیری مانند TalkBack باز شود. ( If4d82 , b/253292081 )
  • عمل معنایی InsertTextAtCursor را برای فیلدهای متنی اضافه کرد. ( I11ed5 )
  • اقدامات آزمایشی مرتبط با متن (مثلا performTextInput ) اکنون به جای کلیک کردن روی فیلد، با استفاده از عمل معنایی، فوکوس را مستقیماً درخواست می کند. ( I6ed05 )
  • با استفاده از verticalArrangement در FlowRow و horizontalArrangement در FlowColumn ، پشتیبانی از فاصله/آرایش محور متقاطع را اضافه می‌کند. ما همچنین سطح بالایی verticalAlignment و horizontalAlignment در FlowRow/FlowColumn حذف می کنیم. توسعه دهندگان می توانند به جای آن از Modifier.align استفاده کنند. این امر سردرگمی بین قراردادهای نامگذاری verticalAlignment و verticalArrangement را کاهش می دهد. ( I87b60 , b/268365538 )

نسخه 1.5.0-alpha01

22 مارس 2023

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

تغییرات API

  • متن و BasicText برای استفاده از سیستم اصلاح کننده جدید بازسازی می شود. این منجر به بهبود عملکرد قابل توجهی در بسیاری از موارد می شود. هیچ تغییری نباید قابل مشاهده باشد. ( If1d17 , b/246961435 )
  • عمل معنایی PerformImeAction را برای فراخوانی عمل IME در گره های ویرایشگر متن اضافه کرد. ( Ic606f , b/269633506 )

رفع اشکال

  • داخلی های به روز شده Modifier.hoverable . اصلاح کننده hoverable فقط در صورتی در بازرس نشان داده می شود که فعال باشد. ( I82103 )

نسخه 1.4

نسخه 1.4.3

3 مه 2023

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

نسخه 1.4.2

19 آوریل 2023

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

نسخه 1.4.1

5 آوریل 2023

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

نسخه 1.4.0

22 مارس 2023

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

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

  • ادغام Emoji compat را به Text و TextField و همچنین پاراگراف سطح پایین اضافه کرد. هنگامی که emojicompat پیکربندی شده است، به طور پیش فرض فعال می شود.
  • EmojiCompat می توان روی یک متن خاص با استفاده از PlatformParagraphStyle پیکربندی کرد.
  • اضافه شدن پشتیبانی از گستره خط کامل به LazyStaggeredGrid (I28252)
  • افزودن آزمایشی onHover به ClickableText (I6938f)
  • اضافه بارهای آزمایشی جدیدی را برای تابع runComposeUiTest و create*ComposeRule که پارامترهای CoroutineContext را می پذیرند، معرفی کرد. متن برای ترکیب تست و هر فراخوانی LaunchedEffect و rememberCoroutineScope() در ترکیب استفاده خواهد شد. ( I10614 , b/265177763 )
  • FlowRow و FlowColumn اکنون به‌عنوان @ExperimentalFoundationApi در دسترس هستند که امکان طرح‌بندی سطر و ستون انعطاف‌پذیرتری از اجزا را فراهم می‌کنند که اگر فضای کافی در محور اصلی وجود نداشته باشد، به یک خط جدید تبدیل می‌شود. ( I3a7b2 )
  • Modifier.basicMarquee() به‌عنوان آزمایشی برای نمایش محتوا با افکت اسکرولینگ در دسترس است. ( I2df44 , b/139321650 )

نسخه 1.4.0-rc01

8 مارس 2023

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

تغییرات API

  • API سطح پایین PlatformTextInputAdapter جدیدی را برای ایجاد پیاده‌سازی‌های ورودی متن سفارشی که مستقیماً با APIهای پلتفرم صحبت می‌کنند، معرفی کرد. ( I58df4 )
  • پشتیبانی از طرح‌بندی معکوس را به LazyStaggeredGrid اضافه کنید. ( I3ef4a )

رفع اشکال

  • عمل معنایی SetText BasicTextField اکنون بافر متن را با استفاده از همان مسیر کد به‌روزرسانی‌های IME و توابع آزمایشی (مثلا performTextReplacement ) به‌روزرسانی می‌کند.
  • توابع تست متن performTextClearance ، performTextReplacement و performTextSelection اکنون از SemanticsActions استفاده می کنند. ( I0807d , b/269633168 , b/269624358 )

نسخه 1.4.0-beta02

22 فوریه 2023

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

تغییرات API

  • یک پاسخ تماس Modifier.Node.onReset() اضافه شد که به شما امکان می‌دهد برخی از وضعیت‌های محلی را بازنشانی کنید تا زمانی که Layout مجدداً مورد استفاده قرار می‌گیرد (مثلاً به عنوان یک مورد از LazyColumn ) به درستی رسیدگی کنید. FocusTargetModifierNode را برای بازنشانی مناسب حالت متمرکز برطرف کرد. ( I65495 , b/265201972 )
  • پارامتر BlendMode به DrawScope.drawText ، Paragraph.paint و MultiParagraph.paint اضافه شد تا از الگوریتم های ترکیبی مختلف هنگام ترسیم متن روی بوم پشتیبانی کند. ( I57508 )
  • API modifierElementOf() را حذف کرد. لطفاً در عوض مستقیماً از ModifierNodeElement گسترش دهید. ( Ie6d21 )

رفع اشکال

  • با تنظیم دسته های انتخاب دیگر نمی توان یک نویسه جزئی را انتخاب کرد. ( Idedd1 )
  • رفع خرابی هنگام ctrl+backspace در TextField خالی ( I0427f , b/244185537 )

نسخه 1.4.0-beta01

8 فوریه 2023

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

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

  • از 1.3، ادغام Emoji compat به Text و TextField و همچنین پاراگراف سطح پایین‌تر اضافه شد. هنگامی که emojicompat پیکربندی شده است، به طور پیش فرض فعال می شود.
  • EmojiCompat می توان روی یک متن خاص با استفاده از PlatformParagraphStyle پیکربندی کرد.

تغییرات API

  • اجرای مشترک PinnableContainer API اضافه شده است که در همه LazyLayouts استفاده می شود تا مواردی که از ترکیب خارج می شوند، اما همچنان باید فعال باشند، حفظ شود. ( If45a4 )
  • PinnableContainer.PinnedHandle.unpin() به release() تغییر نام داد ( I4667a )

مشارکت خارجی

  • ویژگی mainAxisItemSpacing به LazyListLayoutInfo ، LazyGridLayoutInfo و LazyStaggeredGridItemInfo ( I52fad ) اضافه شد

نسخه 1.4.0-alpha05

25 ژانویه 2023

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

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

  • اضافه شدن پشتیبانی از گستره خط کامل به LazyStaggeredGrid ( I28252 )
  • افزودن آزمایشی onHover به ClickableText ( I6938f )
  • اضافه بارهای آزمایشی جدیدی را برای تابع runComposeUiTest و create*ComposeRule که پارامترهای CoroutineContext را می پذیرند، معرفی کرد. متن برای ترکیب تست و هر فراخوانی LaunchedEffect و rememberCoroutineScope() در ترکیب استفاده خواهد شد. ( I10614 , b/265177763 )

تغییرات API

  • APIهای قبل/پس از OverscrollEffect را در توابع ترکیبی «decorator» applyToScroll و applyToFling ادغام می کند. نمونه‌های به‌روزرسانی‌شده در مستندات را برای نمونه‌هایی از نحوه اجرای افکت overscroll با شکل جدید API ببینید. ( I8a9c4 , b/255554340 )
  • نوع/خالی پذیری بیشتر توابع درون خطی/منسوخ شده-مخفی ( I24f91 )
  • API های LineBreak و Hyphens در TextStyle به پایدار درجه بندی شده اند. ( IC1e1d )

رفع اشکال

  • مکان نما در فیلدهای متنی حتی زمانی که انیمیشن ها غیرفعال هستند همچنان به چشمک زدن ادامه می دهد. ( I95e70 , b/265177763 )
  • Modifier.basicMarquee اکنون حتی زمانی که انیمیشن ها در تنظیمات سیستم غیرفعال هستند، متحرک می شود. ( I23389 , b/262298306 , b/265177763 )

مشارکت خارجی

  • متدهای notifyFocusedRect در TextInputSession و TextInputService دوباره منسوخ نمی شوند. ( I23a04 , b/262648050 )

نسخه 1.4.0-alpha04

11 ژانویه 2023

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

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

  • FlowRow و FlowColumn اکنون به‌عنوان @ExperimentalFoundationApi در دسترس هستند که امکان طرح‌بندی سطر و ستون انعطاف‌پذیرتری از اجزا را فراهم می‌کنند که اگر فضای کافی در محور اصلی وجود نداشته باشد، به یک خط جدید تبدیل می‌شود. ( I3a7b2 )
  • Modifier.basicMarquee() به‌عنوان آزمایشی برای نمایش محتوا با افکت اسکرولینگ در دسترس است. ( I2df44 , b/139321650 )

تغییرات API

  • FocusRequesterModifier به نفع FocusRequesterNode منسوخ شده است ( I7f4d7 , b/247708726 , b/255352203 , b/253043481 , b/247716483, b/254529934 , b/254529934 , b/254529934 , b/254529934 , b/257141589 )
  • سازنده AndroidFont با variationSettings اکنون یک API پایدار است و می تواند برای ایجاد انواع جدیدی از توصیفگرهای فونت استفاده شود. ( I5adcc , b/261565807 )
  • Api PinnableContainer معرفی شد که توسط لیست‌های تنبل از طریق یک ترکیب محلی منتشر می‌شود که امکان پین کردن آیتم فعلی را فراهم می‌کند. این بدان معنی است که چنین موردی زمانی که از دید دور می‌شود دور ریخته نمی‌شود. برای مثال، Modifier.focusable() آیتم متمرکز فعلی را از طریق این مکانیسم پین می کند. ( Ib8881 , b/259274257 , b/195049010 )
  • روش پاسخ‌دهی پیمایش‌پذیرها به bringIntoViewRequesters و فوکوس‌پذیرها را بازنویسی کرد تا پیچیدگی آن عملیات را بهتر مدل‌سازی کند و موارد لبه بیشتری را مدیریت کند. ( I2e5fe , b/241591211 , b/192043120 , b/237190748 , b/230756508 , b/239451114 )
  • تهی پذیری بیشتر نوع بازگشت توابع منسوخ-مخفی ( Ibf7b0 )
  • TextMotion آزمایشی را به TextStyle اضافه کرد تا متن را Static(default) یا متحرک تعریف کند. اگر قرار است متن از طریق انیمیشن کوچک شود، ترجمه شود یا بچرخد، از TextMotion.Animated استفاده کنید. ( I24dd7 )
  • افزودن TextFieldFocusModifier برای اصلاح رفتار ناوبری فوکوس برای پلتفرم اندروید ( I00303 )
  • maxSize: IntSize در drawText با size: Size برای همخوانی با سایر توابع DrawScope . size به طور پیش‌فرض روی Size.Unspecified تنظیم شده است که نباید رفتار پیش‌فرض قبلی را تغییر دهد. ( Icd27d )

رفع اشکال

  • تنظیمات در فیزیک snapping در SnapFlingBehaviour برای احساس طبیعی تر.

موضوع شناخته شده

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

نسخه 1.4.0-alpha03

7 دسامبر 2022

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

تغییرات API

  • در آزمایش‌های رابط کاربری با استفاده از قانون نوشتن، ادامه‌هایی که در طول تماس‌های withFrameNanos از سر گرفته می‌شوند، تا زمانی که اجرای همه تماس‌های فریم به پایان برسد، ارسال نمی‌شوند. این با رفتار نوشتن هنگام اجرای عادی مطابقت دارد. با این حال، تست هایی که بر رفتار قدیمی تکیه دارند ممکن است شکست بخورند. این فقط باید روی کدهایی تأثیر بگذارد که مستقیماً withFrameNanos یا withFrameMillis تماس می‌گیرد و منطقی خارج از فراخوانی به آن دسته از توابعی منتقل می‌کند که ممکن است نیاز به جابجایی در داخل callback‌ها داشته باشند. برای نمونه به تغییرات تست انیمیشن در این CL مراجعه کنید.
  • اضافه شده اختیاری onPerformTraversals: (Long) -> Unit به سازنده TestMonotonicFrameClock و عملکرد کارخانه برای اجرای کد پس از تماس withFrameNanos اما قبل از ازسرگیری برنامه های مشترک تماس گیرندگان. ( Idb413 , b/254115946 , b/222093277 , b/255802670 )
  • اقدامات دسترسی به صفحه را معرفی کنید: PageUp ، PageDown ، PageLeft ، PageRight . توجه داشته باشید که این موارد فقط از API 29 در دسترس هستند. ( Ida4ab )
  • HorizontalPager و VerticalPager را معرفی کنید، راهی برای نشان دادن قابلیت های ترکیبی به شیوه پیجر. PagerState را برای کنترل پیجرها و همچنین جستجوی اطلاعات در مورد وضعیت فعلی پیجر معرفی کرد. PageSize معرفی شد، روشی برای کنترل اندازه صفحه پیجر، که می تواند برای ایجاد چرخ و فلک مانند پیجرها استفاده شود. PagerSnapDistance را معرفی کرد، راهی برای کنترل نحوه عملکرد snapping در رفتار پرتاب پیجر. ( I01120 )
  • اضافه باری را در SnapFlingBehavior.performFling معرفی کرد تا به درک اینکه پرتاب در کجا قرار می گیرد کمک کند. ( I569f6 )
  • OverscrollEffect#isEnabled حذف شد. به جای نیاز به به خاطر سپردن و تنظیم این پرچم، فقط در مواردی که نمی خواهید overscroll نشان داده شود، رویدادها را به افکت overscroll ارسال نکنید (به عنوان مثال اگر ScrollableState#canScrollForward/backward هر دو نادرست را برگردانند). ( I1a4b0 , b/255554340 , b/255557085 )
  • ScrollableState#canScrollForward و ScrollableState#canScrollBackward اضافه شد تا بپرسید آیا ScrollableState فضایی برای پیمایش در هر جهت دارد (خواه در حداقل یا حداکثر محدوده خود باشد). این پیش‌فرض برای سازگاری به عقب با پیاده‌سازی‌های موجود ScrollableState ، درست است. مصرف‌کنندگان می‌توانند از این برای نشان دادن نشانه‌ای به کاربر استفاده کنند که هنوز فضایی برای پیمایش وجود دارد، و همچنین می‌تواند برای جلوگیری از ارسال دلتا به ScrollableStates که جایی برای پیمایش در جهت معین ندارند، برای کاهش کارهای غیر ضروری استفاده شود. ( Idf1a0 , b/255557085 )
  • یک Modifier API برای جستجوی اطلاعات اسکرول اجداد اضافه شده است. ( I2ba9d , b/203141462 )
  • در Clickable برای به تأخیر انداختن صحیح تعاملات مطبوعاتی استفاده می‌شود، زمانی که حرکات ممکن است به رویدادهای پیمایش تبدیل شوند.
  • هنگامی که در داخل یک Scrollable ViewGroup استفاده می شود، Clickables ثابت شد که امواج را به درستی به تاخیر نمی اندازند.
  • کشوها و برگه‌ها برای تأخیر صحیح فشارها در صورتی که حرکات ممکن است به رویدادهای پیمایش تبدیل شوند، به‌روزرسانی شدند.
  • نامگذاری snapStepSize را به روز کنید تا با روش های دیگر در SnapLayoutInfoProvider سازگار باشد. ( Ife67c )
  • EmojiCompat به Compose اضافه شد ( Ibf6f9 , b/139326806 )
  • نام consumedWindowInsets() را به consumeWindowInsets() و withConsumedWindowInsets() به onConsumedWindowInsetsChanged() تغییر داد و Modifiers را عمومی کرد. ( Ie44e1 )

رفع اشکال

  • خرابی با Modifier.animateItemPlacement() و شبکه های تنبل برطرف شد. این در برخی شرایط اتفاق می‌افتد که تعداد آیتم‌های جدید کمتر از موارد قبلی باشد. ( I0bcac , b/253195989 )

نسخه 1.4.0-alpha02

9 نوامبر 2022

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

تغییرات API

  • awaitFirstDown و waitForUpOrCancellation اکنون PointerEventPass برای انعطاف پذیری بیشتر می پذیرند. ( I7579a , b/212091796 )
  • برگرداندن API beyondBoundCount از APIهای Lazy* ( I12197 )
  • پارامتر معرفی شده در APIهای Lazy برای نوشتن و قرار دادن موارد خارج از نمای دید ( I69e89 , b/172029355 )
  • پارامتر minLines به BasicText و BasicTextField اضافه شد. این اجازه می دهد تا حداقل ارتفاع این ترکیبات را از نظر تعداد خطوط تنظیم کنید ( I24294 , b/122476634 )

نسخه 1.4.0-alpha01

24 اکتبر 2022

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

تغییرات API

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

نسخه 1.3

نسخه 1.3.1

9 نوامبر 2022

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

رفع اشکال

  • مشکل عملکرد را در BeyondBoundsLayout ( AOSP/2255266 ) رفع کنید
  • ContentInViewModifier مختصات طرح بندی را نمی خواند مگر اینکه ضمیمه شود ( AOSP/2241316 )

نسخه 1.3.0

24 اکتبر 2022

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

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

  • نسخه های تجربی LazyVerticalStaggeredGrid و LazyHorizontalStaggeredGrid معرفی شدند.
  • SnapFlingBehavior ، rememberSnapFlingBehavior و سایر API های مربوطه به عنوان تجربی اضافه شدند.
  • Modifier.clickable ، Modifier.toggleable و Modifier.selectable اکنون در صورت کلیک با صفحه کلید یا D-PAD بر روی کنترل از راه دور ، قطعات را نشان می دهد.

نسخه 1.3.0-rc01

5 اکتبر 2022

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

تغییرات API

  • معرفی شده توسط lowVelocityAnimationSpec که توسط مرحله رویکرد استفاده می شود ، هنگامی که سرعت کافی برای پوسیدگی وجود ندارد. ( IAEB27 )
  • افزودن خط فاصله آزمایشی API برای پشتیبانی از خط خطی خودکار در متن ( Iaa869 )

نسخه 1.3.0-beta03

21 سپتامبر 2022

androidx.compose.foundation:foundation:1.3.0-beta03 and androidx.compose.foundation:foundation-layout:1.3.0-beta03 منتشر می شود. نسخه 1.3.0-beta03 حاوی این تعهدات است.

تغییرات API

  • گزینه هایی را برای سفارشی کردن شکستن خط در متن اضافه کنید. ( I86907 )
  • BringIntoViewResponder S اکنون قادر به به روزترین مرزهای درخواست هنگام پردازش آن هستند. ( IF86A5 ، b/241591211 )
  • پشتیبانی از فاصله بین موارد به Staggered Grid آزمایشی ( I10B82 )
  • معرفی بالشتک محتوا به Staggered Grid آزمایشی ( I342EA )
  • تغییر size:IntSize با constraints: Constraints در روش TextMeasurer.measure برای پشتیبانی از محدودیت های حداقل عرض. ( I37530 , b/242707525 )
  • WindowInsets Modifier.withConsumedWindowInsets() اضافه شده windowInsetsPadding .
  • اضافه شده به MutableWindowInsets اضافه شده است تا به راحتی WindowInsets بدون استفاده از بازپرداخت تغییر دهد. ( I7FD28 ، B/237019262 ، B/243119659 )

نسخه 1.3.0-beta02

7 سپتامبر 2022

androidx.compose.foundation:foundation:1.3.0-beta02 و androidx.compose.foundation:foundation-layout:1.3.0-beta02 منتشر می شوند. نسخه 1.3.0-beta02 حاوی این تعهدات است.

تغییرات API

  • نسخه اولیه تجربی StaggeredGrid ( IA48BE )
  • تغییر نام FocusDirection.In و FocusDirection.Out به FocusDirection.Enter و FocusDirection.Exit ( IA4262 ، B/183746982 )
  • یک بار اضافه بار به یاد rememberSnapFlingBehavior آورد که یک روش سریع برای فعال کردن اسنپ در LazyLists فراهم می کند. ( IFB48a )
  • کارخانه snapFlingBehavior را با یک کلاس بتونی SnapFlingBehavior جایگزین کرد. روشهای SnapLayoutInfoProvider scoped برای چگالی برای تبدیل DP <-> PX برای کاربران API آسانتر می شود. ( i54a11 )
  • LazyLayoutMeasureScope.measure را به روز کنید. برای بازگشت لیست از محل های بازگرداندن ، عدم تغییر ناپذیری مورد نظر از مقدار برگشتی را نشان دهید. ( i48b7c )
  • SnapLayoutInfoProvider معرفی کرد که یک LazyListState را برای ایجاد نمونه ای از SnapLayoutInfoProvider ایجاد می کند که می تواند برای فعال کردن یک Snap FlingBehavior برای LazyLists استفاده شود. ( I2DD10 )

رفع اشکال

  • refactors AwaitPointerEventScope#awaitLongPressOrCancellation برای مطابقت با سایر توابع منتظر ( i646e6 )

نسخه 1.3.0-beta01

24 آگوست 2022

androidx.compose.foundation:foundation:1.3.0-beta01 و androidx.compose.foundation:foundation-layout:1.3.0-beta01 منتشر می شوند. نسخه 1.3.0-beta01 حاوی این تعهدات است.

تغییرات API

  • pointerPosition حذف شده از OverscrollEffect - اثری که effectModifier موقعیت اشاره گر اهمیت می دهند می توانند از Modifier.pointerInput { } استفاده کنند. ( i9f606 ، b/241239306 )
  • در معرض AwaitPointerEventScope#awaitLongPressOrCancellation به عنوان بلوک ساختمان اضافی برای تشخیص ژست پیچیده تر ( I04374 ، B/181577176 )
  • lazyListSnapLayoutInfoProvider را معرفی کرد تا بتواند در لیست های تنبل قرار بگیرد. ( i3ecdf )
  • SnapFlingBehavior را معرفی کرد ، یک رفتار فلاش که امکان انتخاب لیست را فراهم می کند. نمونه ای از SnapLayoutInfoProvider را با اطلاعاتی در مورد طرح چرت زدن خود ارائه دهید. ( IE754C )

نسخه 1.3.0-alpha03

10 آگوست 2022

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

تغییرات API

  • اکنون فونت های منبع از تنظیم تنظیمات تغییر فونت (API 26+) پشتیبانی می کنند. ( I900dd , b/143703328 )
  • پشتیبانی از فونت متغیر در DeviceFontFamilyNameFont ( Ic1279 , b/143703328 )
  • حاشیه نویسی آزمایشی از PlatformTextStyle و LineHeightStyle حذف شد. ( I64bef )
  • فیلدهای متنی اکنون استثنائات مفصلی را هنگامی که OffsetMapping ارائه شده توسط یک VisualTransformation شاخص های نامعتبر را بازگرداند ، استثنائات مفصلی را نشان می دهد. ( IE73F9 ، B/229378536 )
  • API های تجربی را برای به اشتراک گذاشتن منطق ارائه دهنده مورد بین طرح های تنبل معرفی کنید. ( IC891C )
  • ScrollableDefaults.reverseDirection() دیگر تجربی نیست. ( IBA646 )
  • SemanticsModifier.id منسوخ شد و به جای آن شناسه semantics به LayoutInfo.semanticsId منتقل شد. ( Iac808 , b/203559524 )
  • checkScrollableContainerConstraints() دیگر آزمایشی نیست. ( I2C290 )
  • Modifier.clipScrollableContainer() دیگر آزمایشی نیست. ( IA2B44 )
  • منسوخ کردن TextInputService.show|hideSoftwareKeyboard . لطفاً به جای آن از SoftwareKeyboardController در کد برنامه و TextInputSession در کدهای مدیریت IME استفاده کنید. ( I14e4c , b/183448615 )

نسخه 1.3.0-alpha02

27 جولای 2022

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

تغییرات API

  • تابع افزونه drawText را در DrawScope اضافه کرد تا راهی برای ترسیم متن چند استایل بر روی اجزای سازنده و اصلاح‌کننده‌هایی که روی DrawScope مانند Canvas و drawBehind کار می‌کنند، ارائه کند. ( I16a62 , b/190787898 )

رفع اشکال

  • صفحه کلید نرم اکنون پنهان خواهد شد که یک قسمت متن در حین تمرکز غیرفعال شود. ( i6e3e4 ​​، b/237308379 )
  • هنگام افزودن رویدادهای InputEventChange به ردیاب سرعت، اکنون به جای موقعیت‌ها، دلتاها را در نظر می‌گیریم، این تضمین می‌کند که سرعت برای همه موارد به درستی محاسبه می‌شود، حتی اگر عنصر هدف حرکت کند ( Icea9d ، b/216582726 ، b/223440806 ، b/227709803 ).
  • هنگامی که یک پیمایش کودک دارای یک کودک متمرکز است ، اکنون به درستی پیمایش می کند تا کودک متمرکز را در هنگام کاهش اندازه آن در نظر بگیرد ، حتی اگر اندازه آن متحرک باشد. ( I80867 ، B/230756508 ، B/220119990 )
  • تصادف را در جایی که TextField پاک شده و در حالی که انتخاب فعال است ، رفع کرد. ( i1235b ، b/208655565 ، b/214253689 )

نسخه 1.3.0-alpha01

29 ژوئن 2022

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

تغییرات API

  • نوع حاشیه نویسی UrlAnnotation و روش های مرتبط را برای پشتیبانی از پشتیبانی از لینک TalkBack در AnnotatedString s. ( i1c754 ، b/231495122 )

رفع اشکال

  • BasicTextField cursorBrush اکنون ممکن است بدون شروع به راه اندازی مجدد تایمر مکان نما ، متحرک شود. ( i812e6 ، b/236383522 )

نسخه 1.2

نسخه 1.2.1

10 آگوست 2022

androidx.compose.foundation:foundation:1.2.1 و androidx.compose.foundation:foundation-layout:1.2.1 منتشر می شود. نسخه 1.2.1 حاوی این commit ها است.

نسخه 1.2.0

27 جولای 2022

androidx.compose.foundation:foundation:1.2.0 و androidx.compose.foundation:foundation-layout:1.2.0 منتشر می شود. نسخه 1.2.0 حاوی این commit ها است.

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

  • LazyVerticalGrid و LazyHorizontalGrid اکنون پایدار هستند.
  • اکنون می توانید یک نوع محتوا را برای موارد موجود در لیست های تنبل و شبکه ها مشخص کنید. این امر به مؤلفه ها اجازه می دهد تا از عناصر استفاده مجدد بیشتری داشته باشند.
  • لیست های تنبل و شبکه ها اکنون دارای userScrollEnabled هستند که امکان پذیر است که از طریق حرکات کاربر پیمایش را غیرفعال کنید.
  • یک API آزمایشی جدید به نام LazyLayout اضافه شد. این API است که ما از داخل آن برای لیست ها و شبکه های تنبل استفاده می کنیم.
  • API OverscrollEffect به عنوان تجربی معرفی شده است. می توانید جلوه های سبوس دار سفارشی و همچنین اضافه کردن یک سکوی استاندارد One به ظروف قابل پیمایش سفارشی را تعریف کنید.
  • API های قابلیت تعامل پیمایشی تو در تو در توجیه معرفی شده اند تا امکان تعامل بین نماها و آهنگسازان آهنگسازی را فراهم کنند.
  • پیمایش ماوس و پیست به همه ظروف پیمایش اضافه شده است.

نسخه 1.2.0-RC03

29 ژوئن 2022

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

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

نسخه 1.2.0-rc02

22 ژوئن 2022

androidx.compose.foundation:foundation:1.2.0-rc02 و androidx.compose.foundation:foundation-layout:1.2.0-rc02 منتشر می شوند. نسخه 1.2.0-rc02 حاوی این commit ها است.

نسخه 1.2.0-rc01

15 ژوئن 2022

androidx.compose.foundation:foundation:1.2.0-rc01 و androidx.compose.foundation:foundation-layout:1.2.0-rc01 منتشر می شوند. نسخه 1.2.0-rc01 حاوی این commit ها است.

تغییرات API

  • OverscrollEffect تجربی معرفی شده است تا اثرات بیش از حد سفارشی را در کنار Modifier.scrollable فراهم کند. اضافه بار قابل قبول که آن را می پذیرند.
  • LocalOverScrollConfiguration تجربی از foundation.gesture به صورت بنیاد منتقل شده و به LocalOverscrollConfiguration تغییر نام داده است ( IF19FB ، B/204650733 )
  • رابط در کتابخانه های آهنگسازی اکنون با استفاده از روش های رابط پیش فرض JDK8 ( I5BCF1 ) ساخته شده است
  • معرفی یک API آزمایشی checkScrollableContainerConstraints() که به شما امکان می دهد ظروف قابل پیمایش را لانه نکنیم. می توانید هنگام ایجاد چیدمان های تنبل قابل پیمایش خود از طریق LazyLayout از آن استفاده کنید. ( id6fab ، b/233352497 )
  • حذف شده LazyVerticalGrid از androidx.compose.foundation.lazy حذف شده است. API پایدار جدید در androidx.compose.foundation.lazy.grid ( I73C76 ، B/225192009 ) واقع شده است

نسخه 1.2.0-beta03

1 ژوئن 2022

androidx.compose.foundation:foundation:1.2.0-beta03 و androidx.compose.foundation:foundation-layout:1.2.0-beta03 منتشر می شوند. نسخه 1.2.0-beta03 حاوی این تعهدات است.

تغییرات API

  • IntervalList آزمایشی جدید و MutableIntervalList اضافه شده اضافه شده است. این اجازه می دهد تا برخی از لیست مقادیر را از طریق فواصل مختلف نشان دهد. هنگامی که می خواهید DSL خود را شبیه به موردی که توسط LazyColumn استفاده می شود ، تعریف کنید که موارد لیست را می توان از طریق تماس های مختلف/مورد تعریف کرد ، مفید خواهد بود. ( I2D05E ، B/228580728 )

رفع اشکال

  • مستندات مربوط به WindowInsets.ime را روشن کرد. به این دلیل که ime به عنوان API 23 گزارش شده است ، اما فقط در 30+ متحرک است . ( IA7FC0 ، B/230756508 )
  • فشار دادن کلید حذف جلو هنگامی که مکان نما در انتهای یک قسمت متن قرار دارد ، دیگر خراب نمی شود.
  • DeleteSurroundingTextCommand و DeleteSurroundingTextInCodePointsCommand می شود. ( ICA8E6 ، B/199919707 )

نسخه 1.2.0-beta02

18 مه 2022

androidx.compose.foundation:foundation:1.2.0-beta02 و androidx.compose.foundation:foundation-layout:1.2.0-beta02 منتشر می شوند. نسخه 1.2.0-beta02 حاوی این تعهدات است.

  • وضوح فونت قابل بارگیری که اندازه طرح متن یا TextField را تغییر نمی دهد ، مجدداً مجدداً مورد استفاده قرار نمی گیرد و منجر به صفحه نمایش فونت بی رنگ می شود. این اشکالات تضمین می کند که طرح متن همیشه باعث ایجاد مجدد می شود (B/229727404). ( i1d49e ، b/229727404 )

نسخه 1.2.0-beta01

11 مه 2022

androidx.compose.foundation:foundation:1.2.0-beta01 و androidx.compose.foundation:foundation-layout:1.2.0-beta01 beta01 منتشر می شوند. نسخه 1.2.0-beta01 حاوی این تعهدات است.

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

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

تغییرات API

  • تجربی اضافه شده BeyondBoundsInterval که می تواند با اجرای سفارشی LazyList هنگام چیدمان موارد فراتر از مرزهای قابل مشاهده استفاده شود ( IFABFB ، B/184670295 )
  • LineHeightBehavior به عنوان LineHeightStyle تغییر نام داده می شود
  • LineVerticalAlignment به عنوان LineHeightStyle.Alignment تغییر نام داده می شود.
  • RENAMES LineHeightTrim به عنوان LineHeightStyle.Trim تغییر نام داده می شود.
  • مقادیر سازنده پیش فرض از LineHeightStyle برداشته می شود ( I582BF ، B/181155707 )
  • مقادیر پیش فرض اضافه شده برای اعضای اختیاری رابط LazyLayoutItemProvider . ( iba8a0 )
  • در API LazyLayoutItemProvider به جای یک کارخانه که Lambda را با استفاده از فهرست بازگرداند ، اکنون یک مورد عملکرد ساده تر آهنگسازی را پذیرفته است که این فهرست را می پذیریم. ( id2196 )
  • LazylayoutItemsProvider به LazylayOutitemProvider ( I0638C ) تغییر نام داده است
  • LazyLayoutItemsProvider.itemsCount به itemCount ( ID409C ) تغییر نام داده است
  • برس اضافه شده به TextStyle و SpanStyle برای ارائه راهی برای ترسیم متن با رنگ آمیزی شیب. ( i53869 ، b/187839528 )
  • trimFirstLineTop ، ویژگی های trimLastLineBottom از LineHeightBehavior به یک enum واحد تبدیل شده است: LineHeightTrim . LineHeightTrim دارای 4 ایالت است که توسط دو بولی تعریف شده است: FirstLineTop ، LastLineBottom ، هر دو و هیچکدام ( IFC6A5 ، B/181155707 )
  • LineHeightBehavior به TextStyle و ParagraphStyle. LineHeightBehavior کنترل می کند که آیا ارتفاع خط در بالای خط اول و به پایین خط آخر اعمال می شود. همچنین تراز خط در فضای ارائه شده توسط TextStyle ( lineHeight ) را تعریف می کند.

    به عنوان مثال می توان رفتاری مشابه آنچه CSS از طریق LineHeightBehavior(alignment = LineVerticalAlignment.Center, trimFirstLineTop=false, trimLastLineBottom = false) .

  • trimFirstLineTop ، تنظیمات trimLastLineBottom فقط هنگامی کار می کند که includeFontPadding نادرست باشد. ( i97332 ، b/181155707 )

  • اصلاح کننده تجربی imeNestedScroll() اضافه شده است تا توسعه دهندگان بتوانند IME را از طریق پیمایش کنترل کنند. ( i60759 )

رفع اشکال

  • رگرسیون ثابت که در آن زمینه های متن هنگام حذف از ترکیب ، صفحه کلید را پنهان نمی کنند. ( I7A410 ، B/230536793 ، B/225541817 )
  • پشتیبانی از بیضی هنگامی که ارتفاع محدود است و تمام خطوط متن متناسب نیست ( IE528C ، B/168720622 )
  • BringIntoViewRequester.bringIntoView اکنون همیشه به حالت تعلیق در می آید تا اینکه درخواست به پایان نرسد یا با درخواست جدیدتر و غیر همپوشانی قطع شود. درخواست های همپوشانی در صف قرار می گیرند. ( i43e7f ، b/216790855 )
  • همزمان BringIntoViewRequester.bringIntoView خواستار مستطیل هایی است که کاملاً با هم همپوشانی دارند ، اکنون فقط درخواست مستطیل بزرگتر را احترام می گذارند. ( i34be7 ، b/216790855 ، b/184760918 )
  • روشن پیش فرض includeFontPadding . با استفاده از ویژگی TextStyle.platformTextStyle می توان includeFontPadding Coana Coaniate شد. در آینده نزدیک ، رفتار پیش فرض را تغییر خواهیم داد ، اما تا آن زمان این امکان را به ما می دهد تا پیشرفت های ارتفاع خط (AOSP/2058653) را بهتر ادغام کنیم و مسائل مربوط به قطع TextField را حل کنیم. ( I01423 ، b/171394808 )
  • Modifier.bringIntoViewRequester دیگر از onGloballyPositioned استفاده نمی کند. ( i630f5 )

مشارکت خارجی

  • MouseInjectionScope.scroll(delta = someDelta) اکنون در صورت پیمایش عمودی بر روی Android معکوس شده است (اگر Somedelta مثبت باشد ، به سمت پایین می رود) ( IFB697 ، B/224992993 )

نسخه 1.2.0-alpha08

20 آوریل 2022

androidx.compose.foundation:foundation:1.2.0-alpha08 و androidx.compose.foundation:foundation-layout:1.2.0-alpha08 منتشر می شوند. نسخه 1.2.0-alpha08 حاوی این commit ها است.

تغییرات API

  • هنگام استفاده از FontFamily.SansSerif ، تمام وزن های موجود را برای فونت های سیستم در Android نمایش دهید. با این کار از نامهای فونت فانتزی مانند Sans-Serif-Medium Intern در API 21-28 استفاده می شود. این یک تغییر رفتار است زیرا قبلاً فقط وزن 400 و 700 در API 21-28 پشتیبانی می شد. ( i380fe ، b/156048036 ، b/226441992 )
  • پاراگراف و چندگانه اکنون پارامتر محدودیت ها را می پذیرند. در حال عبور از Constraints.maxHeight در حال حاضر یک عمل نیست اما در آینده امکان محاسبه ای را انجام می دهد ، مانند بیضوی بر اساس ارتفاع. ( i6afee ، b/168720622 )
  • SubcomposeSlotReusePolicy.getSlotsToRetain() اکنون یک کلاس مانند MutableSet مانند را می پذیرد که امکان اضافه کردن موارد جدید در آن را ندارد. ( ICD314 )
  • مصرف جزئی (پایین یا موقعیت) در PointerInputChange کاهش یافته است. می توانید از consume() استفاده کنید تا تغییر را به طور کامل مصرف کنید. برای تعیین اینکه آیا شخص دیگری قبلاً این تغییر را مصرف کرده است ، می توانید از isConsumed استفاده کنید.
  • PointerInputChange::copy() اکنون همیشه یک کپی کم عمق تهیه می کند. این بدان معناست که پس از مصرف یکی از نسخه ها ، نسخه های PointerInputChange مصرف می شود. اگر می خواهید یک PointerInputChange بی حد و حصر ایجاد کنید ، به جای آن از سازنده استفاده کنید. ( IE6Be4 ، b/225669674 )
  • API جدید آزمایشی LazyLayout معرفی شده است. این به شما امکان می دهد تا اجزای خود را مانند LazyColumn of LazyVerticalGrid بسازید. توجه داشته باشید که API در مراحل اولیه خود قرار دارد و در نسخه های آینده قابل تغییر است. ( IBA2BC ، B/166591700 )
  • AndroidFont اکنون typefaceLoader به عنوان یک پارامتر سازنده می گیرد. ( I2C971 )
  • WindowInsets Companion در حال حاضر دید (چه در صفحه نمایش باشد ، بدون توجه به اینکه با پنجره تقاطع می کنند) و اندازه آنها ممکن است در صورت موجود بودن در دستگاه باشد ، اما در حال حاضر فعال نیست. ( i65182 ، b/217770337 )

نسخه 1.2.0-alpha07

6 آوریل 2022

androidx.compose.foundation:foundation:1.2.0-alpha07 و androidx.compose.foundation:foundation-layout:1.2.0-alpha07 منتشر می شوند. نسخه 1.2.0-alpha07 حاوی این commit ها است.

تغییرات API

  • یک API PinnableParent اضافه کرد که به کودکان طرح های تنبل اجازه می دهد تا از دفع موارد موجود در حال حاضر جلوگیری کنند ( IBBDD0 ، B/184670295 )
  • LazyListLayoutInfo و LazyGridLayoutInfo اکنون زمینه های beforeContentPadding و afterContentPadding ( I3B628 ، B/200920410 )
  • اضافه شده KeyboardType.Decimal به عنوان جایگزینی برای Keyboard.Number تعداد زیادی از جمله جداکننده اعشاری در IME. ( IEC4C8 ، B/209835363 )
  • فونت جدید توصیف کننده قلم (دستگاه fontfamilyname) را به فونت های نصب شده به صورت اختیاری در هنگام زنجیره های برگشتی فونت اضافه کنید. ( i30468 ، b/219754572 )
  • PointerEventType.Scroll and PointerEvent.scrollDelta اکنون API های پایدار هستند ( i574c5 ، b/225669674 )
  • پیکربندی سازگاری موقت اضافه شده برای includeFontPadding در TextStyle/ParagraphStyle. includeFontPadding از طریق TextStyle(platformStyle = PlatformTextStyle(includeFontPadding = true/false)) قابل تغییر است. این یک گزینه پیکربندی موقت برای فعال کردن مهاجرت است و حذف می شود. ( if47be ، b/171394808 )
  • به روز شده FontFamily.Resolver برای ادغام تنظیمات دسترسی به متن جسورانه در سطح سیستم ( I6C1E7 )
  • خاصیت برنامه افزودنی consumeWindowInsets از ComposeView به توسعه دهندگان این امکان را می دهد تا مصرف پنجره های اندرویدی را غیرفعال کنند. این امکان را به شما می دهد تا ComposeViews جداگانه در سلسله مراتب به هر WindowInsets اعمال شده بدون دخالت در یکدیگر. ( i0ef08 ، b/220943142 )

نسخه 1.2.0-alpha06

23 مارس 2022

androidx.compose.foundation:foundation:1.2.0-alpha06 and androidx.compose.foundation:foundation-layout:1.2.0-alpha06 منتشر می شود. نسخه 1.2.0-alpha06 حاوی این commit ها است.

تغییرات API

  • اقدامات معناداری RequestFocus برای درخواست تمرکز بر روی هدف قابل تمرکز اضافه شده است. ( I17B71 )
  • FocusOrder اکنون در FocusProperties و focusProperties() اکنون تمام قابلیت های focusOrder() را دارد. FocusOrder و focusOrder() کاهش یافته است. focusOrder() که یک focusRequester را می پذیرد باید با یک اصلاح کننده focusRequester() در ترکیب با focusProperties() جایگزین شود. این امر به اصلاح کنندگان اجازه می دهد تا از نگرانی های قوی تری برخوردار باشند. ( i601b7 )
  • WindowInsets.asPaddingValues(Density) اضافه شد تا توسعه دهندگان بتوانند بدون نیاز به ترکیب ، تبدیل را انجام دهند. ( I94C35 )
  • در صورتی که جهت طرح فعلی RTL باشد ، تجزیه و تحلیل بردار برای پشتیبانی از آینه سازی خودکار برای تلنگر محتوای یک VectorPainter . ( i79cd9 ، b/185760237 )

رفع اشکال

  • اصلاح کننده های پیمایش ( Modifier.verticalScroll() Modifier.horizontalScroll() Modifier.scrollable()
  • TextFields اکنون هنگام تمرکز در بالای صفحه کلید نگه داشته می شود و صفحه کلید نشان داده می شود ، هنگامی که در داخل یک پیمایش غیر تنبل و حالت ورودی نرم ADJUST_RESIZE شده است. ( i4a485 ، b/190539358 ، b/192043120 ، b/216842427 )

نسخه 1.2.0-alpha05

9 مارس 2022

androidx.compose.foundation:foundation:1.2.0-alpha05 و androidx.compose.foundation:foundation-layout:1.2.0-alpha05 منتشر می شوند. نسخه 1.2.0-alpha05 حاوی این commit ها است.

تغییرات API

  • LazyVerticalGrid و LazyHorizontalGrid اکنون پایدار هستند. ( i307C0 )
  • LazyGridItemInfo.Unknown با LazyGridItemInfo.UnknownRow جداگانه جایگزین شد و LazyGridItemInfo.UnknownColumn ( I56D51 )
  • LazyVerticalGrid / LazyHorizontalGrid و تمام API های مرتبط با آن به زیر مجموعه .grid منتقل شدند. لطفاً واردات خود را از androidx.compose.foundation.lazy به androidx.compose.foundation.lazy.grid به روز کنید. ( i2d446 ، b/219942574 )
  • متن: includeFontPadding اکنون به طور پیش فرض خاموش است. مشکلات قطع در نتیجه includeFontPadding=false انجام می شود و برای اسکریپت های بلند نباید هیچ گونه کلیپ رخ دهد. ( i31c84 ، b/171394808 )
  • رابط اندازه گیری شده در حال حاضر دارایی ParentData ( I3313F )
  • Modifier.onFocusedBoundsChanged آزمایشی معرفی شده است. ( I14283 ، b/220030968 ، b/190539358 ، b/192043120 ، b/216842427 )
  • LazyhorizontalGrid اضافه شد. ( i61ae7 ، b/191238807 )
  • برای تعریف اندازه محور متقاطع ( I17723 ) یک API LazyVerticalGrid جدید اضافه شد
  • اصلاح کننده FocusGroup اضافه شده ( I64BC0 ، B/213508274 ، B/184670295 )

رفع اشکال

  • WindowInsets.toString() اکنون مقادیر صحیح را نشان می دهد. ( i1585d )

مشارکت خارجی

  • به روز شده برای استفاده از Kotlinx Coroutines 1.6.0 ( I3366D )

نسخه 1.2.0-alpha04

23 فوریه 2022

androidx.compose.foundation:foundation:1.2.0-alpha04 و androidx.compose.foundation:foundation-layout:1.2.0-alpha04 منتشر می شوند. نسخه 1.2.0-alpha04 حاوی این commit ها است.

تغییرات API

  • BringIntoViewResponders دیگر نیازی به ارسال دستی درخواست ها به پاسخ دهندگان والدین ندارند و در عوض موظفند بلافاصله مستطیل مورد نظر خود را که می خواهند والدین خود را بازگردانند ، برگردانند. ( i8e66a )
  • پشتیبانی از بارگیری قلم Async در متن ( I77057 ، B/214587005 )
  • LazyVerticalGrid اکنون از line breaking قبل از مواردی که دهانه در داخل خط فعلی قرار نمی گیرند ، پشتیبانی می کند. ( I05C40 ، B/207462103 )
  • تغییر نام داد excludeFromSystemGestures به systemGesturesExclusion ( I19526 ) تغییر نام داد
  • LazyVerticalGrid اکنون از ReverseLayout پشتیبانی می کند. ( i6d7d7 ، b/215572963 ، b/211753558 )
  • روش WindowInsets.only() را اضافه کنید تا به توسعه دهندگان اجازه دهید فقط ابعاد از پنجره ها را در بر گیرند. ( i14c94 ، b/217768486 )
  • اضافه شده ComposableTarget ، ComposableTargetMarker و ComposableOpenTarget که امکان تهیه زمان کامپایل را فراهم می کند که یک تابع آهنگسازی را هدف قرار می دهد ، هدفمند است که از آن استفاده می شود.

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

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

رفع اشکال

  • اکنون مجاز است که جبران پیمایش منفی را به LazyGridState.scrollToItem() و LazyGridState.animateScrollToItem() منتقل کنید. ( I025C6 ، B/211753558 )
  • از بارگیری قلم Async برای TextField پشتیبانی کنید. ( ICC4BF ، B/214587005 )

نسخه 1.2.0-alpha03

9 فوریه 2022

androidx.compose.foundation:foundation:1.2.0-alpha03 و androidx.compose.foundation:foundation-layout:1.2.0-alpha03 منتشر می شوند. نسخه 1.2.0-alpha03 حاوی این commit ها است.

تغییرات API

  • روشهای notifyFocusedRect در TextInputSession و TextInputService اکنون کاهش یافته و نامیده نمی شوند. به جای آن از BringIntoViewRequester استفاده کنید. ( IA4302 ، B/192043120 ، B/216842427 ، B/178211874 )
  • انیمیشن ها برای مواردی از شبکه های تنبل با اصلاح کننده فعال شدند. AnimateItemplaction (). ( IB6621 ، b/211753218 )
  • BringIntoViewRequester اکنون درخواست ها را به نمای Android Hosting Hosting پخش می کند. ( IA7A51 )
  • FontFamilyResolver اکنون از طریق LocalFontFamilyResolver.current در دسترس است
    • اضافه شده createFontFamilyResolver(context) و createFontFamilyResolver(context, coroutineScope) برای ایجاد حل کننده های جدید خانواده در خارج از استفاده از آهنگسازی.
    • پاراگراف و چندگانه اکنون FontFamily.Resolver را بگیرید. RESOLVER
    • TextLayoutResult.layoutInput.fontFamilyResolver اکنون حاوی حل کننده مورد استفاده برای این طرح است ، TextLayoutResult.layoutInput.resourceLoader همانطور که دیگر استفاده نمی شود. ( id5a45 ، b/174162090 )
  • AndroidFont اضافه شده ، یک API جدید در سطح پایین برای ارائه انواع جدید توصیف کننده منابع فونت در Android. به عنوان مثال ، بارگیری فونت ها از یک پس زمینه خاص برنامه ، اختیاری را پیدا می کند که فونت های از پیش نصب شده را روی دستگاه قرار می دهد ، یا بارگیری قلم از منبعی که توسط کارخانه های فونت فعلی ارائه نشده است.
    • Font.ResourceLoaded API برای پشتیبانی از بارگیری فونت اختیاری و async. توصیه نمی شود که توسعه دهندگان برنامه به طور مستقیم از این API استفاده کنند. برای افزودن انواع جدید فونت ها به AndroidFont مراجعه کنید.
    • Font.AndroidResourceLoader عملکرد پسوند اجازه می دهد تا یک Font.ResourceLoader ایجاد شود. RESourCeloader هنگام خارج از ترکیب.
    • پارامتر loadingStrategy به فونت های مبتنی بر منابع اضافه شده است ، برای بارگیری Async در هنگام مراجعه به فونت منابع ، فونت های قابل بارگیری XML. ( IE5AEA ، B/174162090 )
  • سازنده Typeface(FontFamily) کمرنگ می شود. این قبلاً برای از پیش بارگیری قلم ها استفاده می شد ، که ممکن است 10 ثانیه برای فونت های قابل بارگیری طول بکشد. با فونت های قابل بارگیری ، این تماس ممکن است به مدت 10 ثانیه مسدود شود. در عوض از FontFamilyResolver.preload استفاده کنید
    • fontResource(FontFamily): Typeface کاهش می یابد. این قبلاً برای از پیش بارگیری قلم ها استفاده می شد ، که ممکن است 10 ثانیه برای فونت های قابل بارگیری طول بکشد. در عوض از FontFamilyResolver.preload ( if8e7c ، b/174162090 ) استفاده کنید
  • اکنون می توانید نوع محتوا را برای موارد LazyVerticalGrid مشخص کنید - توابع مورد/موارد در LazyGridScope اکنون چنین پارامتر را می پذیرید. ارائه چنین اطلاعاتی به ترکیب آیتم کمک می کند تا از منطق استفاده مجدد شود تا کارآمدتر شود و فقط از محتوای بین موارد مشابه استفاده مجدد شود. ( i7b355 ، b/215372836 )
  • LazyListLayoutInfo و LazyGridLayoutInfo اکنون خواص جدیدی دارند: viewportSize ، orientation ، reverseLayout ( IFC8ED ، b/200920410 )
  • اکنون می توانید نوع محتوا را برای موارد LazyColumn/Lazyrow مشخص کنید - توابع مورد/موارد در Lazylistscope اکنون چنین پارامتر را می پذیرید. ارائه چنین اطلاعاتی به ترکیب آیتم کمک می کند تا از منطق استفاده مجدد شود تا کارآمدتر شود و فقط از محتوای بین موارد مشابه استفاده مجدد شود. ( I26506 )
  • سازنده SubcomposeLayoutState پذیرش maxSlotsToRetainForReuse اکنون کاهش یافته است. در عوض ، یک سازنده جدید وجود دارد که SubcomposeSlotReusePolicy می پذیرد - رابط جدیدی که امکان کنترل دانه ای بیشتری را برای استفاده مجدد از اسلات ها برای استفاده مجدد از آینده فراهم می کند. ( i52c4d )
  • اصلاح کننده ها را برای پنجره ها ، هم برای بالشتک و هم برای اندازه اضافه می کند. این اجازه می دهد تا برخی از مطالب به منطقه inset گسترش یابد و هنوز هم محتوای اصلی از منطقه inset خارج شود. به عنوان مثال ، می توان از WindowsInsetSpadding برای استفاده از قسمت محتوا استفاده کرد تا از مناطقی که ممکن است به طور کامل یا جزئی پوشیده شوند ، جلوگیری شود. ( id0395 ، b/213942085 )

رفع اشکال

  • در صورت تمرکز ، فیلد های متنی در بالای صفحه کلید نگه داشته می شوند و صفحه کلید نشان داده می شود ، هنگامی که حالت ورودی نرم ADJUST_PAN است. ( i8eaeb ، b/190539358 ، b/192043120 )
  • دسک تاپ از ترکیب محلی برای FontFamily.Resolver استفاده می کند
    • FontLoader دسک تاپ کاهش می یابد
    • کارخانه جدید createFontFamilyResolver در دسک تاپ ( i6bbbb ، b/174162090 )
  • نوع ورودی صفحه کلید نرم دیگر هنگام تغییر تمرکز بین زمینه های متن دیگر سوسو نمی کند. ( i1bf50 ، b/187746439 )
  • در هنگام نمایش دسته مکان نما ، زمینه های متن دیگر نیازی به فشار اضافی ندارند. ( ideb4b ، b/205726883 )
  • رفتار ذره بین در انتخاب متن برای مطابقت با ذره بین پلتفرم جلا داده شده است. ( IDD918 ، b/206833278 )

نسخه 1.2.0-alpha02

26 ژانویه 2022

androidx.compose.foundation:foundation:1.2.0-alpha02 و androidx.compose.foundation:foundation-layout:1.2.0-alpha02 منتشر می شوند. نسخه 1.2.0-alpha02 حاوی این commit ها است.

تغییرات API

  • به روش هایی که بیش از حد بار روشهای موجود و بدون منطق پیچیده است ، NonRestartableComposable اضافه شده است. این باعث می شود برای کلیه پارامترهایی که در عملکرد داخلی که نامیده می شود ، بررسی های یادآوری تولید شده توسط کامپایلر (برابر) را کاهش دهد. ( i90490 )
  • برای دسترسی آسان به setSystemGestureExclusionRects Android ( excludeFromSystemGesture ) اضافه شده است

رفع اشکال

  • رفتار ذره بین در انتخاب متن برای مطابقت با ذره بین پلتفرم جلا داده شده است. ( IDD918 ، b/206833278 )
  • LazyColumn ، LazyRow ، Modifier.verticalScroll و سایر ظروف که از Modifier.scrollable استفاده می کنند. قابل استفاده در حال حاضر از پیمایش چرخ ماوس پشتیبانی می کند. ( i2b5e1 ، b/198214718 )

نسخه 1.2.0-alpha01

12 ژانویه 2022

androidx.compose.foundation:foundation:1.2.0-alpha01 و androidx.compose.foundation:foundation-layout:1.2.0-alpha01 منتشر می شوند. نسخه 1.2.0-alpha01 حاوی این commit ها است.

تغییرات API

  • userScrollEnabled به LazyColumn ، LazyRow و LazyVerticalGrid اضافه شدند تا به کاربران این امکان را بدهد که به طور موقت یا دائمی از طریق حرکات لمسی یا اقدامات دسترسی ، پیمایش را به طور موقت غیرفعال کنند. پیمایش به صورت برنامه ای از طریق روش های موجود در حالت هنوز مجاز خواهد بود. ( i7eae9 ، b/201150093 )
  • پاسخ به تماس onSizeChanged را به اصلاح کننده ذره بین اضافه کنید. ( i6879f )
  • ویجت ذره بین هنگام کشیدن دسته های انتخاب در یک SelectionContainer نشان می دهد. ( I30B38 ، b/139320979 )

رفع اشکال

  • دسته مکان نما TextField را برطرف می کند که هنگام حرکت از دید پنهان نمی شود. ( I14552 ، b/208883748 )

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

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

نسخه 1.1

نسخه 1.1.1

23 فوریه 2022

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

رفع اشکال

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

نسخه 1.1.0

9 فوریه 2022

androidx.compose.foundation:foundation:1.1.0 و androidx.compose.foundation:foundation-layout:1.1.0 منتشر می شود. نسخه 1.1.0 حاوی این commit ها است.

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

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

نسخه 1.1.0-rc03

26 ژانویه 2022

androidx.compose.foundation:foundation:1.1.0-rc03 و androidx.compose.foundation:foundation-layout:1.1.0-rc03 منتشر می شوند. نسخه 1.1.0-rc03 حاوی این commit ها است.

رفع اشکال

  • برای پشتیبانی از ترکیب مواد 1.1.0-RC03 به روز شده است

نسخه 1.1.0-rc01

15 دسامبر 2021

androidx.compose.foundation:foundation:1.1.0-rc01 و androidx.compose.foundation:foundation-layout:1.1.0-rc01 منتشر می شود. نسخه 1.1.0-rc01 حاوی این commit ها است.

رفع اشکال

  • اکنون مجاز است که جبران های منفی پیمایش را به LazyListState.scrollToItem() و LazyListState.animateScrollToItem() منتقل کنید. ( ICEB90 ، B/184252837 )
  • رفع اشکالی که باعث از دست دادن اقدامات پیمایش قابل دسترسی ( I7CBFB ) شد

نسخه 1.1.0-beta04

1 دسامبر 2021

androidx.compose.foundation:foundation:1.1.0-beta04 و androidx.compose.foundation:foundation-layout:1.1.0-beta04 منتشر می شود. نسخه 1.1.0-beta04 حاوی این تعهدات است.

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

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

تغییرات API

  • پاکسازی قابلیت تهی در androidx.core.view ( i7078a ، b/204917439 )
  • API های آزمایشی اضافه شده است که اجازه می دهد PointerinputChange را به عنوان یک کل مصرف کند یا بررسی کند که آیا مصرف شده است یا نه. ( i2e59d )
  • هنگام کشیدن مکان نما یا دسته های انتخابی در قسمت های متن ، ویجت ذره بین را نشان دهید. ( i5391e ، b/203781358 )

رفع اشکال

  • هنگام تغییر دید IME ، دستگیره های متن را برطرف نمی کنند. ( i25f2e )

نسخه 1.1.0-beta03

17 نوامبر 2021

androidx.compose.foundation:foundation:1.1.0-beta03 و androidx.compose.foundation:foundation-layout:1.1.0-beta03 منتشر می شوند. نسخه 1.1.0-beta03 حاوی این تعهدات است.

تغییرات API

  • پشتیبانی از دهانه های افقی به LazyverticalGrid اضافه شد. ( i7e2fa ، b/176758183 )
  • توانایی تجربی برای تحریک لیست های تنبل موقعیت های موردی اضافه شد. یک اصلاح کننده جدید در LazyItemScope به نام Modifier.animateItemPlacement() . مثال استفاده:

      var list by remember { mutableStateOf(listOf("A", "B", "C")) }
      LazyColumn {
          item {
              Button(onClick = { list = list.shuffled() }) {
                  Text("Shuffle")
              }
          }
          items(list, key = { it }) {
              Text("Item $it", Modifier.animateItemPlacement())
          }
      }
    
    • هنگامی که یک کلید را از طریق LazyListScope.item یا LazyListScope.items ارائه می دهید. این اصلاح کننده انیمیشن های مرتب سازی مورد را فعال می کند. گذشته از تغییر مجدد موارد ، سایر تغییرات موقعیت دیگر ناشی از وقایع مانند ترتیب یا تغییر تراز نیز متحرک خواهد بود. ( i59e7b ، b/150812265 )

نسخه 1.1.0-beta02

3 نوامبر 2021

androidx.compose.foundation:foundation:1.1.0-beta02 و androidx.compose.foundation:foundation-layout:1.1.0-beta02 منتشر می شوند. نسخه 1.1.0-beta02 حاوی این تعهدات است.

رفع اشکال

  • موج و سایر نشانه ها اکنون فقط در صورتی که در داخل یک Modifier.scrollable() قرار داشته باشند ، به تأخیر می افتد. به جای اینکه همیشه برای یک رویداد پایین تأخیر داشته باشید. ( IBEFE0 ، B/203141462 )
  • اضافه شده API BringIntoview API که به شما امکان می دهد یک درخواست را به والدین ارسال کنید تا آنها بتوانند یک مورد را مشاهده کنند ( IB918D ، B/195353459 )

مشارکت خارجی

  • اضافه شده Modifier.pointerHoverIcon ( I95F01 )

نسخه 1.1.0-beta01

27 اکتبر 2021

androidx.compose.foundation:foundation:1.1.0-beta01 و androidx.compose.foundation:foundation-layout:1.1.0-beta01 منتشر می شوند. نسخه 1.1.0-beta01 حاوی این تعهدات است.

رفع اشکال

  • اضافه شده API BringIntoview API که به شما امکان می دهد یک درخواست را به والدین ارسال کنید تا آنها بتوانند یک مورد را مشاهده کنند ( IB918D ، B/195353459 )

نسخه 1.1.0-alpha06

13 اکتبر 2021

androidx.compose.foundation:foundation:1.1.0-alpha06 and androidx.compose.foundation:foundation-layout:1.1.0-alpha06 منتشر می شود. نسخه 1.1.0-alpha06 حاوی این commit ها است.

تغییرات API

  • اضافه بار کم کودک برای چیدمان با بهره وری بهبود یافته اضافه شد ( IB0D9A )
  • SemanticsNodeInteraction.performSemanticsAction اکنون SemanticsNodeInteraction که در آن عملکرد نامیده می شود ، برمی گرداند. ( i9e5db )
  • اضافه شده performScrollToNode(matcher: SemanticsMatcher) که یک ظرف قابل پیمایش را به محتوایی که با مطابقت داده شده مطابقت دارد ، پیمایش می کند. ( IC1CB8 )

نسخه 1.1.0-alpha05

29 سپتامبر 2021

androidx.compose.foundation:foundation:1.1.0-alpha05 foundation:1.1.0-alpha05 و androidx.compose.foundation:foundation-layout:1.1.0-alpha05 منتشر می شود. نسخه 1.1.0-alpha05 حاوی این commit ها است.

تغییرات API

رفع اشکال

  • پشتیبانی قابل دسترسی ثابت برای پیمایش (هر دو تنبل و غیر تنبل) با توجه به پیمایش ( I6CDB0 )

نسخه 1.1.0-alpha04

15 سپتامبر 2021

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

تغییرات API

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

رفع اشکال

  • پشتیبانی از فشار بیش از حد کشش در دستگاه های Android 12 اضافه شده است. ( ICCF3C ، B/171682480 )

نسخه 1.1.0-alpha03

1 سپتامبر 2021

androidx.compose.foundation:foundation:1.1.0-alpha03 و androidx.compose.foundation:foundation-layout:1.1.0-alpha03 منتشر می شوند. نسخه 1.1.0-alpha03 حاوی این commit ها است.

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

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

تغییرات API

  • اثر درخشش برای پیمایش اضافه شده است. API بیش از حد پیکربری بیش از حد تجربی اضافه شده است تا پیکربندی اثر بصری Overscroll را فراهم کند. برای خاموش کردن اثر Overscroll NULL فراهم کنید. ( I0C304 ، B/171682480 )
  • AwaitPointereVentscope اکنون با Timeout () و WithItornull () ( I507F0 ، B/179239764 ، B/182397793 )
  • روش تست اضافه شده برای به دست آوردن مرزهای بریده شده. ( i6b28e )
  • حداقل اندازه هدف لمسی اضافه شده برای مشاهده پیکربندی برای استفاده در معناشناسی و ورودی اشاره گر برای اطمینان از دسترسی. ( IE861C )

نسخه 1.1.0-alpha02

18 آگوست 2021

androidx.compose.foundation:foundation:1.1.0-alpha02 و androidx.compose.foundation:foundation-layout:1.1.0-alpha02 منتشر می شود. نسخه 1.1.0-alpha02 حاوی این commit ها است.

تغییرات API

  • نسخه های dpsize اضافه شده برای Modifier.size اندازه و requiredSize ( i3fc7e ، b/194219828 )

نسخه 1.1.0-alpha01

4 آگوست 2021

androidx.compose.foundation:foundation:1.1.0-alpha01 و androidx.compose.foundation:foundation-layout:1.1.0-alpha01 منتشر می شود. نسخه 1.1.0-alpha01 حاوی این commit ها است.

تغییرات API

  • به روز شده DrawScope#drawImage که برای مصرف یک پارامتر اختیاری FilterQuality ، منبع و مقصد را مصرف می کند. این برای هنر پیکسل مفید است که در نظر گرفته شده است که هنگام مقیاس برای هنر پیکسل ، پیکسل می شود. Bitmappainter به روز شده + تصویر قابل استفاده برای مصرف یک پارامتر FilterQuality اختیاری ( IE4FB0 ، B/180311607 )
  • TextField اکنون هنگام فشار دادن دکمه برگشت ، انتخاب را پاک می کند ، که مطابق با رفتار Android edittext است. ( i3ca16 ، b/174173645 )
  • دسته مکان نما را اضافه کنید. ( I07A82 ، B/173016579 )

رفع اشکال

  • پیمایش از طریق اقدامات معنایی برای لیست های تنبل و اجزای پیمایش منظم اکنون متحرک است ( ID9066 ، b/190742024 )

مشارکت خارجی

  • LazyVerticalGrid اکنون پارامترهای آرایش افقی و عمودی را می پذیرد. ( IF9C92 )

نسخه 1.0

نسخه 1.0.5

3 نوامبر 2021

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

رفع اشکال

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

نسخه 1.0.4

13 اکتبر 2021

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

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

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

نسخه 1.0.3

29 سپتامبر 2021

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

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

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

نسخه 1.0.2

1 سپتامبر 2021

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

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

نسخه 1.0.1

4 آگوست 2021

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

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

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

نسخه 1.0.0

28 ژوئیه 2021

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

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

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

مسائل شناخته شده

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

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

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

نسخه 1.0.0-RC02

14 جولای 2021

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

  • ارائه مرزی به روز شده برای اشکال عمومی برای پرداختن به مسائل با مسیرهای تعریف شده با ابعاد ثابت. ( AOSP/1748871 ، b/191817116 )

نسخه 1.0.0-rc01

1 ژوئیه 2021

androidx.compose.foundation:foundation:1.0.0-rc01 و androidx.compose.foundation:foundation-layout:1.0.0-rc01 منتشر می شوند. نسخه 1.0.0-rc01 حاوی این commit ها است.

تغییرات API

  • Canvas اکنون برای دسترسی از یک پارامتر ContentDescription پشتیبانی می کند. ( IB547C )

رفع اشکال

  • دکمه غیرفعال ، کارت ، کادر چک و کل Modifier.clickable(enabled=false) کلیک های خود را از رفتن به والدین مسدود می کند. ( IC2C3B ، B/183908811 )

نسخه 1.0.0-beta09

16 ژوئن 2021

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

تغییرات API

  • ManualFrameClock حذف کرد. اگر نیاز به کنترل انیمیشن ها دارید ، به جای آن از composeTestRule.mainClock استفاده کنید. ( i3c3e8 ، b/189951065 )
  • تغییر نقش enum و liveregionmode به کلاس های درون خطی با سازنده خصوصی ( ID1890 )
  • کیبورد کپیتال سازی به کلاس درون خطی تبدیل می شود. ( id5a1c )
  • TextOverflow به یک کلاس درون خطی تغییر می یابد. ( i433af )

رفع اشکال

  • اکنون وقتی کلیدهای منحصر به فرد برای موارد LazyColumn/Row را مشخص می کنید ، موقعیت پیمایش بر اساس کلید حفظ می شود ، این بدان معناست که اگر مواردی را قبل از مورد قابل مشاهده فعلی اضافه یا حذف کنید ، مورد با کلید داده شده به عنوان اولین مورد قابل مشاهده نگه داشته می شود. . ( id263f ، b/184257857 )
  • ثابت های کلیدی در حال حاضر ExperimentAlcomposeUIAPI هستند. مصرف کد می تواند ثابت های خصوصی را قبل از تثبیت اعلام کند. ( IA5D48 )
  • IdlingStrategy را به AndroidComposeteSture اضافه کرد که می تواند با آزمایش چارچوب ها برای نصب یک مکانیسم جایگزین برای انتظار یا دستیابی به سؤالات استفاده شود. قبل از شروع تست شما برای نصب استراتژی خود ، از AndroidComposeTestRule.setIdlingStrategyFactory() استفاده کنید. ( i608fa )

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

این چگونه کار می کند؟

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

نسخه 1.0.0-beta08

2 ژوئن 2021

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

تغییرات API

  • Nestedscrollsource Enum با یک کلاس درون خطی جایگزین می شود. ( IE321B ، B/187055290 )
  • استفاده از enum در کلاسهای درون خطی برای جلوگیری از مشکلات با جامع هنگام افزودن مقادیر جدید enum ، استفاده می شود. ( i2b5eb )
  • برای جلوگیری از نشان دادن موج در حین پیمایش / کشیدن ، یک TAP TIMOUT را به قابل کلیک / toggleable اضافه می کند ( IA2704 ، B / 168524931 )
  • ویژگی های DDESCRIPTION و متن متن دیگر مقادیر واحد نیستند بلکه لیست ها هستند. این امکان را برای ادغام آنها به جای همخوانی فراهم می کند. همچنین API های آزمایش بهتری را برای استفاده از این تغییرات ارائه داد ( ICA6BF ، B/184825850 )
  • Modifier.focusModifier() توسط Modifier.focusTarget() کاهش می یابد و جایگزین می شود .
  • enum keyboardType با یک کلاس درون خطی جایگزین می شود. ( I73045 ، b/187055290 )
  • Enum جایگزین FocusState با یک رابط FocusState ( ICCC1A ، B/187055290 )
  • Enum Imeaction با یک کلاس درون خط جایگزین می شود. ( i18be5 ، b/187055290 )
  • توابع AnnotatedString.withAnnotation اکنون به جای ExperimentalComposeApi آزمایشی هستند. ( i0cd0a )
    • سازنده TextUnit با TextUnittype اکنون به جای ExperimentalComposeapi آزمایشی است.
  • PaddingValues ​​اکنون به جای @Immutable ( i88c50 ) @Stable است

رفع اشکال

  • تصادفات طولانی را در متن غیر خالی فشار دهید. ( I33AB5 ، b/187437299 )
  • نمایش نوار ابزار بعد از Selectall ( I495D9 ، B/185919613 )
  • ظروف قابل پیمایش را برطرف کنید و فرزندان خود را در محور متقاطع بریزید. اگر یک لازیرو با وسایل کارت داشته باشید ، به راحتی قابل تکرار بود. اکنون سایه قطع نمی شود. ( ICB635 ، b/186318448 )
  • مسئله ای را برطرف کرد که در آن موج / نشانه های دیگر گاهی اوقات هنگام استفاده از اصلاح کننده ، با کلیک طولانی گیر می شود .
  • اکنون detectDragGesures ، detectVerticalGestures و detectHorizontalGestures تغییر موقعیت را به صورت خودکار مصرف می کنند ، بدون نیاز به تماس با تغییر .
  • Modifier.onGloballyPositioned() برای گزارش مختصات این اصلاح کننده در زنجیره اصلاح کننده تغییر یافت ، نه مختصات طرح پس از استفاده از همه اصلاح کننده ها. این بدان معناست که اکنون ترتیب اصلاح کننده ها بر آنچه مختصات گزارش می شود تأثیر می گذارد. ( IEB67D ، B/177926591 )

نسخه 1.0.0-beta07

18 مه 2021

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

تغییرات API

  • منطق پیش بینی کننده مورد قابل مشاهده بعدی برای LazyColumn/Row معرفی شده است ( i8a4bc ، b/184940225 )
  • دسته انتخاب کلیپ اضافه شده ( IFF80D ، B/183408447 )

رفع اشکال

  • LazyColumn/Row اکنون حداکثر 2 مورد قبلاً قابل مشاهده را فعال (دفع نمی شود) حتی اگر قبلاً آنها را پیمایش کنید. این امر به مؤلفه اجازه می دهد تا از زیر مجموعه های فعال استفاده مجدد کند ، هنگامی که ما نیاز به تهیه یک مورد جدید داریم که عملکرد پیمایش را بهبود می بخشد. ( IE5555 )
  • زمین بازگرداندن را بردارید. ( i38660 )
  • پس زمینه انتخاب را با استفاده از DrawScope بکشید. ( i73c61 ، b/186674472 )
  • رگرسیون BETA06 که بر ردیف/ستون تأثیر می گذارد با استفاده از ترتیبات فاصله برای کودکان وزنه برداری ، ثابت شد. ( IFAF8C ، B/187326588 )

نسخه 1.0.0-beta06

5 مه 2021

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

تغییرات API

  • حل تعارض با ژست ناوبری ( I1145E )
  • اضافه شده API های دسترسی به مجموعه CollectionInfo و CollectionItemInfo که به شما امکان می دهد جمع آوری و موارد آن را برای خدمات دسترسی نشان دهید ( ID54EF ، B/180479017 )
  • اضافه شده SemanticsActions.ScrollToIndex برای پیمایش لیستی با موارد ایندکس شده به مورد با یک شاخص خاص ، و SemanticsProperties.IndexForKey برای دریافت شاخص یک مورد در لیست با موارد کلید. هر دو عمل توسط Lazylist انجام می شود.
    • اضافه شده SemanticsNodeInteraction.performScrollToIndex که لیستی را به فهرست داده شده می پردازد ، و SemanticsNodeInteraction.performScrollToKey که با کلید داده شده لیستی را به آن می رساند. ( i4fe63 ، b/178483889 ، b/161584524 )
  • AnnotatedString save support to TextFieldValue.Saver. Added addTtsAnnotation and withAnnotation utility functions to AnnotatedString.Builder ( I8cbdc , b/178446304 )
  • Default 0.dp parameter values were added to PaddingValues(horizontal, vertical) ( I05571 , b/181336792 )

رفع اشکال

  • Row & Column children with weight(fill = false) are no longer making the parent fill the entire available main axis space. ( Ied94d , b/186012444 , b/184355105 )

Version 1.0.0-beta05

21 آوریل 2021

androidx.compose.foundation:foundation:1.0.0-beta05 and androidx.compose.foundation:foundation-layout:1.0.0-beta05 are released. Version 1.0.0-beta05 contains these commits.

تغییرات API

  • FlingBehavior interface is now marked as @Stable. All implementations should comply with the @Stable contract. ( I93354 , b/184830577 )

رفع اشکال

  • Fixed ACTION_SCROLL_FORWARD , ACTION_SCROLL_BACKWARD , accessibilityActionScrollLeft , accessibilityActionScrollUp , accessibilityActionScrollRight and accessibilityActionScrollDown accessibility scroll actions. Instead of scrolling to the end of the scrollable, it will now scroll by one screen in the given direction. ( Ieccb0 )
  • The AndroidManifest files from ui-test-manifest and ui-tooling-data are now compatible with Android 12 ( I6f9de , b/184718994 )

نسخه 1.0.0-beta04

7 آوریل 2021

androidx.compose.foundation:foundation:1.0.0-beta04 and androidx.compose.foundation:foundation-layout:1.0.0-beta04 are released. Version 1.0.0-beta04 contains these commits.

تغییرات API

  • Rename hideSoftwareKeyboard and showSoftwareKeyboard on SoftwareKeyboardController to hide() and show() respectively.
    • Provide the full CompositionLocal interface for LocalSoftwareKeyboardController, allowing it to be set (especially useful in tests) ( I579a6 )
  • TextOverflow.Visible is introduced. ( Ic8f89 )
  • Public instances of RowScope , ColumnScope , BoxScope , BoxWithConstraintsScope were removed. ( I4e83e , b/181869067 )

رفع اشکال

  • Fixed the issue when items of LazyColumn / LazyRow located on the edges were incorrectly positioned after fast fling ( Ie4d13 , b/183877420 )
  • Prior to this change, local composable functions were skippable based on their parameters. After this change, no local composable functions will skip. This change is done because it is common and expected for local functions to capture parameters from the parent and them skipping is a common source of bugs.

    To summarize, consider the example:

    @Composable fun Counter(count: Int, onCountChange: (Int) -> Unit) {
      @Composable fun ShowCount() { Text("Count: $count") }
      ShowCount()
      Button(onClick={ onCountChange(count + 1) }) {
        Text("Increment")
      }
    }
    

    Prior to this change, the ShowCount composable function would always skip, even after the count parameter was updated. این دیگر اینطور نیست. ( I5648a )

نسخه 1.0.0-beta03

24 مارس 2021

androidx.compose.foundation:foundation:1.0.0-beta03 and androidx.compose.foundation:foundation-layout:1.0.0-beta03 are released. Version 1.0.0-beta03 contains these commits.

تغییرات API

  • DefaultMonotonicFrameClock is deprecated. Calling withFrameNanos or Recomposer.runRecomposeAndApplyChanges with no MonotonicFrameClock will now throw IllegalStateException . ( I4eb0d )

رفع اشکال

  • FlingBehavior.performFling() is now called even when velocity is 0 ( I0b6e5 , b/181237123 )

نسخه 1.0.0-beta02

10 مارس 2021

androidx.compose.foundation:foundation:1.0.0-beta02 and androidx.compose.foundation:foundation-layout:1.0.0-beta02 are released. نسخه 1.0.0-beta02 حاوی این تعهدات است.

تغییرات API

  • Multiple small optimizations in LazyColumn measuring logic were added ( Ic6889 )
  • Added new LocalSoftwareKeyboardController composition local API to replace previous SoftwareKeyboardController interface on TextField. ( I5951e , b/168778053 )
  • Added new LocalSoftwareKeyboardController composition local API to replace previous SoftwareKeyboardController interface on TextField. ( I84472 , b/168778053 )

رفع اشکال

نسخه 1.0.0-beta01

24 فوریه 2021

androidx.compose.foundation:foundation:1.0.0-beta01 and androidx.compose.foundation:foundation-layout:1.0.0-beta01 are released. نسخه 1.0.0-beta01 حاوی این تعهدات است.

This is the first release of Compose 1.0.0 Beta.

تغییرات API

  • onStart callback has been added to detectDragGestures ( I67269 , b/179995594 )
  • Modifiers for sizing to intrinsics are no longer experimental. ( I15744 )
  • Removed dp assertions ( I798d2 )
  • Removed SoftwareKeyboardController callback from all text fields to be replaced by a new API shortly. ( Iae869 , b/168778053 )
  • MeasureBlocks was renamed to MeasurePolicy which became a fun interface. Layout APIs were updated / simplified to use MeasurePolicy. ( Icab48 , b/167662468 , b/156751158 )
  • InteractionState has been replaced with [Mutable]InteractionSource
    • Interfaces are responsible for emitting / collecting Interaction events.
    • Instead of passing interactionState = remember { InteractionState() } to components such as Button and Modifier.clickable() , use interactionSource = remember { MutableInteractionSource() } .
    • Instead of: Interaction.Pressed in interactionState you should instead use the extension functions on InteractionSource, such as InteractionSource.collectIsPressedAsState().
    • For complex use cases you can use InteractionSource.interactions to observe the stream of Interactions. See the InteractionSource documentation and samples for more information.
    • ( I85965 , b/152525426 , b/171913923 , b/171710801 , b/174852378 )
  • Removed deprecated LayoutCoordinates methods, use function instead of the property for positionInParent and boundsInParent ( I580ed , b/169874631 , b/175142755 )
  • Created new TextInputSession for input sessions from low level text components such as CoreTextField. ( I8817f , b/177662148 )
  • Placeable now exposes measuredSize, representing the size which the child layout actually measured to. This size might not respect the measurement constraints. ( Ib2729 , b/172560206 , b/172338608 )
  • Add selectionGroup modifier that allows to mark collection of Tabs or RadioButtons for accessibility purposes ( Ie5c29 )
  • Add LazyListState.animateScrollToItem

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

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

  • Modifier.zoomable has been replaced my Modifier.transformable. smoothPanBy, smoothRotationBy have been added as a functionality. ( Ifc32b , b/175294473 )

  • The defaultFactory for compositionLocalOf and staticCompositionLocalOf is now required instead of optional.

    This changes removes a potential type error for non-nullable types where no default factory was provided. Previously this would provide a null reference for a non-nullable type.

    For nullable types consider supplying { null } as the default factory.

    We do not recommend using locals with non-nullable types unless a sensible default can be provided. If no sensible default exists, the defaultFactory lambda should throw an exception. However throwing an exception means that consumers of the local will have an implicit dependency on it being provided that is not enforced by the type system. ( Ifbd2a )

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

  • Text actions now check focus automatically ( I13777 , b/179648629 )

  • Removed runBlockingWithManualClock ( I15cdc , b/179664814 )

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

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

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

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

  • defaultMinSizeConstraints was renamed to defaultMinSize. ( I4eaae )

  • Modifier.tapGestureFilter has been removed. Use Modifier.pointerInput { detectTapGestures(...) } instead. ( I266ed , b/175294473 )

  • partial consumption was removed from pointer input system. The recommended way of coordinating partial consumtion is Modifier.nestedScroll. ( Ie9c9b )

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

  • AnimationClockObservable and subclasses have been removed. AnimatedFloat has been removed. ( Icde52 , b/177457083 )

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

  • Providers has been renamed to CompositionLocalProvider

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

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

  • requiredWidth(IntrinsicSize) and requiredHeight(IntrinsicSize) modifiers were added for required sizing to intrinsic sizes. ( I0a6b4 )

  • Deprecated emptyContent() is removed. Use {} instead. ( Idb33f , b/179432510 )

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

رفع اشکال

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

نسخه 1.0.0-alpha12

10 فوریه 2021

androidx.compose.foundation:foundation:1.0.0-alpha12 and androidx.compose.foundation:foundation-layout:1.0.0-alpha12 are released. نسخه 1.0.0-alpha12 حاوی این commit ها است.

تغییرات API

  • Modifier.pointerInput now requires remember keys to indicate when the pointer input detection coroutine should restart for new dependencies. ( I849cd )
  • Testing update: hasText() will check for both input and label/hint/placeholder texts in the text field ( Iab803 )
  • PaddingValues.Absolute was added and can be used in APIs accepting PaddingValues. ( Ia5f30 )
  • onImeActionPerformed is deprecated. use KeyboardActions instead ( If0bbd , b/179071523 )
  • In order to better match naming conventions with ImageBitmap and ImageVector, ImagePainter has been renamed to BitmapPainter to parallel VectorPainter. ( Iba381 , b/174565889 )
  • Better substring test APIs with substring now as an argument ( Icbe78 )
  • Introduced an InfiniteAnimationPolicy coroutine context element that will be applied in infinite animations. By default no policy is installed, except when running tests with ComposeTestRule . ( I50ec4 , b/151940543 )
  • Animatable.snapTo and Animatable.stop are now suspend functions ( If4288 )
  • ComponentActivity.setContent has moved to androidx.activity.compose.setContent in the androidx.activity:activity-compose module. ( Icf416 )
  • Destructuring and copy() methods have been removed from several classes where they were rarely used. ( I26702 , b/178659281 )
  • Custom keys support for LazyColumn/LazyRow was added. This allows us to smarter handle items reordering. So the state you stored in remember {} blocks will move together with the item when you reorder elements or removed the item from the middle.

    LazyColumn {
        items(users, key = { user -> user.id }) { ... }
    }
    
  • Changed Indication#createInstance to be @Composable, and changed LocalIndication to contain an Indication, not () -> Indication. ( I5eeea , b/157150564 )

  • Constraints.enforce was replaced with Constraints.constrain . ( I8b8ea )

  • loadFontResource is deprecated. Use fontResource instead. imageResource, loadImageResource, vectorResource, and loadVectorResource are deprecated. Use painterResource instead. ( I6b809 )

  • For performance reasons, ScrollAxisRange semantics now takes lambdas returning Floats instead of direct Float values. ( If4a35 , b/178657186 )

  • Added EditableText semantics to mark editable input text of the text field for accessibility and corresponding test methods to check the semantics ( I8e07a )

  • Modifier.clickable now doesn't have double and long click support. Use Modifier.combinedClickable to achieve this functionality. ( Iafad1 )

  • toIntPx() was renamed to roundToPx(). ( I9b7e4 , b/173502290 )

  • IntBounds was renamed to IntRect and the API was improved. ( I1f6ff )

  • Modifier.dragGestureFilter has been deprecated. Use Modifier.pointerInput { detectDragGestures (...)} instead. Alternatively, use Modifier.draggable for one axis drags ( I0ba93 , b/175294473 )

  • Renamed Ambients to match the Ambient -> CompositionLocal rename. Ambients used to be named AmbientFoo, now CompositionLocals are named LocalFoo. ( I2d55d )

  • Selection was moved to foundation. ( I7892b )

  • Similarly to how we previously removed state { 0 } composable and now promote usage like remember { mutableStateOf(0) } we are going to remove savedInstanceState { 0 } composable. You should use rememberSaveable { mutableStateOf(0) } instead and it will save and restore automatically if the type used inside the MutableState can be stored in the Bundle. If previously you were passing a custom saver object now you need to use a new overload of rememberSaveable which has the stateSaver parameter. The usage will look like this: val holder = rememberSaveable(stateSaver = HolderSaver) { mutableStateOf(Holder(0)) } ( Ib4c26 , b/177338004 )

  • Added password semantics for accessibility ( I231ce )

  • Added ProgressBarRangeInfo.Indeterminate to mark indeterminate progress bars for accessibility ( I6fe05 )

  • Playtime in animation is now unfiied to nanoseconds ( If776a )

  • @ComposableContract has been deprecated in favor of three more specific annotations.

    @ComposableContract(restartable = false) has become @NonRestartableComposable @ComposableContract(readonly = true) has become @ReadOnlyComposable @ComposableContract(preventCapture = true) has become @DisallowComposableCalls @ComposableContract(tracked = true) has been removed. ( I60a9d )

  • emptyContent() and (@Composable () -> Unit).orEmpty() utilities have been deprecated as they no longer have any positive performance impact or value ( I0484d )

  • Recomposers can now be closed. Closed recomposers will continue recomposition until composition child coroutines complete. Recomposer.shutDown renamed to cancel to contrast with close. ( Ib6d76 )

  • APIs related to LazyVerticalGrid are marked as experimental ( Ia53e3 , b/178519862 )

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

  • RestorableStateHolder was renamed to SaveableStateHolder and moved to androidx.compose.runtime.saveable package. Inner method RestorableStateProvider was renamed to SaveableStateProvider. Generic type was removed so you can just pass Any as a key. Experimental annotation is not needed anymore. ( I0902e , b/174598702 )

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

  • Artefact androidx:compose:runtime:runtime-saved-instance-state was renamed to androidx:compose:runtime:runtime-saveable ( I6dcac )

  • Many longstanding deprecated APIs in the ui package are deleted. ( I2f2dc )

  • The compose:runtime-dispatch artifact is now deprecated. MonotonicFrameClock can now be found in compose:runtime and AndroidUiDispatcher can be found in compose:ui. ( Ib5c36 )

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

  • canDrag has been removed from the Modifier.scrollable. ( Id66e7 , b/175294473 )

  • The API the Compose compiler plugin targets has been refactored to use an interface instead of a concrete class. The interface also no longer uses a type parameter.

    This is an internal change that should not effect source code compatibility but is a binary breaking change. ( I3b922 , b/169406779 )

  • Modifier.scaleGestureFilter has been removed. Use Modifier.zoomable instead. Alternatively, use Modifier.pointerInput { detectMultitouchGestures { ... }} ( Id5da1 , b/175294473 )

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

    • Removed CoreText and CoreTextField from public API
    • Removed deprecated SelectionContainer overload ( I99c19 )
  • Remove deprecated non-suspend scrolling functions Continuing with the changes from last release, the non-suspend scrolling functions are now removed entirely. Please convert to the suspend functions with the same names. A coroutine scope can be obtained via rememberCoroutineScope(). ( I3d39c , b/178169563 )

  • androidx.compose.foundation.layout.ConstraintLayout was deprecated in favor of androidx.constraintlayout.compose.ConstraintLayout. You will need to add a dependency on androidx.constraintlayout:constraintlayout-compose:1.0.0-alpha01 . ( I87adc )

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

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

  • Recomposer.runningRecomposers now offers a global StateFlow of read-only RecomposerInfo for observing ongoing composition state in the process. Prefer this API to Recomposer.current(), which is now deprecated. ( If8ebe )

نسخه 1.0.0-alpha11

28 ژانویه 2021

androidx.compose.foundation:foundation:1.0.0-alpha11 and androidx.compose.foundation:foundation-layout:1.0.0-alpha11 are released. نسخه 1.0.0-alpha11 حاوی این commit ها است.

تغییرات API

  • Deprecate non-suspend scrollBy, remove non-suspend scrollTo

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

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

  • Content description parameter has been added to the Image and Icon. It is used to provide description to the accessibility services ( I2ac4c )

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

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

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

  • Removed data class from the following classes:

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

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

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

  • The deprecated AbsoluteArrangement was removed. ( Iffa96 , b/177641870 )

  • The propagateMinConstraints parameter was added to Box, for specifying whether the incoming min constraints should be passed to the content of the Box or not. پیش فرض نادرست است. ( I0125b , b/152613457 )

رفع اشکال

  • onCommit, onDispose, and onActive have been deprecated in favor of SideEffect and DisposableEffect APIs ( If760e )
  • WithConstraints was reworked as BoxWithConstraints and moved to foundation.layout. ( I9420b , b/173387208 )
  • Changes to factory functions for Font/FontFamily/Typeface

    • Added factory functions that start with capital letter
    • Deprecated previous factory functions with lowercase first letters
    • New factory functions return the FontFamily instead of subclasses
    • Hid constructors of the subclasses, so that they can only be constructed via factory functions.
    • Renamed Font.asFontFamily to Font.toFontFamily
    • ( I42aa7 )
  • Introduced ComposeContentTestRule , which extends ComposeTestRule and defines setContent , which has been removed from ComposeTestRule . Added a factory method createEmptyComposeRule() that returns a ComposeTestRule and does not launch an Activity for you. Use this when you want to launch your Activity during your test, eg using ActivityScenario.launch ( I9d782 , b/174472899 )

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

  • Density is now receiver scope for Arrangement interfaces. ( I18aad )

  • TextFieldValue accepts AnnotatedString. However this is an API only change and multi-style text editing is not implemented yet.

    • Removed initial from EditingBuffer constructor parameters. ( I326d5 )
  • invalidate and compositionReference() are now deprecated in favor of currentRecomposeScope and rememberCompositionReference respectively. ( I583a8 )

  • AnnotatedString is changed to extend from kotlin.CharSequence. Therefore length and subSequence are now instance functions, and extension functions are removed. ( Iaf429 )

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

  • RememberObserver replaces CompositionLifecycleObserver and CompositionLifecycleObserver is now deprecated.

    RememberObserver is a replacement for CompositionLifecycleObserver with modified semantics and renamed methods. Changing to the new API can be done mechanically for objects that are only remembered once which is, and continues to be, the recommended practice. However, if a reference was remembered more than once in a composition onRemembered is called for each reference where onEnter is only called once. onEnter was called multiple time if the object was used in subcompositions, such as WithConstraints and Scaffold making the single onEnter call guarantee unreliable and it was removed for RememberObserver .

    RememberObserver adds onAbandoned which is called if the RememberObserver instance is returned from the callback passed to remember but was not remembered in the composition state and, therefore, will never have onRemembered called. This can occur if an exception terminates composition before completing or the composition is discarded because the state is was producing a composition for is no longer current or otherwise is no longer needed. If the instance of RememberObserver following the single reference recommendation above is tracking an external resource both onForgotten and onAbandoned each indicate that the resource is no longer needed. If the object is tracking work started or resources allocated in onRemembered , onAbandoned can be ignored as it will not be called if onRemembered is called. ( I02c36 )

  • Renamed TransformedText.transformedText to TransformedText.text

    • TransformedText is no longer a data class ( Ie672a )
  • The following classes are not data classes anymore:

    • AnnotatedString
    • ParagraphStyle
    • SpanStyle
    • TextStyle
    • FontWeight
    • TextDecoration
    • TextGeometricTransform
    • TextIndex
    • TextLayoutResult
    • TextLayoutInput ( Iaff99 )
  • Removed experimental monotonicFrameAnimationClockOf methods ( Ib753f , b/170708374 )

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

  • Please use ImeAction.None instead of ImeAction.NoAction

    • Please use ImeAction.Default instead of ImeAction.Unspecified ( Ie1bcc )
  • FocusRequester.createRefs is now marked as experimental as it might change. ( I2d898 , b/177000821 )

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

  • Changed VisualTransformation to be a functional interface ( I3bba4 )

  • Leverage TestCoroutineDispatcher in testing ( I532b6 )

  • Removed PointerInputData and modified PointerInputChange to give it all of PointerInputData's fields. Made PointerInputEvent and PointerInputEventData internal because they aren't used in any public API. ( Ifff97 , b/175142755 )

  • Renamed TextInputService.onStateUpdated as updateState ( Id4853 )

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

نسخه 1.0.0-alpha10

13 ژانویه 2021

androidx.compose.foundation:foundation:1.0.0-alpha10 and androidx.compose.foundation:foundation-layout:1.0.0-alpha10 are released. نسخه 1.0.0-alpha10 حاوی این commit ها است.

تغییرات API

  • ImeOptions and KeyboardOptions are no more a data class ( I3c898 , b/168684531 )
  • VisualTransformation API Changes
    • Renamed OffsetMap to OffsetMapping
    • Renamed OffsetMapping.identityOffsetMap to OffsetMapping.Identity
    • PasswordTransformation is no longer data-class
    • Moved OffsetMapping to its own file
    • ( I0bdf3 )
  • EditOperations API Changes
    • Renamed EditOperation as EditCommand
    • Added Command suffix for EditOperation concrete implementations
    • EditCommand's are no longer data classes
    • Renamed EditOperation.process function to applyTo
    • Renamed InputEventListener to InputEventCallback
    • ( I0a366 )
  • Modified Velocity to have component parts and mathematical operations. ( Ib0447 )
  • Renamed @ExperimentalTesting to @ExperimentalTestApi to be consistent with similar experimental api annotations ( Ia4502 , b/171464963 )
  • Added experimental stickyHeader method for LazyColumn/LazyRow ( I0a81d )
  • Ranamed Color.useOrElse() to Color.takeOrElse() ( Ifdcf5 )
  • Deprecated TestUiDispatcher. Use Dispatchers.Main instead ( Ic171f , b/175385255 )
  • Add Toggle to foundation Strings.kt ( I4a5b7 , b/172366489 )
  • Moved nativeClass to ui module and made it internal. Updated usages of nativeClass in equals implementations to use 'is MyClass' instead. ( I4f734 )
  • FlowRow and FlowColumn were deprecated. Please use a custom layout instead. ( I09027 )
  • Modifier.focus() and Modifier.focusRequester() are deprecated. Use Modifier.focusModifier() and Modifier.focusReference() instead. ( I75a48 , b/175160751 , b/175160532 , b/175077829 )
  • Introduced SelectionRegistrar.notifySelectableChange to notify Selectable updates to SelectionManager. ( I6ff30 , b/173215242 )
  • Changed fun Dp.isFinite() to a val Dp.isFinite ( I50e00 )
  • Constraints#satisfiedBy was renamed to isSatisfiedBy. ( I9cf5c )
  • Added isSpecified, isUnspecified, and useOrElse for inline classes with an Unspecified constant. ( I93f7b , b/174310811 )

رفع اشکال

  • New coroutine-based API Animatable that ensures mutual exclusiveness among its animations. New DecayAnimationSpec to support multi-dimensional decay animation ( I820f2 , b/168014930 )
  • Added support for disabled and read-only text fields ( I35279 , b/171040474 , b/166478534 )
  • animate() is now replaced with animateAsState() , which returns a State<T> instead of T . This allows better performance, as the invalidation scope can be narrowed down to where the State value is read. ( Ib179e )
  • Add Semantics role API and add Role as a parameter to clickable, selectable and toggleable SemanticsModifier. Changed Modifier.progressSemantics so that Slider can also use it. ( I216cd )
  • The native keyEvent can now be accessed through keyEvent.nativeKeyEvent ( I87c57 , b/173086397 )

نسخه 1.0.0-alpha09

16 دسامبر 2020

androidx.compose.foundation:foundation:1.0.0-alpha09 and androidx.compose.foundation:foundation-layout:1.0.0-alpha09 are released. نسخه 1.0.0-alpha09 حاوی این commit ها است.

تغییرات API

  • Add Scrollable interface

    This allows ScrollState and LazyListState to be treated as a common type, allowing custom scrolling to be implemented across both types.

    This also moves smoothScrollBy to an extension function on Scrollable, taking advantage of this functionality. ( I2153b )

  • LazyVerticalGrid is added. ( I17267 , b/162213211 )

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

  • For suspending pointer input APIs, renamed HandlePointerInputScope to AwaitPointerEventScope and handlePointerInput() to awaitPointerEventScope(). ( Idf0a1 , b/175142755 )

  • LazyListState.layoutInfo was added which exposes the list of sizes and offsets of the currently visible items ( If8678 , b/170472532 )

  • Removed ExperimentalPointerInput annotation ( Ia7a24 )

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

  • Add reverseLayout param for LazyColumn/Row. when true items will be composed from the bottom to the top and LazyListState.firstVisibleItemIndex == 0 will mean the first item is located at the bottom. ( I552ae , b/166589935 )

  • verticalArrangement param was added for LazyColumn. horizontalArrangement param was added for LazyRow. Arrangement allows us to add a spacing between items and specify the arrangement of the items when we do not have enough of them to fill the whole minimum size. ( Icf79a , b/170394300 )

  • detectMultitouchGestures now uses one callback with combined centroid, pan, zoom and rotate parameters. ( Ie6e1c )

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

رفع اشکال

  • Lambdas in offset modifiers now return IntOffset rather than Float. ( Ic9ee5 , b/174137212 , b/174146755 )
  • Removed SlotTable, SlotReader and SlotWriter from the public API. These were marked as InternalComposeAPI previously. Now they are internal to the compose module.

    CompositionData and CompositionGroup were added as a replacement for the ui-tooling API to use to extract composition information. These are public but are not intended for use outside the ui-tooling API as they provide the raw information the ui-tooling API interprets ( I31a9c )

  • Refactored ShaderBrush to lazily create a shader instance when sizing information of the drawing environment is available. This is useful to define gradients that occupy the full drawing bounds of a composable at composition time, without having to implement custom DrawModifier implementations.

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

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

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

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

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

  • Introduced several new functions in SelectionRegistrar and also renamed onPositionChange to notifyPositionChange. ( Ifbaf7 )

  • AndroidOwner made internal ( Ibcad0 , b/170296980 )

  • New infiniteRepeatable function for creating an InfiniteRepeatableSpec ( I668e5 )

  • The Applier interface has changed to simplify building trees bottom-up instead of top-down.

    The insert() method has been renamed to insertTopDown() .

    A new method, insertBottomUp() , was added.

    An applier either inserts nodes into the tree it is editing using insertTopDown() or insertBottomUp() depending on which performs better.

    Some trees, such as LayoutNode and View , are much more efficient to build bottom-up than top-down. Prior to this change, a stack of inserts was required to implement bottom-up which needed to be copied to every applier which needed bottom-up construction for performance. With this change an Applier overrides insertBottomUp() to build a tree bottom-up and insertTopDown() to build the tree top-down. ( Icbdc2 )

  • Added painterResource API to handle opaquely loading Painter objects from either rasterized asset formats (like PNGs) or VectorDrawables. Consumers no longer have to determine the type of asset in advance and can call this method to get a Painter object to use in Image composables or painter modifiers. ( I2c703 , b/173818471 )

  • Added buildAnnotatedString factory function in order to build an AnnotatedString. Deprecated annotatedString builder function. ( Idfe0b )

نسخه 1.0.0-alpha08

2 دسامبر 2020

androidx.compose.foundation:foundation:1.0.0-alpha08 and androidx.compose.foundation:foundation-layout:1.0.0-alpha08 are released. نسخه 1.0.0-alpha08 حاوی این commit ها است.

تغییرات API

  • Removed maxLines parameter from the CoreTextField . If you'd like to constraint the height of the text field by the number of lines, use BasicTextField instead. ( Iec002 )
  • Changed the await*TouchSlop() methods to not detect the pointer down and renamed them to *OrCancellation . Also removed the need for orientationLock parameter. ( Ie96e1 )
  • Added lint check for composable lambda parameter naming and position, to check for consistency with Compose guidelines. Also migrated some APIs using children as the name for their trailing lambda to content , according to the lint check and guidance. ( Iec48e )
  • foundation:foundation-text apis moved to foundation:foundation . The package structure remained the same ( Id3eb2 )
  • New multitouch gesture detector, including helpers for detecting rotation, zoom, and panning. ( Ic459d )
  • New drag gesture detector suspending pointer input API, including orientation locking. ( Icef25 )
  • Renamed VectorAsset to ImageVector Moved and renamed VectorAsset to Builder to be an inner class of ImageVector as per API council guidelines. Added typealias of VectorAssetBuilder to link to ImageVector.Builder for compat. ( Icfdc8 )
  • Renamed ImageAsset and related methods to ImageBitmap. ( Ia2d99 )
  • Moved foundation semantics properties to ui ( I6f05c )
  • Add coroutine-based scrolling APIs:

    Adds LazyListState.snapToItem and LazyListState.smoothScrollBy, as well as lower-level APIs for scroll control. These APIs provide a suspend interface to control scrolling that waits until the scroll is finished before returning. ( Ie5642 )

  • Added a singeLine parameter into BasicTextField, TextField and OutlinedTextField. Set this parameter to true to make the text field a single horizontally scrollable line. ( I57004 , b/168187755 )

  • Gesture detector for tap, double-tap, long press, and press indication were added using the new suspending pointer input. A few utilities were added as well, making it easier for developers to write their own gesture detectors. ( I00807 )

  • Modifier.focusable has need added in foundation. Use this to add focusable behavior to a component, with correct semantics and accessibility. ( I41eb9 , b/152525426 , b/162865824 )

  • Previously deprecated APIs have been removed: Border was removed, use BorderStroke instead. Modifier.drawBorder was removed, use Modifier.border instead. Modifier.gravity was removed, use Modifier.align instead. Stack was removed, use Box instead ( I32c2b , b/172470874 )

  • AbsoluteArrangement was renamed to Arrangement.Absolute. ( If26f2 )

رفع اشکال

  • Moved DrawModifier APIs from the androidx.compose.ui package to the androidx.compose.ui.draw package. Created DrawModifierDeprecated.kt file to include typealiases/helper methods to assist with the migration from the deprecated to the current APIs. ( Id6044 , b/173834241 )
  • Renamed Modifier.drawLayer to Modifier.graphicsLayer Also updated related classes to GraphicsLayer as per API council feedback. ( I0bd29 , b/173834241 )
  • <T> was removed from SubcomposeLayout declaration. You can use it without specifying a type now. ( Ib60c8 )
  • Made PointerInputData's uptime and position fields non-nullable. ( Id468a )
  • MaterialTheme now sets the correct colors for selection handles and selection background. Non-Material apps can manually use AmbientTextSelectionColors to customize the colors used for selection. ( I1e6f4 , b/139320372 , b/139320907 )
  • The alignment parameter of Box was renamed to contentAlignment. ( I2c957 )
  • offsetPx modifiers were renamed to offset. They are now taking lambda parameters instead of State. ( Ic3021 , b/173594846 )
  • Added WindowManager.isWindowFocused to check if the host window is in focus, and a WindowFocusObserver that provides an onWindowFocusChanged callback. ( I53b2a , b/170932874 )
  • Added resetInput parameter to TextInputService#onStateUpdated ( I3e8f5 , b/172239032 , b/171860947 )
  • Updated TextFieldValue API
    • made TextFieldValue.composition readonly
    • removed exception thrown for invalid selection range ( I4a675 , b/172239032 )
  • Deprecated Ambients named with Ambient as their suffix, and replaced them with new properties prefixed with Ambient, following other Ambients and Compose API guidelines. ( I33440 )
  • Added Android Typeface wrapper. You can load an Android Typeface via typeface function ie typeface(Typeface.DEFAULT) . Also renamed typefaceFromFontFamily() to typeface() ( I52ab7 )
  • Added lint check to check that Modifier factories use androidx.compose.ui.composed {} internally, instead of being marked as @Composable . ( I3c4bc )
  • Added lint check to check that Modifier factory functions are defined as extensions on Modifier, so they can be fluently chained together. ( I07981 )
  • Semantics argument mergeAllDescendants was renamed to mergeDescendants. ( Ib6250 )
  • Time control in tests (TestAnimationClock and its usages) is now experimental ( I6ef86 , b/171378521 )
  • Remove old ui-test module and its stubs ( I3a7cb )
  • TextUnit.Inherit is renamed to TextUnit.Unspecified in consistent with other units. ( Ifce19 )
  • The Alignment interface was updated and made functional. ( I46a07 , b/172311734 )
  • foundation:foundation-text module has been merged into foundation:foundation ( Idac0f )
  • Deprecate place(Offset) and placeRelative(Offset). Use overloads with int offsets instead ( I4c5e7 )
  • id was renamed to layoutId for LayoutIdParentData . Measurable.id was renamed to Measurable.layoutId . ( Iadbcb , b/172449643 )

Version 1.0.0-alpha07

11 نوامبر 2020

androidx.compose.foundation:foundation:1.0.0-alpha07 , androidx.compose.foundation:foundation-layout:1.0.0-alpha07 , and androidx.compose.foundation:foundation-text:1.0.0-alpha07 are released. نسخه 1.0.0-alpha07 حاوی این commit ها است.

تغییرات API

  • Similarly to Modifier.fillMaxSize[Width|Height] we now support fractions in Modifier.fillParentMaxSize[Width|Height] inside the scope of LazyColumn/Row ( I797e2 , b/166586426 )
  • Removed KeyboardOptions.toImeOptions from public API. ( Ic2e45 )
  • The foundation AmbientTextStyle, ProvideTextStyle, and AmbientContentColor have been deprecated. Instead use the new versions available in the Material library. For non-Material applications, you should instead create your own design system specific theming ambients that can be consumed in your own components. ( I74acc , b/172067770 )
  • foundation.Text has been deprecated and replaced with material.Text. For a basic, unopinionated text API that does not consume values from a theme, see androidx.compose.foundation.BasicText. ( If64cb )
  • Added maxLines to TextFields ( Ib2a5b )
  • Update TextFields to accept KeyboardOptions ( Ida7f3 )
  • Added KeyboardOptions for use in TextFields ( I9ca32 )
  • Adds BasicText as a design-unopinionated API for text, parallel to BasicTextField. ( I28268 )
  • ExperimentalLazyDsl annotation was removed. LazyColumn/LazyRow can now be used without adding @OptIn ( Idab7a , b/166584730 )
  • BaseTextField has been deprecated. Use BasicTextField instead. ( I896eb )
  • BasicTextField has been added as a replacement for both CoreTextField and BaseTextField ( Id4cea )
  • Remove deprecated LazyColumnItems/LazyRowItems ( I1d8a8 )
  • The deprecated composables for sizing to intrinsic measurements were removed. ( I18537 , b/171811496 )
  • relativePaddingFrom was renamed to paddingFrom. The paddingFromBaseline modifier was added, as convenience for specifying distances from layout bounds to text baselines. ( I0440a , b/170633813 )
  • The matchHeightConstraintsFirst parameter was added to the aspectRatio modifier, which can be used to specify the modifier to size to height constraints before trying the width correspondents. ( Ie7c43 , b/155290593 )
  • The deprecated DpConstraints was removed. ( I87884 , b/171702471 )

رفع اشکال

  • Introduced ScaleFactor inline class to represent scale factors for the horizontal and vertical axes independent of one another in order to support non-uniform scaling use cases.
    • Added computeScaleFactor method to ContentScale
    • Added ContentScale.FillBounds to perform non-uniform scaling to stretch the src bounds to fully occupy the destination.
    • Added operator methods to compute ScaleFactor parameters with Size parameters.
    • ( Ic96a6 , b/172291582 )
  • captureToBitmap moved to captureToImage. ( I86385 )
  • Marks CoreText as @InternalTextApi. Use BasicText instead. ( I6aaeb )
  • Rename KeyboardOptions as ImeOptions ( I82f36 )
  • Moved KeyboardType and ImeAction into KeyboardOptions ( I910ce )
  • CoreTextField has been marked as @InternalTextApi. Use BasicTextField instead ( Ie2469 )
  • ExperimentalSubcomposeLayoutApi annotation was removed. SubcomposeLayout can now be used without adding @OptIn ( I708ad )
  • Introduce ui-test-junit4 module ( Ib91f8 )
  • Updated Icon API to take in Color.Unspecified as a possible tint color which will draw the provided asset or painter without a ColorFilter. Previously attempts to ignore tinting with Color.Unspecified would tint with a transparent color ending up with nothing rendered at all. ( I049e2 , b/171624632 )
  • MeasureResult was moved out of MeasureScope. ( Ibf96d , b/171184002 )
  • Several layout related symbols were moved from androidx.compose.ui to androidx.compose.layout.ui. ( I0fa98 , b/170475424 )
  • androidx.ui.test moved to androidx.compose.ui.test ( I9ffdb )
  • FirstBaseline and LastBaseline were moved to androidx.compose.ui.layout package ( Ied2e7 )
  • Added SelectionContainer without the callback ( Ibfadb )
  • Add Tests for SelectionHandles' Positions in SelectionContainer. ( Ie93db )
  • Added Keyboard auto correct IME Option ( I57b8d )

Version 1.0.0-alpha06

28 اکتبر 2020

androidx.compose.foundation:foundation:1.0.0-alpha06 , androidx.compose.foundation:foundation-layout:1.0.0-alpha06 , and androidx.compose.foundation:foundation-text:1.0.0-alpha06 are released. نسخه 1.0.0-alpha06 حاوی این commit ها است.

تغییرات API

  • androidx.compose.foundation.Icon has been moved to androidx.compose.material.Icon. You can also use the Image component / Modifier.paint() with a Painter if you do not want to use the Material library. ( I9f622 )
  • Added interactionState to Modifier.scrollable, ScrollableColumn and LazyColumnFor ( I81566 , b/169509805 )
  • alignByBaseline was added to RowScope and alignWithSiblings was renamed to alignBy ( I06503 , b/170628732 )
  • Box was made an inline function. ( Ibce0c , b/155056091 )
  • Added maxLines to CoreTextField ( Ibee58 , b/143687793 )
  • Added softwrap to CoreTextField. ( I21a4b )

رفع اشکال

  • Deprecate VectorPainter in favor of rememberVectorPainter to better indicate that the composable API internally leverages 'remember' to persist data across compositions. ( Ifda43 )
  • Enable transitions in ComposeTestRule; remove option to enable the blinking cursor from ComposeTestRule. ( If0de3 )
  • Added single line keyboard option to CoreTextField ( I72e6d )
  • Renamed Radius API to CornerRadius to better express how it is used throughout Compose. Updated documentation to indicate that negative corner radii are clamped to zero. ( I130c7 , b/168762961 )
  • Add ability to specify inspector info in composed modifier ( Idee08 , b/163494569 )
  • Added KeyboardCapitalization IME Option ( I8ac38 )
  • Fix Rtl Handle Position. ( I6e1e0 )
  • Breaking change: removed the return value from PointerInputFilter.onPointerEvent(...) given that the only value that should be able to be changed in pointer events is consumption data. Instead of returning data from PointerInputFilter.onPointerEvent(...), now you can just mutate the consumption data of the PointerEvents passed in. ( I6acd0 )
  • Added SelectAll option into selection menu ( Ief02b )

نسخه 1.0.0-alpha05

14 اکتبر 2020

androidx.compose.foundation:foundation:1.0.0-alpha05 , androidx.compose.foundation:foundation-layout:1.0.0-alpha05 , and androidx.compose.foundation:foundation-text:1.0.0-alpha05 are released. نسخه 1.0.0-alpha05 حاوی این commit ها است.

تغییرات API

  • CoreTextField now supports cursor functionality ( Id23aa )
  • Deprecates contentColor() and currentTextStyle() APIs, and replaces them with AmbientContentColor and AmbientTextStyle ambients respectively. You can access the current value by using .current on the ambient property, as with any other ambient. This was change was made for consistency and to avoid having multiple ways to accomplish the same thing. Additionally renames some ambient properties to better describe their purpose as follows:

    • ContentColorAmbient -> AmbientContentColor
    • TextStyleAmbient -> AmbientTextStyle
    • IndicationAmbient -> AmbientIndication
    • EmphasisAmbient -> AmbientEmphasisLevels
    • RippleThemeAmbient -> AmbientRippleTheme ( I37b6d )

رفع اشکال

  • As part of the standardization of sentinel values for inline classes, rename Color.Unset to Color.Unspecified for consistency with other inline classes ( I97611 , b/169797763 )
  • Added Copy/Paste/Cut accessibility actions ( I6db4f )
  • TextOverflow.None is introduced. When overflow is None, Text won't handle overflow anymore, and it will report its actual size to LayoutNode. ( I175c9 , b/158830170 )
  • Updated Size.Unspecified parameters to be Float.NaN instead of Float.POSITIVE_INFINITY. Updated Painter implementations to check against Size.Unspecified as well as non-finite Sizes. ( I95a7e )
  • Added Paging Compose module and paging integration ( Ib85da )
  • Modify LazyListScope to receive nullable values ( I1765b )
  • OnPositionedModifier is renamed to OnGloballyPositionedModifier and onPositioned() is renamed to onGloballyPositioned(). ( I587e8 , b/169083903 )
  • Added samples for LazyColumn/Row ( Idc16d )
  • Fix for the items and itemsIndexed methods to allow emptyList ( I06647 )
  • Add a DSL for specifying inspector information ( Ic9a22 )
  • Move LongPress into Text. ( Iff2bc )
  • Disable Selection in Text, and a Demo. ( Ie7e97 )
  • Support AnnotatedString to SpannableString conversion for accessibility. ( Ief907 )
  • Removed PointerInputFilter.onPointerInput(...) . PointerInputFilter.onPointerEvent(...) should be used in its place. ( I6f04a )

نسخه 1.0.0-alpha04

1 اکتبر 2020

androidx.compose.foundation:foundation:1.0.0-alpha04 , androidx.compose.foundation:foundation-layout:1.0.0-alpha04 , and androidx.compose.foundation:foundation-text:1.0.0-alpha04 are released. نسخه 1.0.0-alpha04 حاوی این commit ها است.

تغییرات API

  • Stack was renamed to Box. The previously existing foundation.Box will be deprecated in favor of the new Box in compose.foundation.layout. The behavior of the new Box is to stack children one on top of another when it has multiple children - this is different from the previous Box, which was behaving similar to a Column. ( I94893 , b/167680279 )
  • Box decoration parameters have been deprecated. If you want to have decorations/padding on your box, use Modifiers instead (Modifier.background, Modifier.border, Modifier.padding) ( Ibae92 , b/167680279 )
  • Add a new LazyListState class. This allows for observation and control of the scroll position of LazyRow and LazyColumn components. Instances can be created using rememberLazyListState() and passed into the state parameter of the component. Currently, the first visible item and offsets can be observed in this initial version. ( Ic7cb7 , b/159307669 )
  • Lazy list position and scroll offset are now saved and restored across Activity recreation ( Ie045f , b/166589058 )
  • Add long click semantics action ( I6281b , b/156468846 )
  • MutatorMutex utility added for keeping a single mutator of shared state over time and cancelling conflicting mutators by priority ( I3f975 )
  • Annotated rootAnimationClockFactory, transitionsEnabled, blinkingCursorEnabled and textInputServiceFactory with @VisibleForTesting, make them internal API and hide their kdoc ( I554eb , b/168308412 )
  • Removed inlineContent parameter from Text with String input. It won't be used because inlineContent must work with AnnotatedString. ( Ief403 )
  • The deprecated custom Arrangement APIs were removed. ( Ic576d , b/168297922 , b/168297923 )
  • The unbounded parameter was added to wrapContentSize modifiers, which enables measuring the layout element with infinite max constraints. ( I77951 , b/158559319 )
  • We prevented static imports of contents of layout scopes (eg alignWithSiblings in RowScope). The explicit scope alternative should be used instead: with(RowScope) { Modifier.alignWithSiblings(FirstBaseline) } . ( I216be , b/166760797 )

رفع اشکال

  • Updated many Graphics APIs
    • Updated scale and rotation transformation APIs to consume a single Offset parameter to represent the pivot coordinate instead of separate float parameters for the x/y coordinates in DrawScope and DrawTransform
    • Removed Rect.expandToInclude and Rect.join methods
    • Updated Radius documentation to say oval in addition to elliptical
    • Added documentation to indicate the public constructor for the inline Radius class is not to be called directly but instead Radius objects should be instantiated through their function constructors
    • Removed RoundRect APIs to query topRight, bottomRight, bottomCenter, etc.
    • Deprecated Rect.shift in favor of Rect.translate
    • Removed RoundRect.grow and Rect.shrink APIs
    • Renamed RoundRect.outerRect to Rect.boundingRect
    • Removed RoundRect.middleRect/tallMiddleRect/wideMiddleRect and Rect.isStadium methods
    • Renamed RoundRect.longestSide to RoundRect.maxDimension
    • Renamed RoundRect.shortestSide to RoundRect.minDimension
    • Changed RoundRect.center to be a property instead of a function
    • Updated RoundRect constructor to consume Radius properties instead of individual parameters for x/y radius values
    • Removed Size APIs that assumed it was a Rectangle with origin at 0,0
    • Added a destructing API to Radius
    • Migrated various RoundRect extension functions to be properties instead
    • ( I8f5c7 , b/168762961 )
  • Performance optimizations for LazyColumnFor/LazyRowFor scrolling by not doing unnecessary recompositions during every scroll ( I64f65 , b/168293643 , b/167972292 , b/165028371 )
  • Fixed crash in LazyColumnFor/LazyRowFor after scrolling and then changing items and implemented auto scrolling up when the previously visible item was removed so we don't display empty gaps in the end anymore ( I220ab , b/161480164 , b/167855468 )
  • Nesting scrollable in the same direction containers like ScrollableContainer and LazyColumnFor is not allowed anymore. It was never supported and was breaking the fling and all the laziness of composing the items of LazyColumnFor ( I6e101 )
  • Updated many Graphics APIs
    • Updated DrawScope APIs with scoped transformation methods to indicate that the transformation is only applied within the callback and removed after the callback is invoked
    • Updated clipPath documentation to refer to Path instead of rounded rectangle
    • Fixed spacing in documentation for right parameter in clipPath
    • Renamed DrawScope.drawCanvas to drawIntoCanvas and removed size parameter
    • Renamed dx/dy parameters in inset method to horizontal and vertical
    • Added inset overload that provides the same inset value to all 4 bounds
    • Removed documentation on inset method indicating that inset would be applied to all 4 sides
    • Updated documentation for Rect class
    • Updated comments on Rect parameters to match kdoc style
    • Removed Rect.join and Rect.expandToInclude
    • Created overload for Rect.translate(offset) and deprecated Rect.shift
    • ( If086a , b/167737376 )
  • add AccessibilityScrollState to semantics properties. ( Ifeda9 )
  • Make TextRange inline to avoid object creation. ( Id034b )
  • ParagraphConstraints is removed. Width is directly passed to Paragraph now. ( Ica712 )

Version 1.0.0-alpha03

16 سپتامبر 2020

androidx.compose.foundation:foundation:1.0.0-alpha03 , androidx.compose.foundation:foundation-layout:1.0.0-alpha03 , and androidx.compose.foundation:foundation-text:1.0.0-alpha03 are released. نسخه 1.0.0-alpha03 حاوی این commit ها است.

تغییرات API

  • InnerPadding was renamed to PaddingValues. ( I195f1 , b/167389171 )
  • Usages of gravity were consistently renamed to align or alignment in layout APIs. ( I2421a , b/164077038 )
  • An alignment parameter was added to Stack, which allows specifying the default alignment for all the Stack children. ( Ie80ca , b/164085265 )

رفع اشکال

  • DpConstraints and APIs using it were deprecated. ( I90cdb , b/167389835 )
  • The parameters minWidth and maxWidth of widthIn were renamed to min and max . Similarly for preferredWidthIn , heightIn , preferredHeightIn . ( I0e5e1 , b/167389544 )
  • Added onNode and other global methods on ComposeTestRule as the current global ones are going to be deprecated. ( Ieae36 )
  • Fixed size and position calculations in GestureScope, which caused amongst others generation of invalid swipe gestures ( Iaf358 , b/166589947 )
  • Moved createAndroidComposeRule and AndroidInputDispatcher from androidx.ui.test.android to androidx.ui.test ( Idef08 , b/164060572 )

نسخه 1.0.0-alpha02

2 سپتامبر 2020

androidx.compose.foundation:foundation:1.0.0-alpha02 , androidx.compose.foundation:foundation-layout:1.0.0-alpha02 , and androidx.compose.foundation:foundation-text:1.0.0-alpha02 are released. نسخه 1.0.0-alpha02 حاوی این commit ها است.

رفع اشکال

  • TestUiDispatcher is marked experimental ( Iae99d , b/161247083 )
  • Added ManualFrameClock.hasAwaiters to see if anything is awaiting a frame from that clock; runWithManualClock as a replacement for runBlocking when running tests that need a ManualFrameClock; TestUiDispatcher.Main that gives easy access to the main UI dispatcher in your tests.

    به عنوان مثال:

    @Test
    fun myTest() = runWithManualClock { clock ->
        // set some compose content
        withContext(TestUiDispatcher.Main) {
            clock.advanceClock(1000L)
        }
        if (clock.hasAwaiters) {
            println("The clock has awaiters")
        } else {
            println("The clock has no more awaiters")
        }
    }
    

    ( I0a85b , b/161247083 )

نسخه 1.0.0-alpha01

26 آگوست 2020

androidx.compose.foundation:foundation:1.0.0-alpha01 , androidx.compose.foundation:foundation-layout:1.0.0-alpha01 , and androidx.compose.foundation:foundation-text:1.0.0-alpha01 are released. نسخه 1.0.0-alpha01 حاوی این commit ها است.

Version 0.1.0-dev

Version 0.1.0-dev17

19 آگوست 2020

androidx.compose.foundation:foundation:0.1.0-dev17 , androidx.compose.foundation:foundation-layout:0.1.0-dev17 , and androidx.compose.foundation:foundation-text:0.1.0-dev17 are released. Version 0.1.0-dev17 contains these commits.

تغییرات API

  • The spacedBy Arrangement was added for Row and Column, to enable positioning layout children with a fixed spacing. The aligned Arrangment was also added, to enable positioning layout children one next to the other and aligned in the Row/Column according to an Alignment. The previous Arrangement.Vertical#arrange and Arrangement.Horizontal#arrange methods were deprecated, and writing custom Arrangements will not be supported in the future. ( I6733d , b/161985975 )
  • Offset has become an inline class ( Iaec70 )
  • Removed onFocusChanged callbacks from TextField. Use Modifier.focusObserver instead. ( I51089 , b/161297615 )
  • Modifier.drawBorder has been deprecated. Use Modifier.border instead. Border data class has been replaced by BorderStroke ( I4257d , b/158160576 )
  • VerticalScroller and HorizontalScroller have been removed. Use ScrollableColumn/Row instead. Modifier.drawBackground has been removed. Use Modifier.background ( I73b0d , b/163019183 )
  • Remove marked as deprecated fillMax* modifiers from LazyItemScope as they are making it harder to add such modifiers correctly for items which are not direct children of LazyColumnFor ( Ifa78d )
  • added LazyColumn/LazyRow implementation as DSL ( I93cc6 )
  • Constraints is now an inline class ( I88736 )
  • Added the ability to size a layout to a fraction of the available space, using the fillMaxWidth, fillMaxHeight and fillMaxSize modifiers. ( I945bb , b/161562591 )

رفع اشکال

  • Added a modifier param to SelectionContainer ( I4aada , b/161487952 )
  • Added mergePolicy lambda to SemanticsPropertyKey. This can be used to define a custom policy for mergeAllDescendants semantics merging. The default policy is to use the parent value if already present, otherwise the child value. ( Iaf6c4 , b/161979921 )
  • PlacementScope.placeAbsolute() was renamed to PlacementScope.place() , and the previous PlacementScope.place() was renamed to PlacementScope.placeRelative() . As a result, the PlacementScope.place() method will not automatically mirror the position in right-to-left contexts anymore. If this is desired, use PlacementScope.placeRelative() instead. ( I873ac , b/162916675 )
  • Removed deprecated FilledTextField component. Please use TextField instead to get the Material Design implementation of the Filled text field. ( I5e889 )
  • Added backgroundColor parameter to LinearProgressIndicator and removed internal padding from CircularProgressIndicator. Added new ProgressIndicatorConstants.DefaultProgressAnimationSpec which can be used as the default AnimationSpec when animating progress between values ( If38b5 , b/161809914 , b/161804677 )
  • The state { ... } composable is now deprecated in favor of explicit calls to remember { mutableStateOf(...) } for clarity. This reduces the overall API surface and number of concepts for state management, and matches the by mutableStateOf() pattern for class property delegation. ( Ia5727 )
  • Renamed RRect to RoundRect to better fit compose naming patterns Created similar function constructors to RRect and deprecated RRect function constructors ( I5d325 )
  • Removed onChildPositioned and OnChildPositionedModifier. Developers should use onPositioned and OnPositionedModifier on the child layout instead. ( I4522e , b/162109766 )
  • IntSize is now an inline class ( I2bf42 )
  • LongPress the Blank Area to Edit. ( Ib1e5b )
  • Hide FloatingToolbar After Tapping on the Text. ( If4525 )
  • Hide FloatingToolbar When Updating the Selection. ( I8444c )
  • Deselect When Blur. ( I781a2 )

Version 0.1.0-dev16

5 آگوست 2020

androidx.compose.foundation:foundation:0.1.0-dev16 , androidx.compose.foundation:foundation-layout:0.1.0-dev16 , and androidx.compose.foundation:foundation-text:0.1.0-dev16 are released. Version 0.1.0-dev16 contains these commits.

تغییرات API

  • LazyItemScope was added for itemContent param of Lazy lists. It provides modifiers to fill the parent max size which solves the use case when the item should fill the viewport and the regular Modifier.fillMaxSize() doesn't work as the item is measured with infinity constraints. ( Ibd3b2 , b/162248854 )
  • Move dialog to ui ( I47fa6 )
  • Added LazyColumnForIndexed/LazyRowForIndexed - versions of LazyColumnFor/LazyRowFor which provides both index and item in the itemCallback. It is useful when in addition to a current item you need to know a current index. ( I65ff3 )
  • Modifier.deternimateProgress has been renamed to Modifier.progressSemantics ( I9c0b4 )
  • LazyColumnItems was renamed to LazyColumnFor. LazyRowItems was renamed to LazyRowFor ( I84f84 )
  • Add some Marks/Annotations for best practice reason. ( I66b20 )
  • foundation.shape.corner package were flatten to foundation.share ( I46491 , b/161887429 )
  • Added сrossaxis gravity param for LazyRowItems/LazyColumnItems. LazyRowItems/LazyColumnItems now support wrap content behaviour. ( Ib39fc )
  • ZoomableState has been renamed to ZoomableController. Custom curve support has been added for smoothScale. enabled and onZoomStarted functionality has been added ( If8b8f )
  • Material FilledTextField was renamed to TextField and foundational TextField was renamed to BaseTextField to make simplest desired API easy to discover and use ( Ia6242 , b/155482676 )
  • Previously deprecated AdapterList has been removed. Use LazyColumnItems instead ( I12b9b )
  • Modifier.drawBackground has been renamed to Modifier.background ( I13677 )
  • The old ConstraintLayout DSL was removed. ConstraintSet2 has been renamed to ConstraintSet. ( If58d1 , b/162450908 )
  • Added Modifier.absoluteOffset() and Modifier.absoluteOffsetPx(). Unlike offset modifiers, absolute offset modifiers will not auto-mirror in right-to-left context ( I3aa21 )
  • Row and Column are now inline function significantly reducing the overhead of using them. ( I75c10 )

رفع اشکال

  • Address broad API fixes ( I077bc )
    1. Remove unused OffsetBase interface
    2. Align Offset and IntOffset classes to have a consistent API surface
    3. Rename IntOffset.Origin to IntOffset.Zero to be consistent with Offset API
    4. Moved nativeCanvas method off of Canvas interface to support consumers to create their own Canvas instances
    5. Created stub EmptyCanvas class to refactor DrawScope to be a non-null parameter instead of lateinit and ensure non-nullability of the field
    6. Renamed ClipOp enums to be Pascal Case
    7. Renamed FilterQuality enums to be Pascal Case
    8. Renamed StrokeJoin enums to be Pascal Case
    9. Renamed PointMode enums to be Pascal Case
    10. Renamed PaintingStyle enums to be Pascal Case
    11. Renamed PathFillType enums to be Pascal Case
    12. Renamed StrokeCap enums to be Pascal Case
    13. Updated DrawCache implementation to no longer use lateinit params
    14. Updated DrawScope to no longer use lazy delegation for fillPaint and strokePaint internal parameters
    15. Updated Image composable to avoid Box usage for less overhead
    16. Updated Outline class to have @Immutable annotations
    17. Updated PathNode to have @Immutable annotations for each path instruction
    18. Updated Vector subcomposition to remove redundant conditional checks for equality as compose already handles them
    19. Deprecated Rect companion constructor methods in favor of function constructors
    20. Updated Brush classes and function constructors with @Immutable and @Stable APIs
    21. Updated VertexMode enum to be PascalCase
    22. Updated DrawScope selectPaint method to conditionally overwrite stroke parameters on the paint if they have changed
    23. Updated Size to add destructuring API, rename UnspecifiedSize to Unspecified and removed unused methods
  • Added MonotonicFrameAnimationClock that enables you to use a MonotonicFrameClock as an AnimationClockObservable to bridge the gap between the new coroutines based clocks and APIs that still use the old callback based clocks.

    The MonotonicFrameClock equivalent of ManualAnimationClock is now ManualFrameClock. ( I111c7 , b/161247083 )

  • Removed SemanticsNodeInteraction.performPartialGesture . Use SemanticsNodeInteraction.performGesture instead. ( Id9b62 )

  • Renamed SemanticsNodeInteraction.getBoundsInRoot() to SemanticsNodeInteraction.getUnclippedBoundsInRoot() ( Icafdf , b/161336532 )

  • The APIs for right-to-left support has been updated. LayoutDirectionAmbient has been added, which can be used to read and change the layout direction. Modifier.rtl and Modifier.ltr have been removed. ( I080b3 )

  • Modifier.plus has been deprecated, use Modifier.then instead. 'Then' has a stronger signal of ordering, while also prohibits to type Modifier.padding().background() + anotherModifier , which breaks the chain and harder to read ( Iedd58 , b/161529964 )

  • Added isFocused() and isNotFocused() SemanticsMatcher. ( I0b760 )

  • RemeasurementModifier was added. It allows users to synchronously remeasure the layout. In general, you never need it as remeasure/relayout is happening automatically, but we use it inside LazyColumnItems during the scroll. ( I5f331 , b/160791058 )

  • isSystemInDarkTheme now always considers the system-wide dark theme setting, and ignores power saving status before Q, following latest guidance. ( I0c10c )

  • OnChildPositioned has been deprecated. Use OnPositioned on the child instead. ( I87f95 , b/162109766 )

  • Renamed AndroidComposeTestRule to createAndroidComposeRule. ( I70aaf )

  • Add accessibility action to get TextLayoutResult ( I9d6e6 )

Version 0.1.0-dev15

22 جولای 2020

androidx.compose.foundation:foundation:0.1.0-dev15 , androidx.compose.foundation:foundation-layout:0.1.0-dev15 , and androidx.compose.foundation:foundation-text:0.1.0-dev15 are released. Version 0.1.0-dev15 contains these commits.

To use the 0.1.0-dev15 version of Compose, you will need to:

Dependencies Update

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

تغییرات API

  • Similarly to the new param in ScrollableColumn/ScrollableRow LazyColumnItems/LazyRowItems now also have contentPadding param which allows to add a padding for the content after it has been clipped, which is not possible via just a modifier param. It also allows to add a spacing only before first item/after last item. ( Ibc24e )
  • onFocusChange callback in text fields renamed to onFocusChanged ( Ida4a1 )
  • VerticalScroller and HoriziontalScroller have been deprecated. Use ScrollableColumn and ScrollableRow for build-in experience with Column/Row behaviour and parameters, or Modifier.verticalScroll and Modifier.horizontalScroll on your own element. Similarly, ScrollerPosition has been deprecated in favor of ScrollState' ( I400ce , b/157225838 , b/149460415 , b/154105299 )
  • Modifier.draggable and Modifier.scrollable APIs were reworked. DragDirection was removed in favor of Orientation. State required for scrollable has beed simplified. ScrollableState has been renamed to ScrollableController ( Iab63c , b/149460415 )
  • Single-value semantics properties now use a calling style. For example, 'semantics { hidden = true }' is now written as: semantics { hidden() } . ( Ic1afd , b/145951226 , b/145955412 )
  • Corner sizes used by RoundedCornerShape and CutCornerShape can now be larger than 50% ( Id2340 , b/160400213 )
  • Changed the default ContentScale parameter for the Image composable from Inside to Fit. This was done in order to get behavior to scale up the underlying Painter if the layout size is larger than the intrinsic size of the painter while maintaining the aspect ratio. This behavior better matches expectations for providing fixed sizes to the Image while not affecting the default behavior if only the intrinsic size is used to compute the size of the composable. ( I40ae3 , b/159838006 )
  • Use AnimationSpec instead of AnimationBuilder in the top level APIs to clarify the concept of static animation specification -Improve the transition DSL by removing the lambda requirement for creating AnimationSpecs such as tween, spring. They instead take constructor params directly. -Improve the overall ease of use of AnimationSpec opening up constructors instead of relying on builders -Change the duration and delay for KeyFrames and Tween to Int. This eliminates unnecessary type casts and method overloading (for supporting both Long and Int). ( Ica0b4 )
  • Clickable was removed. Use Modifier.clickable ( I84bdf )
  • Added LazyRowItems - Horizontally scrolling analogue of LazyColumnItems ( Ibbcf7 )
  • Introduced low level stateless animation APIs. These APIs ( I63bf7 )
  • androidx.ui.foundation.TextFieldValue and androidx.ui.input.EditorValue is deprecated. TextField, FilledTextField and CoreTextField composables that uses that type is also deprecated. Please use androidx.ui.input.TextFieldValue instead ( I4066d , b/155211005 )
  • Replaced usage of IntPx with Int. Replaced IntPxPosition with IntOffset. Replaced IntPxSize with IntSize. ( Ib7b44 )
  • androidx.ui.foundation.shape.RectangleShape removed; use androidx.ui.graphics.RectangleShape ( I94939 , b/154507984 )
  • In order to consolidate the number of classes used to represent sizing information, standardize on usage of the Size class instead of PxSize. This provides the benefits of an inline class to leverage a long to pack 2 float values to represent width and height represented as floats. ( Ic0191 )
  • In order to consolidate the number of classes used to represent positioning information, standardize on usage of the Offset class instead of PxPosition. This provides the benefits of an inline class to leverage a long to pack 2 float values to represent x and y offsets represented as floats. ( I3ad98 )
  • Added Modifier.zoomable for pinch-to-zoom functionality ( Id5d63 )
  • Toggleable component has been deprecated. Use Modifier.toggleable instead ( I35220 , b/157642842 )
  • MutuallyExclusiveSetItem has been deprecated. Use Modifier.selectable instead. ( I02b47 , b/157642842 )
  • TestTag is now deprecated. Use Modifier.testTag instead. ( If5110 , b/157173105 )
  • Adds fontWeight parameter to Text, which was accidentally not added previously ( I56937 )
  • Replaced usage of Px class in various compose classes as part of the large refactoring effort to only rely on Dp and primitive types for pixel parameters ( I19d02 )
  • VerticalScroller now provides Column out of the box. HorizontalScroller now provides Row out of the box. ( Ieca5d , b/157020670 )
  • Replaced usage of Px class in various compose classes as part of the large refactoring effort to only rely on Dp and primitive types for pixel parameters ( Iede0b )
  • Modifier.indication has been added to foundation package. Use it to show press/drag/other indication on your custom interactable elements ( I8425f , b/155287131 )
  • VerticalScroller and HorizontalScroller now support reversed scrolling is isReversed is set on ScrollerPosition ( I953bd )
  • Support adding composables into text layout. ( I1373c )
  • Consolidated CanvasScope implementations so there is now just DrawScope and ContentDrawScope Renamed CanvasScope to DrawScope. Updated DrawScope to implement Density interface and provide LayoutDirection Deleted DrawScope subclass in ContentDrawScope Painter and PainterModifier have been updated to no longer maintain an RTL property themselves as DrawScope provides this already without manually providing it ( I1798e )
  • Removed deprecated DrawBackground API in favor of drawBackground extension APIs on Modifier. Refactored color, brush and paint drawBackground implementations to reduce code paths as well as remove requirement for Modifier to be created as part of composition. ( I0343a )
  • Updated higher level compose APIs that expose a Canvas to expose CanvasScope instead. This removes the need for consumers to maintain their own Paint objects. For consumers that still require access to a Canvas they can use the drawCanvas extension method which provides a callback to issue drawing commands with the underlying Canvas. ( I80afd )
  • HorizontalScroller and VerticalScroller not restores their scroll position using saved instance state. ( Ia0fae , b/155075048 )
  • FocusManagerAmbient is removed. Use FocusModifier.requestFocus to obtain focus. ( Ic4826 )
  • Table layout was removed temporarily until we will make it available again with a refreshed API. ( Id88a7 )
  • Created CanvasScope API that wraps a Canvas object to expose a stateless, declarative drawing API surface. Transformations are contained within their own receiver scope and sizing information is also scoped to corresponding inset bounds. It does not require a consumer to maintain its own Paint state object for configuring drawing operations.

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

  • ColoredRect has been removed. User Box with drawBackground modifier instead ( I983c7 , b/152753731 )

  • Add cursor color customisation to the TextField ( I6e33f )

  • Now it is possible to hide/show software keyboard by using SoftwareKeyboardController which is delivered by onTextInputStarted callback ( I8dc44 , b/151860051 )

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

  • Adds commonly used parameters to Text(). If you are currently creating a local text style to pass a small number of these parameters, such as Text(style = TextStyle(textAlign = TextAlign.Center)) , you can now just provide the parameters directly: Text(textAlign = TextAlign.Center) ( I82768 )

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

  • TextField update - in horizontal dimension it will occupy all available space granted to it ( Ib08df , b/154638552 )

  • Added InteractionState and Interaction, making it easier to build components that react to UI state changes such as press, and drag ( Icfe25 , b/152525426 )

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

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

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

  • Renamed ScaleFit to ContentScale Moved ContentScale from ui-graphics to ui-core module to live in the same module as the Alignment API. Renamed FillMaxDimension to Crop Renamed FillMinDimension to Fit Renamed Fit to Inside to better match ImageView.ScaleType equivalents Added documentation indicating that the combination of Crop and Alignment.Center achieves the same result as ImageView.ScaleType.CENTER_CROP and Fit used with Alignment.Center achieves the same result as ImageView.ScaleType.FIT_CENTER Inside used with Alignment.Center achieves the same result as ImageView.ScaleType.CENTER_INSIDE ( I45f09 , b/152842521 )

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

  • Adds color parameter to text, allowing overriding the color of the text style without needing to manually merge with the style provided in a theme. ( I41a66 )

  • Improve DrawModifier API:

    • Made the receiver scope for draw() ContentDrawScope
    • Removed all parameters on draw()
    • DrawScope has same interface as former CanvasScope
    • ContentDrawScope has drawContent() method ( Ibaced , b/152919067 )
  • ColoredRect has been deprecated. Use Box(Modifier.preferredSize(width, height).drawBackground(color)) instead. ( I499fa , b/152753731 )

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

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

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

  • Moved Text to androidx.ui.foundation package, from androidx.ui.core. ( I87ce5 )

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

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

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

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

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

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

  • Renamed Image to ImageAsset to better differentiate the difference between the Image data and the upcoming Image composable used to participate in layout and draw content.

    Created extension method on android.graphics.Bitmap, Bitmap.asImageAsset() , to create an instance of an ImageAsset useful for combining traditional Android application development with the compose framework. ( Id5bbd )

  • DrawImage composable was removed. Use ImagePainter to draw image on existing layout, or SimpleImage to introduce Image that takes space ( I595e1 , b/149827027 )

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

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

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

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

  • Scrollable component has been added, which allows creation of custom Scrollers/Lists ( I5fd37 )

  • Renamed background to DrawBackground and make it to be memorized by default ( Ia0bd3 )

  • Add paddings, border, shape and background param to Box ( I05027 , b/148147281 )

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

  • rename Border modifier to DrawBorder ( I8ffcc )

  • Added Box component for combining layout and drawing common functionality. ( I6e2a7 )

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

  • Replaced DrawBorder in favor of Border Modifier ( Id335a )

  • Modifier.tag was renamed to Modifier.layoutId, to avoid confusion with Modifier.testTag. ( I995f0 )

  • The percent parameter when creating ConstraintLayout guidelines has been renamed to fraction. ( Ida2db )

  • Added support for margins of ConstraintLayout barriers. ( I47ffe )

  • Fixed RTL support in ConstraintLayout. Added RTL unaware APIs. ( I3b1c7 )

  • A new DSL for ConstraintLayout has been added. Please see the samples for more details. ( Icaa9a )

  • Added the @ExperimentalLayout annotation. ConstraintLayout, FlowRow and FlowColumn are now tagged with it to mark that their APIs are going to change. ( I412a8 )

  • Modifier.padding(InnerPadding) has been added ( I94985 , b/157133803 )

  • Removed deprecated RowAlign, ColumnAlign in Row and Column. ( If60d4 , b/155858731 )

  • Removed deprecated LayoutTag(), please use Modifier.tag() instead. Removed deprecated Modifier.matchParent(), please use Modifier.matchParentSize() instead. ( If8044 )

  • Added the offsetPx layout modifier, which can be used to define (dynamic) offsets in px. ( I5af57 )

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

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

  • Container has been removed. Use Box instead ( Ibbc2b , b/151407926 )

  • Removed deprecated LayoutWidth/Height/Size modifiers. ( Ib0bc1 )

  • Added default parameter values for the offset modifier. ( I37f06 )

  • Added symmetric padding modifier. ( I39840 )

  • Removed deprecated LayoutAspectRatio modifier. ( I65a74 )

  • Removed deprecated LayoutAlign modifiers. ( I10877 )

  • Fixed a bug in the width and height modifiers that was causing the wrapped layout to be measured with no opposite axis constraints. ( I210b8 , b/154797971 )

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

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

  • Made Alignment instantiable with arbitrary values. Added 1D Alignments. ( Ia0c05 )

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

  • alignToSiblings now accepts a Measured instead of Placeable. ( I5788d )

  • Added modifiers for sizing to intrinsic measurements and deprecated the components serving this purpose. ( I8295d )

  • Added support for customizing dimensions of children of ConstraintLayout ( Idb1a5 )

  • Removed deprecated Wrap and Center composables. ( I29e23 )

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

  • RowScope and ColumnScope members are now accessible outside Row and Column. ( I3a641 )

  • Container has been deprecated. Use Box instead. ( I675ce , b/151407926 )

  • Added the LayoutOffset modifier for offsetting layout position ( I0b8a3 )

  • Initial support for Rtl in Compose layout ( Ia5519 )

  • Updated LayoutAlign to not fill the available space anymore ( I2b14f )

  • Removed AspectRatio composable in favor of modifier. Deleted obsolete FlexColumn, FlexRow composables and Spacing modifier ( Iec8a7 )

  • Removed the LayoutInflexible modifier for Row and Column ( I0d820 )

  • Implement Drag Selection Handles to change selection for TextField. ( I27032 )

  • Implements LongPressAndDrag for TextField Selection. ( I17919 )

رفع اشکال

  • FocusModifier is deprecated in favor of Modifier.focus, Modifier.focusRequester, Modifier.focusObserver. FocusState and FocusDetailedState are deprecated in favor of FocusState2 ( I46919 , b/160822875 , b/160922136 )
  • runOnIdleCompose renamed to runOnIdle ( I83607 )
  • Several testing APIs were renamed to be more intuitive. All findXYZ APIs were renamed to onNodeXYZ. All doXYZ APIs were renamed to performXYZ. ( I7f164 )
  • Removes previously deprecated Modifier.ripple. Clickable now uses ripple as the default indication (if you have a MaterialTheme {} set in your application) so in most cases you can just use clickable and get ripple indication for free. If you need to customize the color / size / bounded parameter for the ripple, you can manually create a RippleIndication and pass it to clickable as the indication parameter. ( I663b2 , b/155375067 )
  • Removed obsolete size testing APIs. ( Iba0a0 )
  • Made LayoutNode experimental API ( I4f2e9 )
  • Version 1 of scroll orientation locking is implemented across Compose. ( I1ce7a , b/150289741 )
  • Popups, Dialogs and Menus are now inheriting the contextual MaterialTheme ( Ia3665 , b/156527485 )
  • Removed layout direction parameter from the measure block of the Layout() function. Layout direction is however available inside the callback through the measure scope object ( Ic7d9d )
  • Add AbsoluteArrangement - allows for arrangement of the children inside the Row without automatic mirroring in RTL ( I3a1df )
  • @Untracked annotation has been deprecated. Replace with @ComposableContract(tracked=false) ( Id211e )
  • Prior to this change, the compose compiler plugin would non-trivially intercept calls to constructors inside of a @Composable function if there was an ( I5205a , b/158123804 )
  • Add viewModel() composable which allows to create or get already created ViewModel similarly to how it works in Activity or Fragment ( I5fdd1 )
  • Refactored Radius class to be an inline class. Removed companion creation methods in favor of function constructor with default parameter to have the radius along the y-axis match that of the mandatory x-axis radius parameter.

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

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

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

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

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

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

  • Partial gestures no longer require passing around of a GestureToken ( Id7ae5 )

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

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

  • Rename AnnotatedString.Builder.addAnnotationString to addStringAnnotation. ( I5059e )

  • Updated Alignment API and added support for absolute alignment (which does not auto-mirror in Rtl context) ( I38cd3 )

  • Layout and LayoutModifier children can be measured with a different layout direction. ( Ibd731 )

  • Introduce additional optional rect parameter to ImagePainter to support drawing a subsection of underlying ImageAsset ( I0ea9e )

  • Fixed a crash in AdapterList when removing items ( Ic64b0 , b/153195921 )

  • We changed how we measure the first layout you put inside activity.setContent { } block. Previously it was forced to fill the whole activity screen, and now it behaves as if you put your layout inside a Stack: it can be smaller than a screen and will be positioned in the top left screen. If you want the old behaviour you can apply Modifier.fillMaxSize() for your layout. ( Ie88a7 , b/153453714 )

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

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

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

  • runOnIdleCompose and runOnUiThread are now global functions instead of methods on ComposeTestRule. ( Icbe8f )

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

  • DrawLayerModifier and drawLayer() now default clipToBounds and clipToOutline to false. ( I0eb8b , b/152810850 )

  • Renamed LayoutResult to MeasureResult. ( Id8c68 )

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

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

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

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

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

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

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

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

  • Rename Painter.toModifier to Painter.asModifier as the newly created Modifier has a reference to the original Painter that can be shared across multiple Modifier instances ( I7195b )

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

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

  • Removed ValueHolder class. Restructured AnimatedValue, AnimatedFloat classes to make the animation value field abstract so that subclasses can watch the value update.

    • Added model classes for AnimatedValue, AnimatedFloat, etc.
    • Added a new set of light-weight @Composable API for animating between values.
    • ( I79530 )
  • Breaking changes to the ambients API. See log and Ambient<T> documentation for details ( I4c7ee , b/143769776 )

  • Alignment line Int positions returned from Placeable#get(AlignmentLine) are now non-null. If the queried alignment line is missing, AlignmentLine.Unspecified will be returned. ( I896c5 , b/158134875 )

  • Fixed a ConstraintLayout bug causing a crash on recompositions. ( Ibee5a , b/158164341 )

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

  • Renamed LayoutModifier2 to LayoutModifier. ( Id29f3 )

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

  • LayoutDirectionAmbient is deprecated. To read the layout direction defined by the locale, use localeLayoutDirection on ConfigurationAmbient ( I851b1 )

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

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

  • Add OnPositionedModifier and OnChildPositionedModifier to replace OnPositioned and OnChildPositioned composable functions. ( I2ec8f )

  • Disallow negative padding in LayoutPadding. LayoutOffset should be used instead for negative position offsets. ( Ifb5b1 )

  • WithConstraints got LayoutDirection parameter ( I6d6f7 )

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

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

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

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

  • Improvements to the API surface of Constraints ( I0fd15 )

  • Added TextDirection.Content ( I48f36 )

  • Ajdust the Toolbar Menu to show copy, cut, paste properly. ( Id3955 )

  • Add FloatingToolbar for TextField Selection. ( Ie8b07 )

  • TextDirectionAlgorithm is renamed as TextDirection ( I75ce8 )

  • TextDirection is renamed as ResolvedTextDirection ( I3ff38 )

  • Add HapticFeedback to TextField Selection. ( I58050 )

  • Add Copy, Cut, and Paste methods to TextField Selection. ( Idb70b )

  • TestTag and Semantics have been deleted. Use Modifier.testTag and Modifier.semantics instead ( I15ff0 , b/158841414 )

  • Changed the package name for Locale and LocaleList from androidx.ui.text to androidx.ui.intl ( I8132c )

  • API change: AnnotatedString(builder: Builder) is renamed to annotatedString(builder: Builder) . ( Ia6377 )

  • API change: AnnotatedString.Item is renamed to AnnotatedString.Range . ( I2d44d )

  • Add Toolbar for text related operations. ( I49d53 )

  • New LifecycleOwnerAmbient is now available. Now an Activity you are using with Compose UI should extend androidx.activity.ComponentActivity (or AppCompatActivity). setContent on android.app.Activity is now deprecated ( Idb25a , b/153141084 )

  • ui-android-text package name (androidx.text) replaced with androidx.ui.text.platform in order to align with androidx policy. ( I42711 )