بنیاد نوشتن

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

ساختار

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

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

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

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

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

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

شیار

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

android {
    buildFeatures {
        compose true
    }

    composeOptions {
        kotlinCompilerExtensionVersion = "1.5.14"
    }

    kotlinOptions {
        jvmTarget = "1.8"
    }
}

کاتلین

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

android {
    buildFeatures {
        compose = true
    }

    composeOptions {
        kotlinCompilerExtensionVersion = "1.5.14"
    }

    kotlinOptions {
        jvmTarget = "1.8"
    }
}

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

بازخورد

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

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

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

نسخه 1.7

نسخه 1.7.0-beta06

24 جولای 2024

androidx.compose.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 های SwipeToReveal MATERIAL (برای کارت و تراشه) اکنون به جای نمونه های مبتنی بر کلاس داده ، به یک API مبتنی بر شکاف (همانطور که توسط آهنگسازی توصیه می شود) تکیه می کنند تا آن شکاف ها را ایجاد کنند. این یک تغییر شکستن است ، لطفاً برای نمونه هایی از نحوه استفاده از API جدید ، نسخه ی نمایشی و نمونه را ببینید. ( IA8943 )

رفع اشکال

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

نسخه 1.6.0-alpha08

18 اکتبر 2023

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

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

  • Modifier.draggable2D اصلاح کننده جدیدی است که امکان پشتیبانی آسان کشیدن 2D را فراهم می کند. نمونه ( ID95F5 ، B/214412658 ) را ببینید

تغییرات API

  • Modifier.dragAndDrawSource دارای onDrawDragShadow Lambda به drawDragDecoration تغییر نام داده است و DragAndDropInfo دارای پارامتر اندازه است که به dragDecorationSize تغییر نام داده است. ( ID0E30 ، B/303904810 )
  • پارامتر decorationBox BasicTextField2 به decorator تغییر نام داده می شود. نوع آن همچنین به یک TextFieldDecorator متناسب با رابط Fun Fun Funface تغییر یافته است. ( 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 در تست های خود تنظیم کنید. این پرچم در آهنگسازی 1.6.0-beta01 حذف می شود. ( IC9486 )
  • ColorList و ColorSet اضافه شده که از تخصیص خودداری می کنند. ( i744bd )
  • این تغییر shortSnapVelocityThreshold را که به جزئیات اجرای اجرای SnapLayoutInfoProvider تبدیل شده است ، از بین می برد. ( i65f6d )
  • اصلاح کننده dragAndDropSource را برای شروع جلسات درگ و رها کردن اضافه می کند ، و اصلاح کننده dragAndDropTarget برای دریافت از جلسات درگ و قطره ( IB7828 ، B/286038936 )
  • مستندات SnapPositionInLayout و روش موقعیت را به روز کنید. پدیده های محتوا را به روش موقعیت در SnapPositionInLayout معرفی کنید. ( id7938 ، b/300116110 )
  • UndoState به TextFieldState اضافه شده است که امکان خنثی کردن/تغییر مجدد تغییرات ایجاد شده توسط کاربر را فراهم می کند. ( ICC024 )

رفع اشکال

نسخه 1.6.0-alpha06

20 سپتامبر 2023

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

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

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

تغییرات API

  • معرفی شده updateCurrentPage و updateTargetPage در ScrollScope ، این آخرین قطعات لازم برای امکان سفارشی سازی پیمایش انیمیشن از طریق PagerState.scroll است. ( i9cad5 ، b/267744105 ، b/243786897 )
  • چگالی را از SnapFlingBehavior جدا کنید. تمام پیاده سازی های SnapLayoutInfoProvider در حال حاضر راهی برای دسترسی به چگالی دارند ، دامنه گیرنده را می توان حذف کرد که منجر به اجرای کمتری از هر دو SnapFlingBehavior و SnapLayoutInfoProviders می شود. ( i153c3 )
  • اصلاح کننده های بیشتر به عنوان پایدار مشخص می شوند. ( i56af1 ، b/298046462 )
  • SnapStepSize از SnapLayoutInfoProvider حذف کرد. محاسبه باید با استفاده از اطلاعات چیدمان انجام شود و از طریق رویکرد یا جبران خسارات ارائه شود. ( 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 اضافه کنید که یک مقدار غیرقابل تغییر و پاسخ به تماس را برای تغییر آن مقدار می پذیرند ، دقیقاً مانند API فعلی BasicTextField . ( IA4882 )
  • Modifier.preferKeepClear() را اضافه کنید تا به عنوان ترکیب به عنوان ترجیح می دهد که از ویندوز شناور در API 33 و بالاتر پاک شود. ( IB51D5 ، B/297260115 )
  • سرعت های چرخشی در نمای مشاهده مانند ScrollView و RecyclerView در ViewConfiguration.ScaledMaximumFlingVelocity قرار دارند. ScaledMaximumflingVelocity. اکنون آهنگسازی حاوی نسخه خاص خود از maximumFlingVelocity است که اکنون در مورد Draggable صدق می کند. ( IBF974 )
  • Pager مستهلک شده و اضافه بار PagerState برداشته شده است. ( IEA07E )
  • BasicTooltipBox به compose.foundation اضافه کرده است. 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 اضافه کنید که یک مقدار غیرقابل تغییر و پاسخ به تماس را برای تغییر آن مقدار می پذیرند ، دقیقاً مانند API فعلی BasicTextField . ( i3f2b8 )
  • GridItemSpan::currentLineSpan اکنون یک API پایدار است. ( ICC29C )
  • بوم که contentDescription می پذیرد ، اکنون یک API پایدار است. ( IB3D29 )
  • معرفی viewportSize در ScrollState ، روشی برای دانستن اندازه viewPort از مؤلفه ای که پس از اندازه گیری از ScrollState استفاده می کند. ( i8b85a ، b/283102682 )
  • مسئله ای را برطرف کرد که در آن پیش تنظیم در پیجر از نظر دیدگاه با رفتار مطابقت نداشته باشد. ( i93352 ، b/289088847 )
  • Modifier.consumeWindowInsets(PaddingValues) اکنون پایدار است.
    • Deprecated Modifier.consumedWindowInsets API اکنون حذف شده است. به جای آن 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 )
  • کاملاً طراحی مجدد PlatformTextInput* API. ( i6c93a ، b/274661182 ، b/267235947 ، b/277380808 )
  • SoftwareKeyboardController و LocalSoftwareKeyboardController دیگر آزمایشی نیستند. LocalSoftwareKeyboardController هم اکنون یک CompositionLocal مناسب است. ( i4c364 )
  • Modifier.transformable اکنون PAN DELTA را در پارامتر canPan فراهم می کند تا به تعیین جهت تابه کمک کند تا اجازه یا مجاز بودن آن را بدهد. ( i692aa ، b/266829800 )
  • به روزرسانی Modififer consumeWindowInsets برای گسترش SuperClass 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 را در بنیاد معرفی کرد. این می تواند برای ساخت مؤلفه هایی که می توانند بین حالت های گسسته مانند ورق های پایین معین کشیده شوند ، استفاده شود. این API جایگزین API Swipeable مواد می شود. ( i4a2ed )

تغییرات API

  • پشتیبانی از InputConnection#requestCursorUpdates ( i0c69b )
  • scrollAnimationSpec را معرفی کرد تا مشخصات انیمیشن سفارشی را فراهم کند. به روز شده BringIntoViewCalculator برای BringIntoViewScroller . ( IDB741 )
  • نوع ResourceResolutionException را به بسته بندی پرتاب های پرتاب شده هنگام تلاش برای بارگیری دارایی های bitmap با توضیحی از مسیر دارایی که بارگیری نشده است ، اضافه کنید. ( i19f44 ، b/230166331 ، b/278424788 )
  • ویژگی ها و اقدامات معنایی اضافه شده برای پشتیبانی از ترجمه متن. ( i4a6bc )
  • یک API BringIntoViewCalculator را معرفی کرد که می تواند برای سفارشی کردن نحوه پاسخگویی به مؤلفه های 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 کننده ، اصلاح کننده طرح و موارد دیگر به Modifier.Node منتقل شده اند.
  • پیشرفت در ثبات پیجرز. بسیاری از اشکالات مورد توجه قرار گرفته است.
  • پارامترهای 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 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 در این روش جدید ، ما به سادگی درخواست جبران بعدی را می خواهیم. محاسبه مرزها باید در سطح اجرای انجام شود زیرا این ممکن است بسته به اینکه فرد نیاز به وقوع آن دارد متفاوت باشد. ( 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 نشان داده نشده است. ( 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 ها است.

این نسخه پشته رندر متن جدید را برای آهنگسازی امکان پذیر می کند. پشته جدید عملکرد بهینه سازی شده است و شما نباید هیچ تغییری در قابل مشاهده مشاهده کنید.

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

پرچم اشکال زدایی قبل از انتشار 1.5 Beta01 برداشته می شود. ( IADA23 ، B/246960758 )

تغییرات API

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

نسخه 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 s در AnnotatedString S اکنون می تواند از طریق خدمات دسترسی مانند 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 )
  • برای استناد به عمل IME در گره های ویرایشگر متن ، عملکرد معناشناسی PerformImeAction را اضافه کرد. ( 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

  • ادغام سازگار ایموجی به 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 )
  • modifierElementOf() API را حذف کرد. لطفاً به جای آن مستقیماً از 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 ، ادغام سازگار ایموجی به Text و TextField و همچنین پاراگراف سطح پایین اضافه شده است. هنگامی که emojicompat پیکربندی شده است ، به طور پیش فرض فعال می شود.
  • EmojiCompat می توان با استفاده از PlatformParagraphStyle در یک متن خاص پیکربندی کرد.

تغییرات API

  • اضافه شده اجرای متداول API PinnableContainer که در همه 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 را در توابع "دکوراتور" applyToScroll و applyToFling . نمونه های به روز شده در مستندات را برای مثال هایی از نحوه اجرای یک اثر بیش از حد با شکل 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/251840112 ، B / 251859999999999999999999999999999999999999998
  • سازنده AndroidFont با variationSettings در حال حاضر یک API پایدار است و می تواند برای ایجاد انواع جدیدی از توصیف کننده های قلم مورد استفاده قرار گیرد. ( i5adcc ، b/261565807 )
  • API PinnableContainer معرفی شده توسط لیست های تنبل از طریق یک ترکیب محلی که اجازه می دهد تا مورد فعلی را پین کند. این بدان معناست که چنین موردی در هنگام پیمایش از نمای دفع نمی شود. به عنوان مثال ، Modifier.focusable() مورد متمرکز فعلی را از طریق این مکانیسم پین می کند. ( IB8881 ، B/259274257 ، B/195049010 )
  • بازنویسی نحوه پاسخگویی به پیمایش به bringIntoViewRequesters و Focusables برای مدل سازی بهتر پیچیدگی آن عملیات و رسیدگی به موارد لبه بیشتری. ( i2e5fe ، b/241591211 ، b/192043120 ، b/237190748 ، b/230756508 ، b/239451114 )
  • تهی بیشتر از نوع بازگشت عملکردهای مخفی مستهجن ( IBF7B0 )
  • TextMotion Experimental to TextStyle را برای تعریف متن یا Static(default) یا انیمیشن اضافه کرد. اگر متن از طریق انیمیشن مقیاس ، ترجمه یا چرخانده می شود ، از TextMotion.Animated استفاده کنید. ( I24DD7 )
  • اضافه کردن TextFieldFocusModifier برای رفع رفتار ناوبری فوکوس برای سیستم عامل Android ( I00303 )
  • maxSize: IntSize آرگومان در drawText با size: Size با سایر توابع DrawScope درون خطی است. size به صورت Size.Unspecified فرض تنظیم شده است که نباید رفتار پیش فرض قبلی را تغییر دهد. ( ICD27D )

رفع اشکال

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

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

  • هنگام بروزرسانی از androidx.compose.foundation:1.4.0-alpha03 به androidx.compose.foundation:1.4.0-alpha04 ، ممکن است یک خطای java.lang.NoSuchFieldError را تجربه کنید. در اینجا جایی است که موضوع به صورت ارگین گزارش شده است. رفع مشکل ارسال شده است و در به روزرسانی آهنگسازی بعدی در دسترس خواهد بود. به عنوان یک کار در اطراف ، کتابخانه های 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 and 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 در رفتار Pager's Fling. ( I01120 )
  • یک بار اضافه در SnapFlingBehavior.performFling را معرفی کرد تا به درک این مسئله که محل حل و فصل خواهد شد ، کمک کند. ( i569f6 )
  • حذف OverscrollEffect#isEnabled . به جای اینکه نیاز به یادآوری و تنظیم این پرچم داشته باشید ، فقط در مواردی که نمی خواهید بیش از حد خرد را نشان دهید ، رویدادهای را به اثر بیش از حد اعزام نکنید (به عنوان مثال اگر ScrollableState#canScrollForward/backward هر دو کاذب را باز می گردانند). ( i1a4b0 ، b/255554340 ، b/255557085 )
  • اضافه شده ScrollableState#canScrollForward و ScrollableState#canScrollBackward برای پرسیدن اینکه آیا یک ScrollableState دارای اتاقی برای پیمایش در هر جهت است (خواه حداقل / حداکثر دامنه آن باشد). این پیش فرض برای سازگاری به عقب با اجرای موجود ScrollableState درست است. مصرف کنندگان می توانند از این استفاده کنند تا به کاربر نشان دهند که هنوز جایی برای پیمایش وجود دارد ، و از این نیز می توان برای جلوگیری از اعزام دلتا به ScrollableStates که جایی برای پیمایش در یک جهت معین ندارند ، برای کاهش کار غیر ضروری استفاده شود. ( IDF1A0 ، B/255557085 )
  • یک API اصلاح کننده برای پرس و جو از اطلاعات پیمایش اجداد اضافه کرد. ( i2ba9d ، b/203141462 )
  • هنگامی که حرکات می توانند به حوادث پیمایش تبدیل شوند ، در Clickable برای تأخیر در تعامل مطبوعات استفاده می شود.
  • در صورت استفاده در داخل یک Scrollable ViewGroup ، به طور صحیح به تأخیر نمی Clickables .
  • کشورها و برگه های به روز شده برای تأخیر صحیح مطبوعات در صورت بروز حرکات می توانند به حوادث پیمایش تبدیل شوند.
  • نامگذاری snapStepSize را به روز کنید تا با سایر روش ها در SnapLayoutInfoProvider سازگار باشد. ( ife67c )
  • EmojiCompat اضافه شده برای Compose ( IBF6F9 ، B/139326806 )
  • تغییر نام داده شده به consumedWindowInsets() به consumeWindowInsets() و withConsumedWindowInsets() به onConsumedWindowInsetsChanged() تغییر نام داد و اصلاح کننده ها را عمومی کرد. ( 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 )
  • بازگشت beyondBoundCount API Lazy* API ( I12197 )
  • پارامتر معرفی شده در API های تنبل برای تهیه و قرار دادن موارد دیدگاه ( 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 Hyphens جدید برای پشتیبانی از هیفن سازی خودکار در متن ( 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 )
  • LayoutInfo.semanticsId SemanticsModifier.id . ( IAC808 ، b/203559524 )
  • checkScrollableContainerConstraints() دیگر آزمایشی نیست. ( I2C290 )
  • Modifier.clipScrollableContainer() دیگر آزمایشی نیست. ( IA2B44 )
  • TextInputService.show|hideSoftwareKeyboard . لطفاً به جای آن در کد برنامه و TextInputSession در کد مدیریت IME از SoftwareKeyboardController استفاده کنید. ( 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 )

رفع اشکال

  • Soft keyboard will now be hidden when a text field is disabled while focused. ( I6e3e4 , b/237308379 )
  • When adding InputEventChange events to Velocity Tracker we will consider now deltas instead of positions, this will guarantee the velocity is correctly calculated for all cases even if the target element moves ( Icea9d , b/216582726 , b/223440806 , b/227709803 )
  • When a scrollable has a focused child, it will now correctly scroll to keep the focused child in view when its size is decreased, even when the size is animated. ( I80867 , b/230756508 , b/220119990 )
  • Fixed a crash where TextField is cleared and refilled while selection is active. ( I1235b , b/208655565 , b/214253689 )

نسخه 1.3.0-alpha01

29 ژوئن 2022

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

تغییرات API

  • Introduced the UrlAnnotation annotation type and associated methods to support TalkBack link support in AnnotatedString s. ( I1c754 , b/231495122 )

رفع اشکال

  • BasicTextField cursorBrush may now be animated without restarting the cursor timer. ( I812e6 , b/236383522 )

نسخه 1.2

نسخه 1.2.1

10 آگوست 2022

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

نسخه 1.2.0

27 جولای 2022

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

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

  • LazyVerticalGrid and LazyHorizontalGrid are stable now.
  • You can now specify a content type for items in Lazy lists and grids. This will allow the components to reuse elements more efficiently.
  • Lazy lists and grids now have userScrollEnabled param which allows to disable scrolling via the user gestures.
  • A new experimental API called LazyLayout was added. It It is the API we use internally to power Lazy lists and grids.
  • OverscrollEffect API has been introduced as experimental. You can define custom overscroll effects as well as adding a standard platform one to custom scrollable containers.
  • Nested scrolling interoperability APIs have been introduced to allow for interoperability between views and compose scrolling actors.
  • Mouse and trackpad scrolling has been added to all scrolling containers.

نسخه 1.2.0-rc03

29 ژوئن 2022

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

  • از 1.2.0-rc02 تغییری ایجاد نشده است.

نسخه 1.2.0-rc02

22 ژوئن 2022

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

نسخه 1.2.0-rc01

15 ژوئن 2022

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

تغییرات API

  • An experimental OverscrollEffect has been introduced to allow for custom overscroll effects, alongside the Modifier.scrollable overloads that accept it.
  • Experimental LocalOverScrollConfiguration has been moved from foundation.gesture to foundation package and renamed to LocalOverscrollConfiguration ( If19fb , b/204650733 )
  • رابط‌ها در کتابخانه‌های کامپوزی اکنون با استفاده از روش‌های رابط پیش‌فرض jdk8 ساخته می‌شوند ( I5bcf1 )
  • Introduced an experimental api checkScrollableContainerConstraints() which allows to check that we do not nest scrollable containers. You can use it when create your own scrollable lazy layouts via LazyLayout . ( Id6fab , b/233352497 )
  • Removed deprecated LazyVerticalGrid from androidx.compose.foundation.lazy package. The new stable api is located in androidx.compose.foundation.lazy.grid ( I73c76 , b/225192009 )

نسخه 1.2.0-beta03

1 ژوئن 2022

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

تغییرات API

  • Added new experimental IntervalList and MutableIntervalList . It allows to represent some list of values via multiple intervals. It will be useful when you want to define your own dsl similar to the one used by LazyColumn where list items can be defined via multiple item/items calls. ( I2d05e , b/228580728 )

رفع اشکال

  • Clarified the documentation for WindowInsets.ime to state that ime insets are reported as far back as API 23, but only animated on 30+. ( Ia7fc0 , b/230756508 )
  • Pressing the forward delete key when the cursor is at the end of a text field will no longer crash.
  • DeleteSurroundingTextCommand and DeleteSurroundingTextInCodePointsCommand now require their constructor arguments to be non-negative. ( Ica8e6 , b/199919707 )

نسخه 1.2.0-beta02

18 مه 2022

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

  • Downloadable font resolution that does not change the layout size of Text or TextField previously would not redraw, leading to stale font display. This bugfix ensures that text layout always triggers redraw (b/229727404). ( I1d49e , b/229727404 )

نسخه 1.2.0-beta01

11 مه 2022

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

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

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

تغییرات API

  • Added experimental BeyondBoundsInterval that can be used by custom implementations of LazyList when they layout items beyond visible bounds ( Ifabfb , b/184670295 )
  • LineHeightBehavior is renamed as LineHeightStyle
  • LineVerticalAlignment is renamed as LineHeightStyle.Alignment
  • Renames LineHeightTrim is renamed as LineHeightStyle.Trim
  • Default constructor values from LineHeightStyle is removed ( I582bf , b/181155707 )
  • Added default values for the optional members of LazyLayoutItemProvider interface. ( Iba8a0 )
  • In the LazyLayoutItemProvider api instead of a factory returning the composable lambda by index we now have a simpler composable function Item accepting the index. ( Id2196 )
  • LazyLayoutItemsProvider is renamed to LazyLayoutItemProvider ( I0638c )
  • LazyLayoutItemsProvider.itemsCount is renamed to itemCount ( Id409c )
  • Added Brush to TextStyle and SpanStyle to provide a way to draw text with gradient coloring. ( I53869 , b/187839528 )
  • trimFirstLineTop , trimLastLineBottom attributes of LineHeightBehavior changed into a single enum: LineHeightTrim . LineHeightTrim have values of 4 states defined by two booleans: FirstLineTop , LastLineBottom , Both and None ( Ifc6a5 , b/181155707 )
  • Added LineHeightBehavior to the TextStyle and ParagraphStyle. LineHeightBehavior controls whether line height is applied to the top of the first line and to the bottom of the last line. It also defines the alignment of line in the space provided by TextStyle ( lineHeight ).

    For example it is possible to get a behavior similar to what CSS defines via LineHeightBehavior(alignment = LineVerticalAlignment.Center, trimFirstLineTop=false, trimLastLineBottom = false) .

  • trimFirstLineTop , trimLastLineBottom configurations works correctly only when includeFontPadding is false. ( I97332 , b/181155707 )

  • Added experimental imeNestedScroll() modifier so that developers can control the IME through scrolling. ( I60759 )

رفع اشکال

  • Fixed regression where text fields would not hide the keyboard when removed from the composition while focused. ( I7a410 , b/230536793 , b/225541817 )
  • Support ellipsis when height is limited and doesn't fit all text lines ( Ie528c , b/168720622 )
  • BringIntoViewRequester.bringIntoView will now always suspend until the request is either completed or was interrupted by a newer, non-overlapping request. Overlapping requests will be queued. ( I43e7f , b/216790855 )
  • Concurrent BringIntoViewRequester.bringIntoView calls for rectangles that are completely overlapping will now only honor the larger rectangle's request. ( I34be7 , b/216790855 , b/184760918 )
  • Turned on default includeFontPadding . It is possible to turn off the includeFontPadding using TextStyle.platformTextStyle attribute. In the near future we will change the default behavior however until that time this allows us to better integrate line height improvements (aosp/2058653) and solve TextField clipping issues. ( I01423 , b/171394808 )
  • Modifier.bringIntoViewRequester no longer uses onGloballyPositioned . ( I630f5 )

مشارکت خارجی

  • MouseInjectionScope.scroll(delta = someDelta) is now inverted on Android if we scroll vertically (if someDelta is positive, it will scroll downward) ( Ifb697 , b/224992993 )

نسخه 1.2.0-alpha08

20 آوریل 2022

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

تغییرات API

  • Display all available weights for systems fonts on Android when using FontFamily.SansSerif . This will use fallback font names like sans-serif-medium internally on API 21-28. This is a behavior change as previously only weights 400 and 700 were supported on API 21-28. ( I380fe , b/156048036 , b/226441992 )
  • Paragraph and MultiParagraph are now accepting Constraints parameter. Passing Constraints.maxHeight is a no-op at the moment but will allow to do some calculation in the future, like ellipsizing based on the height. ( I6afee , b/168720622 )
  • SubcomposeSlotReusePolicy.getSlotsToRetain() now accepts a custom MutableSet-like class which doesn't allow adding new items in it. ( Icd314 )
  • Partial consumption (down OR position) has been deprecated in PointerInputChange . You can use consume() to consume the change completely. You can use isConsumed to determine whether or not someone else has previously consumed the change.
  • PointerInputChange::copy() now always makes a shallow copy. It means that copies of PointerInputChange will be consumed once one of the copies is consumed. If you want to create an unbound PointerInputChange , use constructor instead. ( Ie6be4 , b/225669674 )
  • New experimental LazyLayout API is introduced. This allows you to build your own components like LazyColumn of LazyVerticalGrid . Note that the API is in its early stages and can be changed in the future releases. ( Iba2bc , b/166591700 )
  • AndroidFont now takes typefaceLoader as a constructor parameter. ( I2c971 )
  • WindowInsets companion now exposes the visibility (whether they are on the screen, regardless of whether they intersect with the window) and the size they could be if they are available on the device, but not currently active. ( I65182 , b/217770337 )

نسخه 1.2.0-alpha07

6 آوریل 2022

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

تغییرات API

  • Added a PinnableParent API that allows children of lazy layouts to prevent the currently composed items from being disposed ( Ibbdd0 , b/184670295 )
  • LazyListLayoutInfo and LazyGridLayoutInfo now have beforeContentPadding and afterContentPadding fields ( I3b628 , b/200920410 )
  • Added KeyboardType.Decimal as an alternative to Keyboard.Number for specifically including decimal separator in IME. ( Iec4c8 , b/209835363 )
  • Add new font descriptor Font(DeviceFontFamilyName) to optionally lookup system-installed fonts during font fallback chains. ( I30468 , b/219754572 )
  • PointerEventType.Scroll and PointerEvent.scrollDelta are stable APIs now ( I574c5 , b/225669674 )
  • Added temporary compatibility configuration for includeFontPadding in TextStyle/ParagraphStyle. includeFontPadding can be changed via TextStyle(platformStyle = PlatformTextStyle(includeFontPadding = true/false)) . This is a temporary configuration option to enable migration and will be removed. ( If47be , b/171394808 )
  • Updated FontFamily.Resolver to integrate System-wide bold text accessibility setting ( I6c1e7 )
  • The consumeWindowInsets extension property of ComposeView allows developers to disable consumption of Android WindowInsets. This allows separate ComposeViews in the hierarchy to each apply WindowInsets without interfering with each other. ( 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 are released. نسخه 1.2.0-alpha06 حاوی این commit ها است.

تغییرات API

  • Added RequestFocus semantics action to request focus on the focusable target. ( I17b71 )
  • FocusOrder has now been merged into FocusProperties and focusProperties() now has all the capabilities of focusOrder() . FocusOrder and focusOrder() have been deprecated. focusOrder() that accepts a focusRequester should be replaced with a focusRequester() modifier in combination with focusProperties() . This allows the modifiers to have a stronger separation of concerns. ( I601b7 )
  • WindowInsets.asPaddingValues(Density) was added to allow developers to do the conversion without needing to be in composition. ( I94c35 )
  • تجزیه به‌روزرسانی‌های قابل ترسیم برداری برای پشتیبانی از آینه‌سازی خودکار برای برگرداندن محتوای VectorPainter اگر جهت طرح فعلی RTL باشد. ( I79cd9 , b/185760237 )

رفع اشکال

  • Scroll modifiers ( Modifier.verticalScroll() , Modifier.horizontalScroll() , and Modifier.scrollable() ) will now scroll to keep the focused composable visible if the scroll area is resized and the focused composable was previously visible.
  • TextFields will now be kept above the keyboard when they are focused and the keyboard is shown, when inside a non-lazy scrollable and the soft input mode is ADJUST_RESIZE . ( I4a485 , b/190539358 , b/192043120 , b/216842427 )

نسخه 1.2.0-alpha05

9 مارس 2022

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

تغییرات API

  • LazyVerticalGrid and LazyHorizontalGrid are now stable. ( I307c0 )
  • LazyGridItemInfo.Unknown was replaced with separate LazyGridItemInfo.UnknownRow and LazyGridItemInfo.UnknownColumn ( I56d51 )
  • LazyVerticalGrid / LazyHorizontalGrid and all related apis were moved into .grid subpackage. Please update your imports from androidx.compose.foundation.lazy to androidx.compose.foundation.lazy.grid . ( I2d446 , b/219942574 )
  • Text: includeFontPadding is now turned off by default. The clipping issues as a result of includeFontPadding=false is handled and no clipping should occur for tall scripts. ( I31c84 , b/171394808 )
  • Measured interface now exposes parentData property ( I3313f )
  • Introduced experimental Modifier.onFocusedBoundsChanged to allow observing the bounds of child focusables. ( I14283 , b/220030968 , b/190539358 , b/192043120 , b/216842427 )
  • LazyHorizontalGrid was added. ( I61ae7 , b/191238807 )
  • Added a new LazyVerticalGrid API to define cross axis sizes ( I17723 )
  • Added FocusGroup modifier ( I64bc0 , b/213508274 , b/184670295 )

رفع اشکال

  • WindowInsets.toString() will now show the correct values. ( I1585d )

مشارکت خارجی

  • Updated to use Kotlinx coroutines 1.6.0 ( I3366d )

نسخه 1.2.0-alpha04

23 فوریه 2022

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

تغییرات API

  • BringIntoViewResponders are no longer required to manually pass requests up to parent responders, and are instead required to immediately return the rectangle they want their parent to bring into view. ( I8e66a )
  • Support async font loading in Text ( I77057 , b/214587005 )
  • LazyVerticalGrid now supports line breaking before items with span not fitting inside the current line. ( I05c40 , b/207462103 )
  • Renamed excludeFromSystemGestures to systemGesturesExclusion ( I19526 )
  • LazyVerticalGrid now supports reverseLayout. ( I6d7d7 , b/215572963 , b/211753558 )
  • Add WindowInsets.only() method to allow developers to include only dimensions from the WindowInsets. ( I14c94 , b/217768486 )
  • Added ComposableTarget , ComposableTargetMarker and ComposableOpenTarget that allows compile time reporting of when a composable function is called targeting an applier it was not designed to use.

    In most cases the annotations can be inferred by the compose compiler plugin so using these annotation directly should be rare . The cases that cannot be inferred include creating and using a custom applier, abstract composable functions (such as interface methods), fields or global variables that are composable lambdas (local variables and parameters are inferred), or when using ComposeNode or a related composable functions .

    For custom appliers the composable functions that calls ComposeNode or ReusableComposeNode need to add a CompoableTarget annotation for the function and any composable lambda parameter types. It is recommended, however, to create an annotation that is annotated with ComposableTargetMarker and then the marked annotation be used instead of ComposableTarget directly. A composable annotation marked with ComposableTargetMarker is equivalent to a ComposbleTarget with the fully qualified name of the attribute class as the applier parameter. For an example of using ComposableTargetMarker see anroidx.compose.ui.UiComposable . ( I38f11 )

رفع اشکال

  • Now it is allowed to pass negative scroll offsets into LazyGridState.scrollToItem() and LazyGridState.animateScrollToItem() . ( I025c6 , b/211753558 )
  • Support async font loading for TextField. ( Icc4bf , b/214587005 )

نسخه 1.2.0-alpha03

9 فوریه 2022

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

تغییرات API

  • notifyFocusedRect methods in TextInputSession and TextInputService are now deprecated and won't be called. Use BringIntoViewRequester instead. ( Ia4302 , b/192043120 , b/216842427 , b/178211874 )
  • Animations were enabled for items of lazy grids with Modifier.animateItemPlacement(). ( Ib6621 , b/211753218 )
  • BringIntoViewRequester now propagates requests to the hosting Android View. ( Ia7a51 )
  • FontFamilyResolver is now available via LocalFontFamilyResolver.current
    • Added createFontFamilyResolver(context) and createFontFamilyResolver(context, coroutineScope) to create new FontFamily resolvers outside of compose usage.
    • Paragraph and MultiParagraph now take FontFamily.Resolver
    • TextLayoutResult.layoutInput.fontFamilyResolver now contains the resolver used for this layout, deprecated TextLayoutResult.layoutInput.resourceLoader as it is no longer used. ( Id5a45 , b/174162090 )
  • Added AndroidFont , a new low-level API for providing new types of font resource descriptors on Android. For example, loading fonts from an app-specific backend, optionally locating pre-installed fonts on-device, or loading a font from a resource not provided by the current Font factories.
    • Expanded Font.ResourceLoaded API to support optional and async font loading. It is not recommended that application developers use this API directly. To add new types of fonts see AndroidFont.
    • Font.AndroidResourceLoader extension function allows construction of a Font.ResourceLoader when outside of composition.
    • Added loadingStrategy parameter to resource-based fonts, to allow async loading when resource font references downloadable fonts XML. ( Ie5aea , b/174162090 )
  • Typeface(FontFamily) constructor is deprecated. This was previously used to preload fonts, which may take up to 10 seconds for downloadable fonts. With downloadable fonts, this call may block for 10 seconds. Instead use FontFamilyResolver.preload
    • fontResource(FontFamily): Typeface is deprecated. This was previously used to preload fonts, which may take up to 10 seconds for downloadable fonts. Instead use FontFamilyResolver.preload ( If8e7c , b/174162090 )
  • You can now specify the content type for the items of LazyVerticalGrid - item/items functions on LazyGridScope now accept such parameter. Providing such information helps item composition reusing logic to make it more efficiently and only reuse the content between the items of similar type. ( I7b355 , b/215372836 )
  • LazyListLayoutInfo and LazyGridLayoutInfo now have new properties: viewportSize , orientation , reverseLayout ( Ifc8ed , b/200920410 )
  • You can now specify the content type for the items of LazyColumn/LazyRow - item/items functions on LazyListScope now accept such parameter. Providing such information helps item composition reusing logic to make it more efficiently and only reuse the content between the items of similar type. ( I26506 )
  • SubcomposeLayoutState constructor accepting maxSlotsToRetainForReuse is now deprecated. Instead there is a new constructor accepting SubcomposeSlotReusePolicy - a new interface allowing more granular control on what slots should be retained for the future reuse. ( I52c4d )
  • Adds Modifiers for WindowInsets, both for padding and sizing. This allows some content to extend into the inset area, and still have primary content stay out of the inset area. For example, windowInsetsPadding can be used to pad the content area to avoid areas that may be fully or partially covered. ( Id0395 , b/213942085 )

رفع اشکال

  • TextFields will now be kept above the keyboard when they are focused and the keyboard is shown, when the soft input mode is ADJUST_PAN . ( I8eaeb , b/190539358 , b/192043120 )
  • Desktop uses composition local for FontFamily.Resolver
    • Desktop FontLoader is deprecated
    • New createFontFamilyResolver factory on Desktop ( I6bbbb , b/174162090 )
  • The soft keyboard input type no longer flickers when changing focus between text fields. ( I1bf50 , b/187746439 )
  • Text fields no longer require an extra back press when the cursor handle is showing. ( Ideb4b , b/205726883 )
  • Text selection magnifier behavior has been polished to match the platform magnifier. ( Idd918 , b/206833278 )

نسخه 1.2.0-alpha02

26 ژانویه 2022

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

تغییرات API

  • Added NonRestartableComposable to methods that are overloads of existing methods without complex logic. This reduces compiler generated memoization checks (equals) for all parameters which are repeated in the inner function that is called. ( I90490 )
  • Added excludeFromSystemGesture Modifiers for easy access to Android's setSystemGestureExclusionRects ( I46f07 )

رفع اشکال

  • Text selection magnifier behavior has been polished to match the platform magnifier. ( Idd918 , b/206833278 )
  • LazyColumn , LazyRow , Modifier.verticalScroll and other containers that use Modifier.scrollable now support mouse wheel scrolling. ( I2b5e1 , b/198214718 )

نسخه 1.2.0-alpha01

12 ژانویه 2022

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

تغییرات API

  • New parameter userScrollEnabled was added to LazyColumn , LazyRow , and LazyVerticalGrid in order to allow users to temporarily or permanently disable the user initiated scroll via touch gestures or accessibility actions. Scrolling programmatically via the methods on the state will still be allowed. ( I7eae9 , b/201150093 )
  • Add onSizeChanged callback to magnifier modifier. ( I6879f )
  • The magnifier widget now shows when dragging selection handles in a SelectionContainer . ( I30b38 , b/139320979 )

رفع اشکال

  • Fixes TextField cursor handle not hiding when scrolled out of view. ( I14552 , b/208883748 )

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

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

نسخه 1.1

نسخه 1.1.1

23 فوریه 2022

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

رفع اشکال

  • رفع 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 and androidx.compose.foundation:foundation-layout:1.1.0 are released. نسخه 1.1.0 حاوی این commit ها است.

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

  • پشتیبانی پایدار از افکت Overscroll Android 12
  • بهبود در اندازه هدف لمسی
  • توجه داشته باشید که با توجه به Compose 1.0، مؤلفه‌های Material فضای طرح‌بندی خود را گسترش می‌دهند تا دستورالعمل‌های دسترسی به مواد برای اندازه هدف لمسی را رعایت کنند. به عنوان مثال، هدف لمس دکمه به حداقل اندازه 48x48dp گسترش می یابد، حتی اگر اندازه دکمه را کوچکتر تنظیم کنید. این Compose Material را با همان رفتار Material Design Components تراز می‌کند و اگر Views و Compose را با هم ترکیب کنید، رفتار ثابتی را ارائه می‌دهد. این تغییر همچنین تضمین می‌کند که وقتی رابط کاربری خود را با استفاده از اجزای Compose Material ایجاد می‌کنید، حداقل الزامات برای دسترسی به هدف لمسی برآورده می‌شود.
  • پشتیبانی پایدار برای راه آهن ناوبری
  • تعدادی از APIهای آزمایشی قبلی را به ثبات رسانده است
  • پشتیبانی از نسخه های جدیدتر Kotlin

نسخه 1.1.0-rc03

26 ژانویه 2022

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

رفع اشکال

  • برای پشتیبانی از Compose Material 1.1.0-rc03 به روز شد

نسخه 1.1.0-rc01

15 دسامبر 2021

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

رفع اشکال

  • Now it is allowed to pass negative scroll offsets into LazyListState.scrollToItem() and LazyListState.animateScrollToItem() . ( Iceb90 , b/184252837 )
  • Fixed a bug that caused missing accessibility scroll actions ( I7cbfb )

نسخه 1.1.0-beta04

1 دسامبر 2021

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

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

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

تغییرات API

  • Cleaned up nullability in androidx.core.view ( I7078a , b/204917439 )
  • Experimental APIs were added that allow to consume PointerInputchange as a whole or check whether it was consumed or not. ( I2e59d )
  • Show a magnifier widget when dragging the cursor or selection handles inside text fields. ( I5391e , b/203781358 )

رفع اشکال

  • Fix text handles not moving when IME visibility changes. ( I25f2e )

نسخه 1.1.0-beta03

17 نوامبر 2021

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

تغییرات API

  • Support for horizontal spans was added to LazyVerticalGrid. ( I7e2fa , b/176758183 )
  • Experimental ability to animate Lazy lists item positions was added. There is a new modifier available within LazyItemScope called 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())
          }
      }
    
    • When you provide a key via LazyListScope.item or LazyListScope.items this modifier will enable item reordering animations. Aside from item reordering all other position changes caused by events like arrangement or alignment changes will also be animated. ( I59e7b , b/150812265 )

نسخه 1.1.0-beta02

3 نوامبر 2021

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

رفع اشکال

  • Ripples and other indications will now only be delayed if they are inside a Modifier.scrollable() container, instead of always being delayed for a down event. ( Ibefe0 , b/203141462 )
  • Added experimental BringIntoView API that lets you send a request to parents so that they scroll to bring an item into view ( Ib918d , b/195353459 )

مشارکت خارجی

  • Added Modifier.pointerHoverIcon ( I95f01 )

نسخه 1.1.0-beta01

27 اکتبر 2021

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

رفع اشکال

  • Added experimental BringIntoView API that lets you send a request to parents so that they scroll to bring an item into view ( 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 are released. نسخه 1.1.0-alpha06 حاوی این commit ها است.

تغییرات API

  • A child-less overload for Layout was added, with improved efficiency ( Ib0d9a )
  • SemanticsNodeInteraction.performSemanticsAction now returns the SemanticsNodeInteraction on which the function was called. ( I9e5db )
  • Added performScrollToNode(matcher: SemanticsMatcher) that scrolls a scrollable container to the content that is matched by the given matcher. ( Ic1cb8 )

نسخه 1.1.0-alpha05

29 سپتامبر 2021

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

تغییرات API

رفع اشکال

  • Fixed accessibility support for scrollables (both lazy and non-lazy) with respect to scrolling ( I6cdb0 )

نسخه 1.1.0-alpha04

15 سپتامبر 2021

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

تغییرات API

  • Deprecated performGesture and GestureScope , which have been replaced by performTouchInput and TouchInjectionScope . ( Ia5f3f , b/190493367 )
  • Added touchBoundsInRoot to SemanticsNode that includes the minimum touch target size so that developers can ensure that touch targets meet accessibility minimums. ( I2e14b , b/197751214 )

رفع اشکال

  • Support for stretch overscroll has been added on Android 12 devices. ( Iccf3c , b/171682480 )

نسخه 1.1.0-alpha03

1 سپتامبر 2021

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

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

  • Compose 1.1.0-alpha03 را به روز کرد تا به Kotlin 1.5.30 وابسته باشد. ( I74545 )

تغییرات API

  • Glow effect for scroll has been added. New experimental OverScrollConfiguration API has been added to allow for configuration of the overscroll visual effect. Provide null to turn off the overscroll effect. ( I0c304 , b/171682480 )
  • AwaitPointerEventScope now has withTimeout() and withTimeoutOrNull() ( I507f0 , b/179239764 , b/182397793 )
  • Added test method to get the clipped bounds. ( I6b28e )
  • Added minimum touch target size to ViewConfiguration for use in semantics and pointer input to ensure accessibility. ( Ie861c )

نسخه 1.1.0-alpha02

18 آگوست 2021

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

تغییرات API

نسخه 1.1.0-alpha01

4 آگوست 2021

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

تغییرات API

  • Updated DrawScope#drawImage method that consumes source and destination rects to consume an optional FilterQuality parameter. This is useful for pixel art that is intended to be pixelated when scaled up for pixel based art. Updated BitmapPainter + Image composable to also consume an optional FilterQuality parameter ( Ie4fb0 , b/180311607 )
  • TextField now clears selection when back button is pressed, which matches Android EditText behavior. ( I3ca16 , b/174173645 )
  • Add Cursor Handle. ( I07a82 , b/173016579 )

رفع اشکال

  • Scrolling via semantics actions for lazy lists and regular scrolling components is now animated ( Id9066 , b/190742024 )

مشارکت خارجی

  • LazyVerticalGrid now accepts both horizontal and vertical arrangement parameters. ( If9c92 )

نسخه 1.0

نسخه 1.0.5

3 نوامبر 2021

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

رفع اشکال

  • رفع ردیابی خرابی نمونه‌های مشتق شده ازStateOf. ( aosp/1792247 )

نسخه 1.0.4

13 اکتبر 2021

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

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

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

نسخه 1.0.3

29 سپتامبر 2021

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

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

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

نسخه 1.0.2

1 سپتامبر 2021

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

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

نسخه 1.0.1

4 آگوست 2021

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

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

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

نسخه 1.0.0

28 ژوئیه 2021

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

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

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

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

  • اگر از 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 خود را در فایل build.gradle خود به 24+ افزایش دهید. این مشکل در نسخه بعدی Android Studio Bumblebee و AGP 7.1 برطرف خواهد شد. ( b/194289155 )

نسخه 1.0.0-rc02

14 جولای 2021

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

  • Updated border rendering for generic shapes to address issues with paths defined with fixed dimensions. ( aosp/1748871 , b/191817116 )

نسخه 1.0.0-rc01

1 ژوئیه 2021

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

تغییرات API

  • Canvas now supports a contentDescription parameter for accessibility. ( Ib547c )

رفع اشکال

  • Disabled Button, Card, Checkboxes and overall Modifier.clickable(enabled=false) will block clicks from going up to the parent. ( Ic2c3b , b/183908811 )

نسخه 1.0.0-beta09

16 ژوئن 2021

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

تغییرات API

  • ManualFrameClock حذف شد. اگر نیاز به کنترل انیمیشن ها دارید، به جای آن از composeTestRule.mainClock استفاده کنید. ( I3c3e8 , b/189951065 )
  • change enum Role and LiveRegionMode to inline classes with private constructor ( Id1890 )
  • KeyboardCapitalization is converted into inline class. ( Id5a1c )
  • TextOverflow is changed to an inline class. ( I433af )

رفع اشکال

  • Now when you specify the unique keys for LazyColumn/Row items the scroll position will be maintained based on the key, which means if you add/remove items before the current visible item the item with the given key will be kept as the first visible one . ( Id263f , b/184257857 )
  • Key constants are @ExperimentalComposeUiApi for now. Consuming code can declare private constants prior to stabilization. ( Ia5d48 )
  • Added IdlingStrategy to AndroidComposeTestRule that can be used by testing frameworks to install an alternative mechanism to await or achieve quiescence. Use AndroidComposeTestRule.setIdlingStrategyFactory() before your test starts to install your own strategy. ( 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 یا معادل آن مشخص شده است. فایل در هر خط یک قانون را مشخص می‌کند، که در این مورد یک قانون الگویی برای تطبیق با متدها یا کلاس‌های موجود در کتابخانه است. سینتکس این قوانین یک ابرمجموعه از فرمت نمایه ART قابل خواندن برای انسان است که هنگام استفاده از adb shell profman --dump-classes-and-methods ... استفاده می شود. این قوانین یکی از دو شکل را برای هدف قرار دادن متدها یا کلاس ها دارند.

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

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

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

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

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

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

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

  • متدی که دارای پرچم H است نشان می‌دهد که این روش یک روش داغ است و باید زودتر از موعد کامپایل شود.

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

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

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

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

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

نسخه 1.0.0-beta08

2 ژوئن 2021

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

تغییرات API

  • NestedScrollSource enum is replaced by an inline class. ( Ie321b , b/187055290 )
  • Refactored enum usages to inline classes to avoid issues with exhaustive when statements when new enum values are added. ( I2b5eb )
  • Adds a tap timeout to clickable / toggleable to prevent showing a ripple during a scroll / drag ( Ia2704 , b/168524931 )
  • ContentDescription and Text semantics properties are no longer single values but lists. This enables to merge them as they are instead of concatenations. Also provided better testing APIs to utilize these changes ( Ica6bf , b/184825850 )
  • Modifier.focusModifier() is deprecated and replaced by Modifier.focusTarget() ( I6c860 )
  • KeyboardType enum is replaced by an inline class. ( I73045 , b/187055290 )
  • Replaced FocusState enum with a FocusState interface ( Iccc1a , b/187055290 )
  • ImeAction enum is replaced by an inline class. ( I18be5 , b/187055290 )
  • AnnotatedString.withAnnotation functions are now ExperimentalTextApi instead of ExperimentalComposeApi. ( I0cd0a )
    • TextUnit constructor with TextUnitType is now ExperimentalTextApi instead of ExperimentalComposeApi.
  • PaddingValues is now @Stable rather than @Immutable ( I88c50 )

رفع اشکال

  • Fix crashes of long press the blank area in non-empty text. ( I33ab5 , b/187437299 )
  • Show Toolbar after SelectAll ( I495d9 , b/185919613 )
  • Fix for scrollable containers clipping its children on the cross axis. It was easily reproducible if you have a LazyRow with Card items. now the shadow will not be clipped. ( Icb635 , b/186318448 )
  • Fixed an issue where ripples / other indication would sometimes get stuck on a long click when using Modifier.combinedClickable ( I2298c , b/186223077 )
  • اکنون detectDragGesures ، detectVerticalGestures و detectHorizontalGestures تغییر موقعیت را به طور خودکار مصرف می‌کنند، نیازی به فراخوانی change.consumePositionChange در تماس‌های onDrag نیست ( I42fc4 , b/185096350 , b/187320697 )
  • Modifier.onGloballyPositioned() تغییر کرد تا مختصات این اصلاح کننده را در زنجیره اصلاح کننده گزارش کند، نه مختصات طرح بندی را پس از اعمال همه اصلاح کننده ها. این بدان معنی است که اکنون ترتیب اصلاح کننده ها بر مختصاتی که گزارش می شود تأثیر می گذارد. ( Ieb67d , b/177926591 )

نسخه 1.0.0-beta07

18 مه 2021

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

تغییرات API

رفع اشکال

  • LazyColumn/Row will now keep up to 2 previously visible items active (not disposed) even when they are scrolled out already. This allows the component to reuse the active subcompositions when we will need to compose a new item which improves the scrolling performance. ( Ie5555 )
  • Remove paintBackground. ( I38660 )
  • Draw Selection Background using DrawScope. ( I73c61 , b/186674472 )
  • A beta06 regression affecting Row/Column using spacedBy arrangements to layout weighted children was fixed. ( Ifaf8c , b/187326588 )

نسخه 1.0.0-beta06

5 مه 2021

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

تغییرات API

  • Solve Conflict with Navigation Gesture ( I1145e )
  • Added CollectionInfo and CollectionItemInfo accessibility APIs that allows to mark collection and its items for accessibility services ( Id54ef , b/180479017 )
  • Added SemanticsActions.ScrollToIndex to scroll a list with indexed items to the item with a certain index, and SemanticsProperties.IndexForKey to get the index of an item in a list with keyed items. Both actions are implemented by LazyList.
    • Added SemanticsNodeInteraction.performScrollToIndex that scrolls a list to the given index, and SemanticsNodeInteraction.performScrollToKey that scrolls a list to the item with the given key. ( 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 )

نسخه 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. نسخه 1.0.0-beta05 حاوی این تعهدات است.

تغییرات 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 )
  • فایل‌های AndroidManifest از ui-test-manifest و ui-tooling-data اکنون با 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. نسخه 1.0.0-beta04 حاوی این تعهدات است.

تغییرات 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 )
  • نمونه‌های عمومی RowScope ، ColumnScope ، BoxScope ، BoxWithConstraintsScope حذف شدند. ( 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. نسخه 1.0.0-beta03 حاوی این تعهدات است.

تغییرات 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 )

رفع اشکال

  • اعمال محدودیت در استفاده عمومی از APIهای آزمایشی ( I6aa29 , b/174531520 )

نسخه 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 حاوی این تعهدات است.

این اولین نسخه از 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 با [Mutable]InteractionSource جایگزین شده است
    • رابط ها مسئول انتشار / جمع آوری رویدادهای تعامل هستند.
    • به جای انتقال interactionState = remember { InteractionState() } به مؤلفه هایی مانند Button و Modifier.clickable() ، از interactionSource = remember { MutableInteractionSource() } استفاده کنید.
    • به جای: Interaction.Pressed in interactionState باید از توابع افزونه در InteractionSource مانند InteractionSource.collectIsPressedAsState استفاده کنید.
    • برای موارد استفاده پیچیده می‌توانید از InteractionSource.interactions برای مشاهده جریان Interactions استفاده کنید. برای اطلاعات بیشتر به اسناد و نمونه های InteractionSource مراجعه کنید.
    • ( 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 و scrollBy به 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 )

  • اصلاح کننده های اندازه تغییر نام دادند. Modifier.width/height/size به requireWidth/requiredHeight/requiredSize تغییر نام داد. Modifier.preferredWidth/preferredHeight/preferredSize به 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 )

  • جهت به بسته فونداسیون منتقل شده است. VelocirtTracker از ui.gesture به ui.input.pointer منتقل شد. ( Iff4a8 , b/175294473 )

  • AnimationClockObservable و زیر کلاس ها حذف شده اند. AnimatedFloat حذف شده است. ( 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 اکنون DraggableState را به جای یک لامبدا ساده می پذیرد. می توانید از طریق rememberDraggableState { delta -> } حالت ایجاد کنید تا همان رفتار قبلی را داشته باشید ( 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 اکنون به کلیدهای به خاطر سپردن نیاز دارد تا نشان دهد که چه زمانی باید برای وابستگی‌های جدید، برنامه تشخیص ورودی اشاره‌گر دوباره راه‌اندازی شود. ( 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 )
  • یک عنصر زمینه کوروتین InfiniteAnimationPolicy را معرفی کرد که در انیمیشن های بی نهایت اعمال خواهد شد. به‌طور پیش‌فرض هیچ خط‌مشی نصب نمی‌شود، مگر زمانی که آزمایش‌هایی را با ComposeTestRule اجرا می‌کنید. ( I50ec4 , b/151940543 )
  • Animatable.snapTo و Animatable.stop اکنون توابع تعلیق هستند ( If4288 )
  • ComponentActivity.setContent has moved to androidx.activity.compose.setContent in the androidx.activity:activity-compose module. ( Icf416 )
  • متدهای Destructuring و copy() از چندین کلاس که به ندرت استفاده می‌شدند حذف شده‌اند. ( 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 )

  • مشابه روشی که قبلاً state { 0 } composable را حذف کرده بودیم و اکنون استفاده ای مانند remember { mutableStateOf(0) } را ترویج می کنیم، می خواهیم savedInstanceState { 0 } composable را حذف کنیم. به جای آن باید از rememberSaveable { mutableStateOf(0) } استفاده کنید و اگر نوع مورد استفاده در MutableState را بتوان در 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. استفاده به این صورت خواهد بود: 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 )

  • زمان پخش در انیمیشن اکنون به نانوثانیه نمی رسد ( 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 )

  • () memorySavedInstanceState به memorySaveable() تغییر نام داد و به بسته androidx.compose.runtime.saveable منتقل شد. ( I1366e , b/177338004 )

  • RestorableStateHolder به SaveableStateHolder تغییر نام داد و به بسته androidx.compose.runtime.saveable منتقل شد. روش داخلی RestorableStateProvider به SaveableStateProvider تغییر نام داد. نوع عمومی حذف شد، بنابراین می‌توانید Any را به عنوان کلید ارسال کنید. حاشیه نویسی تجربی دیگر مورد نیاز نیست. ( 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 )

  • مصنوع compose:runtime-dispatch اکنون منسوخ شده است. اکنون می‌توانید MonotonicFrameClock را در compose:runtime و AndroidUiDispatcher را در 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 اکنون منسوخ شده است. لطفا به جای آن از Animatable استفاده کنید. ( 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 و pressIndicaitonGestureFilter منسوخ شده اند. به جای آن از Modifier.clickable یا Modifier.pointerInput با تابع detectTapGestures استفاده کنید. ( 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 )

  • پارامتر توضیحات محتوا به تصویر و نماد اضافه شده است. برای ارائه توضیحات به خدمات دسترسی ( 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 )
  • اکنون می‌توان خارج از ترکیب، قابل کلیک، تغییر و انتخاب ایجاد کرد ( 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 )

  • items(count: Int) روش کارخانه برای محدوده LazyColumn/LazyRow/LazyVerticalGrid. items(items: List) و itemsIndexed(items: List) اکنون توابع افزونه هستند، بنابراین باید هنگام استفاده آنها را به صورت دستی وارد کنید. اضافه بارهای برنامه افزودنی جدید برای آرایه ها: آیتم ها (اقلام: آرایه) و itemsIndexed (آرایه) ( 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. Default is false. ( I0125b , b/152613457 )

رفع اشکال

  • onCommit، onDispose، و onActive به نفع SideEffect و DisposableEffect API های منسوخ شده اند ( 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 اکنون animateFooAsState است، که در آن Foo نوع متغیر متحرک است. به عنوان مثال Float، Dp، Offset، و غیره ( 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 و ()compositionReference اکنون به ترتیب به نفع currentRecomposeScope و memoryCompositionReference منسوخ شده اند. ( I583a8 )

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

  • Duration و Uptime با Long میلی ثانیه جایگزین می شوند و این مرحله وابستگی ورودی اشاره گر به آن کلاس ها را حذف می کند. ( 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 )

  • استفاده از TestCoroutineDispatcher در آزمایش ( I532b6 )

  • PointerInputData را حذف کرد و PointerInputChange را تغییر داد تا تمام فیلدهای PointerInputData را در اختیار آن قرار دهد. PointerInputEvent و PointerInputEventData را داخلی کرد زیرا در هیچ 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 )
  • سرعت اصلاح شده برای داشتن اجزای سازنده و عملیات ریاضی. ( Ib0447 )
  • نام @ExperimentalTesting به @ExperimentalTestApi تغییر نام داد تا با حاشیه‌نویسی‌های مشابه آزمایشی api سازگار باشد ( 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 )

رفع اشکال

  • API Animatable جدید مبتنی بر کوروتین که انحصاری متقابل را در میان انیمیشن های خود تضمین می کند. DecayAnimationSpec جدید برای پشتیبانی از انیمیشن پوسیدگی چند بعدی ( I820f2 ، b/168014930 )
  • Added support for disabled and read-only text fields ( I35279 , b/171040474 , b/166478534 )
  • animate() اکنون با animateAsState() جایگزین شده است که به جای T یک State<T> برمی گرداند. این اجازه می دهد تا عملکرد بهتری داشته باشد، زیرا دامنه ابطال را می توان به جایی که مقدار State خوانده می شود محدود کرد. ( 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 )

  • LazyColumnFor، LazyRowFor، LazyColumnForIndexed و LazyRowForIndexed را منسوخ کنید. به جای آن از LazyColumn و LazyRow استفاده کنید ( I5b48c )

  • برای تعلیق APIهای ورودی اشاره گر، HandlePointerInputScope به AwaitPointerEventScope و handlePointerInput() به awaitPointerEventScope() تغییر نام داد. ( Idf0a1 , b/175142755 )

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

  • حاشیه نویسی ExperimentalPointerInput حذف شد ( 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 در اصلاح کننده های افست اکنون IntOffset را به جای 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 )

  • تابع جدید infiniteRepeatable برای ایجاد 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 )
  • بررسی پرز برای نام‌گذاری و موقعیت پارامتر لامبدا قابل ترکیب، برای بررسی سازگاری با دستورالعمل‌های Compose اضافه شد. همچنین برخی از APIها را با استفاده از children به عنوان نام لامبدای دنباله‌دار خود به content ، بر اساس بررسی و راهنمایی‌های لینت منتقل کرد. ( 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 )
  • تغییر نام Modifier.drawLayer به Modifier.graphicsLayer همچنین طبق بازخورد شورای API، کلاس های مرتبط به GraphicsLayer به روز شد. ( I0bd29 , b/173834241 )
  • <T> was removed from SubcomposeLayout declaration. You can use it without specifying a type now. ( Ib60c8 )
  • فیلدهای زمان و موقعیت PointerInputData را غیر قابل تهی کرد. ( 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 به offset تغییر نام دادند. آنها اکنون به جای 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 )
  • محیط‌های منسوخ شده با پسوند Ambient نام‌گذاری شده‌اند، و با پیروی از سایر دستورالعمل‌های Ambients و Compose API با ویژگی‌های جدید با پیشوند Ambient جایگزین می‌شوند. ( 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 )
  • کنترل زمان در تست ها (TestAnimationClock و کاربردهای آن) اکنون آزمایشی است ( I6ef86 , b/171378521 )
  • ماژول تست رابط کاربری قدیمی و قطعات خرد آن را حذف کنید ( I3a7cb )
  • TextUnit.Inherit is renamed to TextUnit.Unspecified in consistent with other units. ( Ifce19 )
  • رابط Alignment به روز شد و کاربردی شد. ( 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 )

نسخه 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 )
  • پایه AmbientTextStyle، ProvideTextStyle، و AmbientContentColor منسوخ شده است. در عوض از نسخه های جدید موجود در کتابخانه Material استفاده کنید. برای کاربردهای غیر مادی، در عوض باید محیط‌های موضوعی خاص سیستم طراحی خود را ایجاد کنید که می‌تواند در اجزای خود مصرف شود. ( I74acc , b/172067770 )
  • foundation.Text منسوخ شده و با material.Text جایگزین شده است. برای یک API متنی ساده و بدون نظر که مقادیر یک موضوع را مصرف نمی‌کند، به 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 از MeasureScope خارج شد. ( IBf96d , b/171184002 )
  • چندین نماد مرتبط با طرح‌بندی از androidx.compose.ui به 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 )

نسخه 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 )
  • فعال کردن انتقال در ComposeTestRule. حذف گزینه برای فعال کردن مکان نما چشمک زن از 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 )
  • APIهای contentColor() و currentTextStyle() را منسوخ می کند و به ترتیب با محیط های AmbientContentColor و AmbientTextStyle جایگزین می کند. شما می توانید با استفاده از .current در ویژگی ambient، مانند هر محیط دیگری، به مقدار فعلی دسترسی پیدا کنید. این تغییر برای یکپارچگی و اجتناب از داشتن راه های متعدد برای انجام یک کار ایجاد شده است. علاوه بر این، برخی از ویژگی های محیط را برای توصیف بهتر هدف آنها به شرح زیر تغییر نام می دهد:

    • 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 به OnGloballyPositionedModifier و onPositioned() به 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 به Box تغییر نام داد. The previously existing foundation.Box will be deprecated in favor of the new Box in compose.foundation.layout. رفتار جعبه جدید به این صورت است که وقتی چند فرزند دارد بچه ها را روی هم قرار می دهد - این با جعبه قبلی که شبیه به یک ستون رفتار می کرد متفاوت است. ( I94893 , b/167680279 )
  • پارامترهای دکوراسیون جعبه منسوخ شده است. اگر می‌خواهید تزئینات/بالشتک روی جعبه خود داشته باشید، به جای آن از Modifiers (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 )
  • rootAnimationClockFactory، transitionsEnabled، blinkingCursorEnabled و textInputServiceFactory با VisibleForTesting@، API داخلی آنها را بسازید و 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 )
  • ما از وارد کردن استاتیک محتویات حوزه‌های طرح‌بندی (مانند alignWithSiblings در RowScope) جلوگیری کردیم. به جای آن باید از گزینه جایگزین صریح استفاده شود: with(RowScope) { Modifier.alignWithSiblings(FirstBaseline) } . ( i216be ، b/166760797 )

رفع اشکال

  • بسیاری از API های گرافیکی را به روز کرد
    • APIهای تبدیل مقیاس و چرخش به روز شده برای مصرف یک پارامتر Offset برای نشان دادن مختصات محوری به جای پارامترهای شناور جداگانه برای مختصات x/y در DrawScope و DrawTransform
    • متدهای Rect.expandToInclude و Rect.join حذف شدند
    • اسناد Radius به‌روزرسانی شده است که می‌گویند بیضی و بیضوی
    • اسناد اضافه شده برای نشان دادن سازنده عمومی برای کلاس Radius مستقیماً فراخوانی نمی شوند، بلکه در عوض، اشیاء Radius باید از طریق سازنده های تابع خود نمونه سازی شوند.
    • API های RoundRect را برای پرس و جوی topRight، bottomRight، bottomCenter و غیره حذف کرد.
    • Rect.shift به نفع Rect.translate منسوخ شد
    • API های RoundRect.grow و Rect.shrink حذف شدند
    • RoundRect.outerRect به Rect.boundingRect تغییر نام داد
    • روش‌های RoundRect.middleRect/tallMiddleRect/wideMiddleRect و Rect.isStadium حذف شد
    • RoundRect.longestSide به RoundRect.maxDimension تغییر نام داد
    • RoundRect.shortestSide به RoundRect.minDimension تغییر نام داد
    • RoundRect.center را به یک ویژگی به جای یک تابع تغییر داد
    • سازنده RoundRect به‌روزرسانی شد تا ویژگی‌های Radius را به جای پارامترهای فردی برای مقادیر شعاع x/y مصرف کند.
    • APIهای Size که فرض می‌کردند یک مستطیل با مبدا 0.0 است حذف شد
    • یک API تخریب کننده به Radius اضافه شد
    • به جای آن، توابع مختلف برنامه افزودنی RoundRect را منتقل کرد تا ویژگی باشد
    • ( 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 )
  • بسیاری از API های گرافیکی را به روز کرد
    • 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 )

نسخه 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 )
  • استفاده از گرانش به طور مداوم به تراز یا تراز در API های چیدمان تغییر نام داده شد. ( 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 )
  • ManualFrameClock.hasAwaiters اضافه شده است تا ببینند آیا چیزی در انتظار یک قاب از آن ساعت است یا خیر. runWithManualClock به عنوان جایگزینی برای runBlocking هنگام اجرای تست هایی که به یک کتابچه راهنمای کاربر نیاز دارند. TestUiDispatcher.Main که در تست های شما دسترسی آسان به توزیع کننده اصلی UI می دهد.

    مثلا:

    @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 ها است.

نسخه 0.1.0-dev

نسخه 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. نسخه 0.1.0-dev17 شامل این تعهدات است.

تغییرات 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 )
  • افست به یک کلاس درون خطی تبدیل شده است ( 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() به PlacementScope.place() تغییر نام داده شد ، و مکان های قبلی PlacementScope.place() به PlacementScope.placeRelative() تغییر نام داده شد. در نتیجه ، روش PlacementScope.place() به طور خودکار موقعیت را در زمینه های راست به چپ آینه نمی کند. در صورت تمایل ، به جای آن از PlacementScope.placeRelative() استفاده کنید. ( 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 )
  • state { ... } Composable اکنون به نفع تماس های صریح برای remember { mutableStateOf(...) } برای وضوح کاهش می یابد. این امر سطح API کلی و تعداد مفاهیم را برای مدیریت دولت کاهش می دهد و by mutableStateOf() برای نمایندگی املاک کلاس مطابقت دارد. ( 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 اکنون یک کلاس درون خطی است ( 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 )

نسخه 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. نسخه 0.1.0-dev16 شامل این تعهدات است.

تغییرات 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 بسته به 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.Drabbackground به اصلاح کننده تغییر نام داده است. 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
  • اضافه شده monotonicframeanimationclock که شما را قادر می سازد از یک monotonicframeclock به عنوان یک انیمیشن کلکوبایل قابل استفاده باشد تا شکاف بین ساعتهای جدید مبتنی بر Coroutines و API ها را که هنوز از ساعتهای قدیمی مبتنی بر تماس استفاده می کنند استفاده کنید.

    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 )

  • API برای پشتیبانی راست به چپ به روز شده است. LayoutDirectionAmbient اضافه شده است که می تواند برای خواندن و تغییر جهت طرح استفاده شود. modifier.rtl و modifer.ltr حذف شده اند. ( I080B3 )

  • modifier.plus کاهش یافته است ، در عوض از اصلاح کننده استفاده کنید. "سپس" سیگنال قوی تری برای سفارش دارد ، در حالی که تایپ Modifier.padding().background() + anotherModifier ، که زنجیره ای را می شکند و خواندن آن سخت تر است ( 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 )

نسخه 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. نسخه 0.1.0-dev15 شامل این تعهدات است.

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

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

  • برای استفاده از نسخه 0.1.0-dev15 آهنگسازی ، باید وابستگی های خود را با توجه به قطعه های جدید کد که در بالا در اعلام وابستگی ها نشان داده شده است ، به روز کنید.

تغییرات 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. در عوض آنها پارامترهای سازنده را مستقیماً می گیرند. -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. این امر باعث از بین رفتن نوع بازیگران غیر ضروری و اضافه بار روش (برای پشتیبانی از هر دو طولانی و بین المللی) می شود. ( ICA0B4 )
  • Clickable was removed. Use Modifier.clickable ( I84bdf )
  • Added LazyRowItems - Horizontally scrolling analogue of LazyColumnItems ( Ibbcf7 )
  • API های انیمیشن بدون تابش سطح پایین را معرفی کرد. این API ها ( 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 )
  • استفاده از INTPX را با int جایگزین کرد. intpxposition را با intoffset جایگزین کرد. intpxsize را با intsize جایگزین کرد. ( IB7B44 )
  • androidx.ui.foundation.shape.RectangleShape removed; use androidx.ui.graphics.RectangleShape ( I94939 , b/154507984 )
  • به منظور ادغام تعداد کلاسهای مورد استفاده برای نشان دادن اطلاعات اندازه ، استاندارد سازی در استفاده از کلاس اندازه به جای pxsize. این مزایای یک کلاس درون خطی را برای استفاده از مقادیر شناور طولانی برای بسته بندی 2 به منظور نشان دادن عرض و ارتفاع نشان داده شده به عنوان شناور فراهم می کند. ( IC0191 )
  • به منظور ادغام تعداد کلاسهای مورد استفاده برای نشان دادن اطلاعات موقعیت یابی ، استاندارد سازی در استفاده از کلاس افست به جای pxposition. این مزایای یک کلاس درون خطی را برای بهره گیری از مقادیر طولانی برای بسته بندی 2 برای نشان دادن جبران های x و y که به عنوان شناور نشان داده شده است ، فراهم می کند. ( 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 )
  • استفاده جایگزین از کلاس PX در کلاسهای مختلف آهنگسازی به عنوان بخشی از تلاش بزرگ برای تکیه بر DP و انواع ابتدایی برای پارامترهای پیکسل ( 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 )
  • پیاده سازی های Convasscope تلفیقی ، بنابراین اکنون فقط DrawScope و ContentDrawScope با نام Canvasscope به Drawscope تغییر نام داده شده است. DrawScope به روز شده برای پیاده سازی رابط چگالی و ارائه زیر کلاس DrawScope Drawscope Drawingdirection در Painter و Paintermodifier به روز شده است تا دیگر یک ویژگی RTL خود را حفظ نکنند ، زیرا DrawScope این کار را بدون ارائه دستی ارائه می دهد ( 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 )
  • به روز شده API های سطح بالاتر که یک بوم را در معرض نمایش قرار می دهند تا به جای آن بوم را در معرض دید قرار دهند. این امر نیاز مصرف کنندگان برای حفظ اشیاء رنگ خود را برطرف می کند. برای مشتریانی که هنوز هم به دسترسی به بوم نیاز دارند ، می توانند از روش پسوند drawcanvas استفاده کنند که پاسخگویی به تماس برای صدور دستورات ترسیم با بوم اساسی را فراهم می کند. ( 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 )

  • جایگزین همه رنگهای قابل تهی در API با غیر قابل تهی و از رنگ استفاده می شود. به جای تهی ( 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 )

  • بهبود API DrawModifier:

    • دامنه گیرنده را برای قرعه کشی () ContentDrawScope ایجاد کرد
    • همه پارامترها را در قرعه کشی حذف کرد ()
    • Drawscope دارای رابط کاربری مشابه Canvasscope سابق است
    • ContentDrawScope دارای روش DrawContent () است ( IBACED ، B/152919067 )
  • ColoredRect از بین رفته است. به جای آن Box(Modifier.preferredSize(width, height).drawBackground(color)) . ( 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 )

  • تعویض کننده به علاوه اپراتور با توابع پسوند کارخانه ( 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 )

  • به ترتیب پارامترهای عمودی و افقی به ترتیب به ردیف و ستون اضافه شد. ( 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 به runOnIdle ( I83607 ) تغییر نام داد
  • چندین API آزمایش به شهودی تر تغییر نام دادند. همه API های Findxyz به Onnodexyz تغییر نام دادند. همه API های Doxyz به 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 )

  • استفاده از کلاس PX در کلاس های مختلف آهنگسازی به عنوان بخشی از تلاش بزرگ برای تکیه بر DP و انواع ابتدایی برای پارامترهای پیکسل جایگزین شد. کلاس PX را به طور کامل حذف کرد ( i3ff33 )

  • جایگزین استفاده از کلاس PX در کلاسهای مختلف آهنگسازی به عنوان بخشی از تلاش بزرگ برای تکیه بر DP و انواع ابتدایی برای پارامترهای پیکسل ( I086F4 )

  • جایگزین استفاده از کلاس PX در کلاسهای مختلف آهنگسازی به عنوان بخشی از تلاش بزرگ برای تکیه بر DP و انواع ابتدایی برای پارامترهای پیکسل ( 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 به عنوان 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 و runOnUiThread اکنون به جای روش هایی در ComposetEsture ، توابع جهانی هستند. ( ICBE8F )

  • [MUTABLE] اپراتورهای نماینده املاک دولتی برای پشتیبانی از بهینه سازی نمایندگان ملک Kotlin 1.4 به برنامه های افزودنی منتقل شدند. تماس گیرندگان باید واردات را برای ادامه استفاده by state { ... } یا by mutableStateOf(...) اضافه کنند. ( i5312c )

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

  • Renamed LayoutResult to MeasureResult. ( Id8c68 )

  • مرکز مستهلک شده. باید آن را با LayoutSize.Fill + LayoutAlign.Center تعویض کرد ، یا با یکی از ترکیبات جعبه یا پشته با اصلاح کننده های مناسب اعمال شده ( IDF5E0 )

  • به LayoutFlexible به وزن طرح تغییر نام داد. برای پر کردن به پارامتر تنگ تغییر نام داد. ( 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 به androidx.ui.node.uicomposer androidx.compose.emittable منتقل شده است. با ComponentNode زائد بود. androidx.compose.viewadapters حذف شده است. آنها دیگر مورد استفاده پشتیبانی نیستند. compose.composeintinto کاهش یافته است. به جای آن setContent یا setViewContent استفاده کنید. compose.disposecomposition مستهلک شده است. به جای آن از روش dispose در Composition برگشتی توسط setContent استفاده کنید. 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 )

  • پشتیبانی از جهت راست به چپ در اصلاح کننده LayoutPadding ( I9E8DA )

  • چگالی و تراکم SSCOPE در یک رابط ادغام شدند. به جای محیط () () اکنون می توانید از تراکمباین استفاده کنید. به جای تحمل (چگالی) فقط با (تراکم) ( I11CB1 )

  • کلاس ارزش دار را حذف کرد. بازسازی شده AnimatedValue ، کلاسهای AnimatedFloat برای انتزاع قسمت ارزش انیمیشن به گونه ای که زیر کلاس ها می توانند به روزرسانی ارزش را تماشا کنند.

    • کلاس های مدل اضافه شده برای AnimatedValue ، AnimatedFloat و غیره
    • مجموعه جدیدی از API با وزن کم وزن را برای انیمیشن بین مقادیر اضافه کرد.
    • ( I79530 )
  • شکستن تغییرات در API Ambients. برای جزئیات بیشتر به اسناد ورود به سیستم و Ambient<T> مراجعه کنید ( 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 )