نوشتن انیمیشن

انیمیشن هایی را در برنامه های Jetpack Compose خود بسازید تا تجربه کاربر را غنی تر کنید.
آخرین به روز رسانی انتشار پایدار کاندید را آزاد کنید نسخه بتا انتشار آلفا
4 سپتامبر 2024 1.7.0 - - 1.8.0-alpha01

ساختار

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.animation:animation:1.7.0"
}

android {
    buildFeatures {
        compose true
    }

    composeOptions {
        kotlinCompilerExtensionVersion = "1.5.15"
    }

    kotlinOptions {
        jvmTarget = "1.8"
    }
}

کاتلین

dependencies {
    implementation("androidx.compose.animation:animation:1.7.0")
}

android {
    buildFeatures {
        compose = true
    }

    composeOptions {
        kotlinCompilerExtensionVersion = "1.5.15"
    }

    kotlinOptions {
        jvmTarget = "1.8"
    }
}

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

بازخورد

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

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

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

نسخه 1.8

نسخه 1.8.0-alpha01

4 سپتامبر 2024

androidx.compose.animation:animation-*:1.8.0-alpha01 منتشر شد. نسخه 1.8.0-alpha01 حاوی این تعهدات است.

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

  • API جدید Modifier.animateBounds برای متحرک سازی تغییرات اندازه و موقعیت در یک محدوده چشمگیر. 94b9394

تغییرات API

  • حذف پرچم‌های آزمایشی روی فریم‌های کلیدی با کمان و اسپلاین ( 89e1199 )

رفع اشکال

  • رد شدن از منطق placeHolderSize زمانی که هیچ مطابقی پیدا نشد ( 77c0160 )
  • برای جلوگیری از خرابی به دلیل افزایش زمان پخش غیر یکنواخت، زمان پخش را در AndroidFlingSpline گیره دهید ( 9d47587 )
  • رفع عدم ترسیم موارد SharedTransitionScope در شرایط خاص ( b41077b6 )

مشارکت خارجی

  • از تنظیم playTime قابل جستجوی انتقال زمانی که هیچ انتقالی توسط استیون شوئن در حال اجرا نیست، جلوگیری کنید. ( c2e6e7e6 )

نسخه 1.7

نسخه 1.7.0

4 سپتامبر 2024

androidx.compose.animation:animation-*:1.7.0 منتشر شد.

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

تغییرات مهم در نسخه 1.7.0 در این وبلاگ پوشش داده شده است.

APIهای جدید انتقال عنصر مشترک

  • APIهای جدید انتقال عنصر مشترک در انتظار استفاده و بازخورد شما هستند. این APIهای آزمایشی جدید با استفاده از اصلاح‌کننده‌های ارائه‌شده، طرح‌بندی‌های برچسب‌گذاری را به‌صورت اشتراک‌گذاری شده در درخت طرح‌بندی امکان‌پذیر می‌کنند، و زمانی که یک مجموعه از محتوای اشتراک‌گذاری شده خارج می‌شود و مجموعه دیگری وارد می‌شود، مرزها به آرامی تغییر می‌کنند. ( ICb0b9 )
  • scaleInSharedContentToBounds جدید و scaleOutSharedContentToBounds برای مقیاس بندی محتوا در sharedBounds ( I731c1 )
  • Experimental SharedTransitionScope اکنون یک رابط است تا یک کلاس. ( Iaf856 )
  • resizeModes جدید ( ScaleToBounds و RemeasureToBounds ) برای sharedBounds برای انتخاب بین مقیاس‌گذاری و اندازه‌گیری مجدد. APIهای قبلی scaleIn/OutSharedContentToBounds اکنون منسوخ شده‌اند. ( I0d41a )

بهبودهای APIهای موجود:

  • Modifier.animateContentSize جدید که یک پارامتر اضافی برای هم ترازی محتوای سفارشی می گیرد. ( I5623a , b/269803907 )
  • New Experimental DeferredTargetAnimation برای متحرک سازی اندازه، موقعیت یا هر هدف دیگری که در طول نمونه سازی ناشناخته است. ( I60745 )
  • SeekableTransitionState snapTo() را با seekTo() جایگزین می کند و یک snapTo() اضافه می کند که بدون هیچ گونه انیمیشنی بلافاصله حالت را به حالت مقصد تغییر می دهد.
  • اکنون می توانید یک مقدار periodicBias (Float) را به keyframesWithSpline ارسال کنید، با این کار سرعت اولیه و نهایی spline برابر می شود. مفید برای انیمیشن های قابل تکرار با استفاده از splines. بایاس نشان می دهد که هر سرعت (اولیه و نهایی) چقدر برای دستیابی به تناوب اصلاح می شود. ( Ic1e6c , b/292114811 )

API های زیر پایدار شده اند یا حذف شده اند:

  • AnimatedVisibilityScope.transition اکنون یک API پایدار است. Modifier.animateEnterExit(..) نیز پایدار شده است. ( I6c1d1 )
  • ApproachLayoutModifierNode و Modifier.approachLayout اکنون پایدار هستند، با isMeasurementApproachInProgress() و isPlacementApproachInProgress() جدید به ترتیب جایگزین isMeasurementApproachComplete() قدیمی و isPlacementApproachComplete() .
  • اصلاح کننده منسوخ intermediateLayout حذف شد. ( I3e91c )
  • API های LookaheadScope پایدار شده اند. ( I21507 )

نسخه 1.7.0-rc01

21 آگوست 2024

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

نسخه 1.7.0-beta07

7 آگوست 2024

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

رفع اشکال

  • SharedTransitionScope ثابت کرد که موارد همپوشانی را در طول انتقال در شرایط خاصی ترسیم نمی‌کند، که معمولاً شامل استفاده با Navigation می‌شود. ( Id65ab , b/347520198 )

نسخه 1.7.0-beta06

24 جولای 2024

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

رفع اشکال

  • با پاکسازی صحیح مشاهدات از SnapshotStateObserver در زمانی که انتقال از بین می‌رود، وضعیت‌های انتقال نشت SeekableTransition را برطرف کرد. ( b9c7182 )
  • موارد لبه ثابت که در آن Transition های فرزند به درستی به عنوان کامل علامت گذاری نشده اند، زمانی که والد تکمیل می کند. ( dc42216 )

نسخه 1.7.0-beta05

10 جولای 2024

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

رفع اشکال

  • ویژگی Transition totalDurationNanos اکنون می تواند به درستی در یک snapshotFlow خوانده شود.

نسخه 1.7.0-beta04

26 ژوئن 2024

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

نسخه 1.7.0-beta03

12 ژوئن 2024

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

نسخه 1.7.0-beta02

29 مه 2024

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

نسخه 1.7.0-beta01

14 مه 2024

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

تغییرات API

  • resizeModes جدید ( ScaleToBounds و RemeasureToBounds ) برای sharedBounds برای انتخاب بین مقیاس‌گذاری و اندازه‌گیری مجدد. APIهای قبلی scaleIn/OutSharedContentToBounds اکنون منسوخ شده‌اند. ( I0d41a )

مشارکت خارجی

  • Experimental SharedTransitionScope اکنون یک رابط است تا یک کلاس توسط Steven Schoen. ( Iaf856 , b/338415048 , b/338414702 )

نسخه 1.7.0-alpha08

1 مه 2024

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

تغییرات API

  • API های LookaheadScope پایدار شده اند. ( I21507 )

مشارکت خارجی

  • پاک کردن زمان شروع انیمیشن پس از انیمیشن‌های SeekableTransitionState توسط استیون شوئن ( 1ca89529 )

نسخه 1.7.0-alpha07

17 آوریل 2024

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

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

  • APIهای جدید انتقال عنصر مشترک در انتظار استفاده و بازخورد شما هستند. این APIهای آزمایشی جدید با استفاده از اصلاح‌کننده‌های ارائه‌شده، طرح‌بندی‌های برچسب‌گذاری را به‌صورت اشتراک‌گذاری شده در درخت طرح‌بندی امکان‌پذیر می‌کنند، و زمانی که یک مجموعه از محتوای اشتراک‌گذاری شده خارج می‌شود و مجموعه دیگری وارد می‌شود، مرزها به آرامی تغییر می‌کنند. ( ICb0b9 )
  • scaleInSharedContentToBounds جدید و scaleOutSharedContentToBounds برای مقیاس بندی محتوا در sharedBounds ( I731c1 )

تغییرات API

  • AnimatedVisibilityScope.transition اکنون یک API پایدار است. Modifier.animateEnterExit(..) نیز پایدار شده است. ( I6c1d1 )
  • ApproachLayoutModifierNode و Modifier.approachLayout اکنون پایدار هستند، با isMeasurementApproachInProgress() و isPlacementApproachInProgress() جدید به ترتیب جایگزین isMeasurementApproachComplete() قدیمی و isPlacementApproachComplete() .
  • اصلاح کننده منسوخ intermediateLayout حذف شد. ( I3e91c )
  • اکنون می توانید یک مقدار periodicBias (Float) را به keyframesWithSpline ارسال کنید، با این کار سرعت اولیه و نهایی spline برابر می شود. مفید برای انیمیشن های قابل تکرار با استفاده از splines. بایاس نشان می دهد که هر سرعت (اولیه و نهایی) چقدر برای دستیابی به تناوب اصلاح می شود. ( Ic1e6c , b/292114811 )

رفع اشکال

  • منحنی های کاهش بیش از حد و کم تیراندازی را که قبلاً روی 0..1 بسته می شد ( I38747 ) ثابت کرد.

نسخه 1.7.0-alpha06

3 آوریل 2024

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

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

  • پشتیبانی از ظاهر آیتم و انیمیشن ناپدید شدن به LazyColumn و LazyRow اضافه شد. قبلاً امکان اضافه کردن Modifier.animateItemPlacement() اصلاح کننده برای پشتیبانی از قرار دادن (ترتیب مجدد) انیمیشن ها وجود داشت. ما این اصلاح‌کننده را منسوخ کردیم و یک اصلاح‌کننده غیر تجربی جدید به نام Modifier.animateItem() معرفی کردیم که به شما امکان می‌دهد از هر سه نوع انیمیشن پشتیبانی کنید: ظاهر (fade in)، ناپدید شدن (fade out) و مرتب‌سازی مجدد. ( I2d7f7 , b/330152398 , b/150812265 )

رفع اشکال

  • بهبود عملکرد updateTransition API.

نسخه 1.7.0-alpha05

20 مارس 2024

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

تغییرات API

  • SeekableTransitionState snapTo() را با seekTo() جایگزین می کند و یک snapTo() اضافه می کند که بدون هیچ گونه انیمیشنی بلافاصله حالت را به حالت مقصد تغییر می دهد.

نسخه 1.7.0-alpha04

6 مارس 2024

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

تغییرات API

  • API جدید Path.reverse() برای معکوس کردن جهت مسیر ( I36348 )

نسخه 1.7.0-alpha03

21 فوریه 2024

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

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

  • Modifier.animateContentSize جدید که یک پارامتر اضافی برای هم ترازی محتوای سفارشی می گیرد. ( I5623a , b/269803907 )
  • New Experimental DeferredTargetAnimation برای متحرک سازی اندازه، موقعیت یا هر هدف دیگری که در طول نمونه سازی ناشناخته است. ( I60745 )

نسخه 1.7.0-alpha02

7 فوریه 2024

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

رفع اشکال

  • رفع سازگاری برای KeyframesSpec . ( I2bdf3 , b/322214617 )
  • هنگامی که در LazyList استفاده می شود، Modifier.animateContentSize به درستی بازنشانی نمی شود. ( I070512 , b/322525716 )
  • هنگام استفاده از مهرهای زمانی خارج از محدوده، IllegalStateException در KeyframesSpec برطرف کرد. ( I341b8 , b/322839811 )

نسخه 1.7.0-alpha01

24 ژانویه 2024

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

نسخه 1.6

نسخه 1.6.8

12 ژوئن 2024

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

نسخه 1.6.7

1 مه 2024

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

نسخه 1.6.6

17 آوریل 2024

androidx.compose.animation:animation-*:1.6.6 منتشر شد. هیچ تغییری نسبت به نسخه قبلی وجود ندارد

نسخه 1.6.5

3 آوریل 2024

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

نسخه 1.6.4

20 مارس 2024

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

نسخه 1.6.3

6 مارس 2024

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

نسخه 1.6.2

21 فوریه 2024

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

نسخه 1.6.1

7 فوریه 2024

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

رفع اشکال

نسخه 1.6.0

24 ژانویه 2024

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

نسخه 1.6.0-rc01

10 ژانویه 2024

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

نسخه 1.6.0-beta03

13 دسامبر 2023

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

تغییرات API

  • scaleInToFitContainer و scaleOutToFitContainer به طور موقت از AnimatedContentTransitionScope حذف شدند زیرا نیاز به نگاه پیش رو دارند. زمانی که Lookahead به طور پیش‌فرض روشن باشد یا در نسخه‌های بعدی شرکت کرده باشد، در دسترس خواهند بود.

نسخه 1.6.0-beta02

29 نوامبر 2023

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

نسخه 1.6.0-beta01

15 نوامبر 2023

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

تغییرات API

  • ExitTransition.Hold به ExitTransition.KeepUntilTransitionsFinished تغییر نام داده است تا واضح تر باشد. ( I1c490 )
  • اکنون می توانید از keyframesWithSpline برای درون یابی هر مقدار N بعدی با استفاده از خطوط یکنواخت استفاده کنید. به ویژه برای درونیابی مقادیر موقعیتی مانند Offset ، IntOffset ، DpOffset مفید است. به عنوان API آزمایشی اضافه شد.

رفع اشکال

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

نسخه 1.6.0-alpha08

18 اکتبر 2023

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

تغییرات API

  • KeyframesSpecConfig#with نفع KeyframesSpecConfig#using که الگوی سازنده را حفظ می کند. ( I1d769 )

نسخه 1.6.0-alpha07

4 اکتبر 2023

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

تغییرات API

  • تبوهای ثابت و قابل پیمایش اکنون دارای انواع اولیه و ثانویه هستند. اینها به درستی با رفتار رنگ و نشانگر همانطور که در Material3 تعریف شده است، نگاشت می شوند.
  • PrimaryScrollableTabRow و SecondaryScrollableTabRow اکنون وضعیت اسکرول را نشان می دهند. ( Iec8f5 , b/260572337 )

نسخه 1.6.0-alpha06

20 سپتامبر 2023

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

نسخه 1.6.0-alpha05

6 سپتامبر 2023

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

تغییرات API

  • PathEasing را برای فعال کردن یک مسیر دلخواه برای ارائه به منحنی کاهش اضافه کرد. ( Idb4b9 )

نسخه 1.6.0-alpha04

23 آگوست 2023

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

تغییرات API

  • SeekableTransitionState را اضافه کنید تا به توسعه دهندگان اجازه دهید پیشرفت یک انتقال را کنترل کنند. ( I8e69d )

نسخه 1.6.0-alpha03

9 آگوست 2023

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

تغییرات API

  • نوع جدیدی از انتقال ورود/خروج که محتوا را بر اساس اندازه محفظه متحرک در طول انیمیشن ورود و خروج مقیاس می‌دهد. سرگرمی و رابط کاربری LookaheadScope Composable اکنون پایدار هستند. ( Ifb2ce )

نسخه 1.6.0-alpha02

26 جولای 2023

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

تغییرات API

  • ExitTransition.Hold جدید برای نمایش محتوای خروجی در AnimatedContent تا زمانی که انتقال ورود و خروج تمام شود. ( I5984f )
  • حاشیه نویسی های اضافی برای تعیین ورودی های مجاز به composable ها ( I51109 )

نسخه 1.6.0-alpha01

21 ژوئن 2023

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

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

  • Modifier.animateContentSize و AnimatedVisibility را برای ادغام کامل در سیستم lookahead با گزارش اندازه مورد نظر در passeahead فعال کنید.

تغییرات API

  • ویژگی جدید در IntrinsincMeasureScope و پیاده‌سازی‌های آن (مثلا MeasureScope ) برای نشان دادن اینکه آیا معیار فعلی یک پاس پیش‌بینی است یا خیر. ( I7a812 )

رفع اشکال

  • تخصیص ها از انیمیشن های بهار حذف شد. ( Ie9431 )
  • نام پارامتر مقدار برای Enum.valueOf تغییر کرد ( Ia9b89 )
  • استثناهای پرتاب شده بیشتر از enum valueOf ( I818fe )

نسخه 1.5

نسخه 1.5.4

18 اکتبر 2023

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

نسخه 1.5.3

4 اکتبر 2023

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

نسخه 1.5.2

27 سپتامبر 2023

androidx.compose.animation:animation-*: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.1

6 سپتامبر 2023

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

نسخه 1.5.0

9 آگوست 2023

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

نسخه 1.5.0-rc01

26 جولای 2023

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

رفع اشکال

  • مشکلی را برطرف کرد که در آن فراخوانی .value در یک نوع حالت اولیه (مانند MutableIntState ) یک اخطار پرز با یک اصلاح نامعتبر گزارش می‌کرد. بازرسی اکنون مهاجرت به دارایی صحیح را توصیه می کند. ( Iba953 , b/287279257 )

  • یک بازرسی اختیاری برای توصیه مهاجرت فراخوانی 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.animation:animation-*:1.5.0-beta03 منتشر شد. نسخه 1.5.0-beta03 حاوی این تعهدات است.

نسخه 1.5.0-beta02

7 ژوئن 2023

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

نسخه 1.5.0-beta01

24 مه 2023

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

تغییرات API

  • تخصیص‌های حذف شده در ترکیب مجدد، انیمیشن‌های رنگی و AndroidComposeView ( Ib2bfa )

رفع اشکال

  • تخصیص های حذف شده از انیمیشن های بهار ( Ie9431 )

نسخه 1.5.0-alpha04

10 مه 2023

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

تغییرات API

  • ContentKey اکنون در AnimatedContent پشتیبانی می‌شود تا امکان کنترل بیشتر برای زمان انجام انتقال را فراهم کند. ( IC069b )

نسخه 1.5.0-alpha03

19 آوریل 2023

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

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

  • رفتار پیش‌فرض جدید برای SubcomposeLayout در LookaheadScope . این به SubcomposeLayouts که اسلات های شرطی ندارند (مانند TabRow ، Scaffold ، BoxWithConstraints ، و غیره) اجازه می دهد تا به خوبی با انیمیشن های lookahead کار کنند.

تغییرات API

  • intermediateMeasurePolicy پیش‌فرض جدید که از خط مشی اندازه‌گیری مجدد استفاده می‌کند، به زیرگروه‌های SubcomposeLayout بدون شکاف‌های شرطی مانند Scaffold ، TabRow و BoxWithConstraints اجازه می‌دهد تا به طور پیش‌فرض با lookahead کار کنند. ( ID84c8 )
  • تغییر نام infix fun با به togetherWith برای ترکیب انتقال ورود و خروج. AnimatedContentScope جدید به عنوان گیرنده برای محتوای لامبدا. ( IC39ae )

نسخه 1.5.0-alpha02

5 آوریل 2023

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

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

  • API آزمایشی جدید برای پشتیبانی از lookahead در SubcomposeLayout . این به SubcomposeLayout اجازه می دهد تا در یک LookaheadScope به درستی عمل کند. پشتیبانی بیشتر خارج از جعبه برای انواع فرعی خاص SubcomposeLayout به زودی ارائه خواهد شد.

تغییرات API

  • SubcomposeLayout API جدید که یک سیاست اندازه گیری میانی اضافی را برای مدیریت منطق اندازه گیری/طرح بندی در طول انیمیشن های مبتنی بر نگاه پیش بینی می کند. ( I017d3 )

نسخه 1.5.0-alpha01

22 مارس 2023

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

تغییرات API

  • AnimatedContent APIها اکنون پایدار هستند AnimatedContentScope به AnimatedContentTransitionScope تغییر نام داده است. scaleIn و scaleOut اکنون APIهای پایدار هستند. ( Iaf54e )

نسخه 1.4

نسخه 1.4.3

3 مه 2023

androidx.compose.animation:animation:1.4.3 ، androidx.compose.animation:animation-core:1.4.3 ، androidx.compose.animation:animation-graphics:1.4.3 بدون هیچ تغییری منتشر شده اند (فقط یک نسخه برجستگی ).

نسخه 1.4.2

19 آوریل 2023

androidx.compose.animation:animation:1.4.2 ، androidx.compose.animation:animation-core:1.4.2 و androidx.compose.animation:animation-graphics:1.4.2 بدون تغییر منتشر شده اند. نسخه 1.4.2 حاوی این commit ها است.

نسخه 1.4.1

5 آوریل 2023

androidx.compose.animation:animation:1.4.1 ، androidx.compose.animation:animation-core:1.4.1 و androidx.compose.animation:animation-graphics:1.4.1 بدون تغییر منتشر شده اند. نسخه 1.4.1 حاوی این commit ها است.

نسخه 1.4.0

22 مارس 2023

androidx.compose.animation:animation:1.4.0 ، androidx.compose.animation:animation-core:1.4.0 و androidx.compose.animation:animation-graphics:1.4.0 منتشر شدند. نسخه 1.4.0 حاوی این commit ها است.

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

  • برچسب ابزار در r ememberInfiniteTransition و تمام توابع افزونه در InfiniteTransition و Transition (به عنوان مثال InfiniteTransition#animateColor ) پشتیبانی می شود ( I56ef7 )

نسخه 1.4.0-rc01

8 مارس 2023

androidx.compose.animation:animation:1.4.0-rc01 , androidx.compose.animation:animation-core:1.4.0-rc01 و androidx.compose.animation:animation-graphics:1.4.0-rc01 بدون هیچگونه انتشار تغییر می کند. نسخه 1.4.0-rc01 حاوی این commit ها است.

نسخه 1.4.0-beta02

22 فوریه 2023

androidx.compose.animation:animation:1.4.0-beta02 , androidx.compose.animation:animation-core:1.4.0-beta02 و androidx.compose.animation:animation-graphics:1.4.0-beta02 بدون ارائه تغییر می کند. نسخه 1.4.0-beta02 حاوی این تعهدات است.

نسخه 1.4.0-beta01

8 فوریه 2023

androidx.compose.animation:animation:1.4.0-beta01 ، androidx.compose.animation:animation-core:1.4.0-beta01 و androidx.compose.animation:animation-graphics:1.4.0-beta01 بدون تغییر می کند. نسخه 1.4.0-beta01 حاوی این تعهدات است.

نسخه 1.4.0-alpha05

25 ژانویه 2023

androidx.compose.animation:animation:1.4.0-alpha05 ، androidx.compose.animation:animation-core:1.4.0-alpha05 و androidx.compose.animation:animation-graphics:1.4.0-alpha05 منتشر شدند. نسخه 1.4.0-alpha05 حاوی این commit ها است.

تغییرات

  • هیچ تغییری در کتابخانه‌های انیمیشن از زمان آخرین آلفا، فقط نسخه برآمده وجود ندارد

نسخه 1.4.0-alpha04

11 ژانویه 2023

androidx.compose.animation:animation:1.4.0-alpha04 ، androidx.compose.animation:animation-core:1.4.0-alpha04 و androidx.compose.animation:animation-graphics:1.4.0-alpha04 منتشر شدند. نسخه 1.4.0-alpha04 حاوی این commit ها است.

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

  • برچسب ابزار در rememberInfiniteTransition و تمام توابع افزونه در InfiniteTransition و Transition پشتیبانی می‌شود (به عنوان مثال InfiniteTransition#animateColor ) ( I56ef7 )

تغییرات API

  • InfiniteTransition#TransitionAnimationState و InfiniteTransition#animations API اکنون عمومی هستند. ( I36682 )

نسخه 1.4.0-alpha03

7 دسامبر 2022

androidx.compose.animation:animation:1.4.0-alpha03 ، androidx.compose.animation:animation-core:1.4.0-alpha03 و androidx.compose.animation:animation-graphics: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 )
  • پارامتر جدید در AnimatedContent برای برچسب ابزار ( Iebe2d )

نسخه 1.4.0-alpha02

9 نوامبر 2022

androidx.compose.animation:animation:1.4.0-alpha02 ، androidx.compose.animation:animation-core:1.4.0-alpha02 و androidx.compose.animation:animation-graphics:1.4.0-alpha02 منتشر شدند. نسخه 1.4.0-alpha02 حاوی این commit ها است.

تغییرات API

  • ToolingState را اضافه کنید تا به ابزار اجازه دهید حالت های داخلی Composable را تغییر دهد ( Ie6614 )

نسخه 1.4.0-alpha01

24 اکتبر 2022

androidx.compose.animation:animation:1.4.0-alpha01 ، androidx.compose.animation:animation-core:1.4.0-alpha01 و androidx.compose.animation:animation-graphics:1.4.0-alpha01 منتشر شدند. نسخه 1.4.0-alpha01 حاوی این commit ها است.

رفع اشکال

  • رفع انیمیشن وقفه نادرست در AnimatedContent ( b/238662479 )

نسخه 1.3

نسخه 1.3.3

11 ژانویه 2023

androidx.compose.animation:animation:1.3.3 ، androidx.compose.animation:animation-core:1.3.3 و androidx.compose.animation:animation-graphics:1.3.3 منتشر شده است. نسخه 1.3.3 حاوی این commit ها است.

  • از نسخه 1.3.2 تغییری ایجاد نشده است.

نسخه 1.3.2

7 دسامبر 2022

androidx.compose.animation:animation:1.3.2 ، androidx.compose.animation:animation-core:1.3.2 و androidx.compose.animation:animation-graphics:1.3.2 منتشر شدند. نسخه 1.3.2 حاوی این commit ها است.

رفع اشکال

  • به روز شده برای پشتیبانی از androidx.compose.ui 1.3.2

نسخه 1.3.1

9 نوامبر 2022

androidx.compose.animation:animation:1.3.1 ، androidx.compose.animation:animation-core:1.3.1 و androidx.compose.animation:animation-graphics:1.3.1 منتشر شدند. نسخه 1.3.1 حاوی این commit ها است.

نسخه 1.3.0

24 اکتبر 2022

androidx.compose.animation:animation:1.3.0 ، androidx.compose.animation:animation-core:1.3.0 و androidx.compose.animation:animation-graphics:1.3.0 منتشر شدند. نسخه 1.3.0 شامل این commit ها است.

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

  • مجموعه جدیدی از عملکردهای تسهیل کننده پایدار هستند

نسخه 1.3.0-rc01

5 اکتبر 2022

androidx.compose.animation:animation:1.3.0-rc01 ، androidx.compose.animation:animation-core:1.3.0-rc01 و androidx.compose.animation:animation-graphics:1.3.0-rc01 منتشر شدند. نسخه 1.3.0-rc01 حاوی این commit ها است.

نسخه 1.3.0-beta03

21 سپتامبر 2022

androidx.compose.animation:animation:1.3.0-beta03 ، androidx.compose.animation:animation-core:1.3.0-beta03 و androidx.compose.animation:animation-graphics:1.3.0-beta03 منتشر شدند. نسخه 1.3.0-beta03 حاوی این تعهدات است.

  • هیچ تغییری از نسخه 1.3.0-beta02 وجود ندارد.

نسخه 1.3.0-beta02

7 سپتامبر 2022

androidx.compose.animation:animation:1.3.0-beta02 ، androidx.compose.animation:animation-core:1.3.0-beta02 و androidx.compose.animation:animation-graphics:1.3.0-beta02 منتشر شدند. نسخه 1.3.0-beta02 حاوی این تعهدات است.

  • Kotlin.experimental را از گزینه های کامپایلر حذف کرد زیرا از بین رفته است

نسخه 1.3.0-beta01

24 آگوست 2022

androidx.compose.animation:animation:1.3.0-beta01 ، androidx.compose.animation:animation-core:1.3.0-beta01 و androidx.compose.animation:animation-graphics:1.3.0-beta01 منتشر شدند. نسخه 1.3.0-beta01 حاوی این تعهدات است.

نسخه 1.3.0-alpha03

10 آگوست 2022

androidx.compose.animation:animation:1.3.0-alpha03 ، androidx.compose.animation:animation-core:1.3.0-alpha03 ، androidx.compose.animation:animation-graphics:1.3.0-alpha03 منتشر شده است. نسخه 1.3.0-alpha03 حاوی این commit ها است.

تغییرات API

  • پارامتر جدید در Crossfade , animateAsState و Animatable برای برچسب ابزار ( Iac08a )
  • تابع atFraction اضافه شده برای تعریف فریم های کلیدی در یک کسری به جای در یک مدت زمان خاص. ( I20c76 , b/232059455 )

نسخه 1.3.0-alpha02

27 جولای 2022

androidx.compose.animation:animation:1.3.0-alpha02 ، androidx.compose.animation:animation-core:1.3.0-alpha02 و androidx.compose.animation:animation-graphics:1.3.0-alpha02 منتشر شدند. نسخه 1.3.0-alpha02 حاوی این commit ها است.

نسخه 1.3.0-alpha01

29 ژوئن 2022

androidx.compose.animation:animation:1.3.0-alpha01 ، androidx.compose.animation:animation-core:1.3.0-alpha01 و androidx.compose.animation:animation-graphics:1.3.0-alpha01 منتشر شدند. نسخه 1.3.0-alpha01 حاوی این commit ها است.

تغییرات API

  • LookaheadLayout جدید که از یک پاس پیش بینی قبل از اندازه گیری/طرح واقعی پشتیبانی می کند. این اجازه می دهد تا زمانی که چیدمان تغییر می کند، از قبل محاسبه شود، در حالی که به اندازه گیری/طرح بندی پس از پیش بینی اجازه می دهد تا از اندازه/موقعیت از پیش محاسبه شده برای متحرک سازی اندازه و موقعیت ها به سمت هدف استفاده کند. SubcomposeLayouts هنوز پشتیبانی نمی‌شود، اما در نسخه‌های بعدی عرضه خواهد شد. ( I477f5 )

نسخه 1.2

نسخه 1.2.1

10 آگوست 2022

androidx.compose.animation:animation:1.2.1 ، androidx.compose.animation:animation-core:1.2.1 و androidx.compose.animation:animation-graphics:1.2.1 منتشر شد. نسخه 1.2.1 حاوی این commit ها است.

نسخه 1.2.0

27 جولای 2022

androidx.compose.animation:animation:1.2.0 ، androidx.compose.animation:animation-core:1.2.0 و androidx.compose.animation:animation-graphics:1.2.0 منتشر شدند. نسخه 1.2.0 حاوی این commit ها است.

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

  • انیمیشن نوشتن اکنون از تنظیمات «مقیاس مدت انیماتور» از گزینه‌های برنامه‌نویس پشتیبانی می‌کند.
  • انتخاب بزرگی از منحنی‌های آسان‌سازی تجربی جدید.
  • AnimatedImageVector اکنون از repeatCount و repeatMode پشتیبانی می کند

نسخه 1.2.0-rc03

29 ژوئن 2022

androidx.compose.animation:animation:1.2.0-rc03 ، androidx.compose.animation:animation-core:1.2.0-rc03 و androidx.compose.animation:animation-graphics:1.2.0-rc03 منتشر شدند. نسخه 1.2.0-rc03 حاوی این commit ها است.

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

نسخه 1.2.0-rc02

22 ژوئن 2022

androidx.compose.animation:animation:1.2.0-rc02 ، androidx.compose.animation:animation-core:1.2.0-rc02 و androidx.compose.animation:animation-graphics:1.2.0-rc02 منتشر شدند. نسخه 1.2.0-rc02 حاوی این commit ها است.

رفع اشکال

  • حاشیه نویسی ExperimentalEasingApi در توابع Easing حذف شد ( Ied441 )

نسخه 1.2.0-rc01

15 ژوئن 2022

androidx.compose.animation:animation:1.2.0-rc01 ، androidx.compose.animation:animation-core:1.2.0-rc01 و androidx.compose.animation:animation-graphics:1.2.0-rc01 منتشر شدند. نسخه 1.2.0-rc01 حاوی این commit ها است.

تغییرات API

  • رابط‌ها در کتابخانه‌های کامپوزی اکنون با استفاده از روش‌های رابط پیش‌فرض jdk8 ساخته می‌شوند ( I5bcf1 )

نسخه 1.2.0-beta03

1 ژوئن 2022

androidx.compose.animation:animation:1.2.0-beta03 ، androidx.compose.animation:animation-core:1.2.0-beta03 و androidx.compose.animation:animation-graphics:1.2.0-beta03 منتشر شدند. نسخه 1.2.0-beta03 حاوی این تعهدات است.

تغییرات API

  • منحنی‌های ساده‌سازی تجربی برای انیمیشن‌ها اضافه شد ( I64a38 )

نسخه 1.2.0-beta02

18 مه 2022

androidx.compose.animation:animation:1.2.0-beta02 ، androidx.compose.animation:animation-core:1.2.0-beta02 و androidx.compose.animation:animation-graphics:1.2.0-beta02 منتشر شدند. نسخه 1.2.0-beta02 حاوی این تعهدات است.

نسخه 1.2.0-beta01

11 مه 2022

androidx.compose.animation:animation:1.2.0-beta01 ، androidx.compose.animation:animation-core:1.2.0-beta01 و androidx.compose.animation:animation-graphics:1.2.0-beta01 منتشر شدند. نسخه 1.2.0-beta01 حاوی این تعهدات است.

  • این اولین نسخه بتا 1.2 است! هیچ تغییری از آخرین آلفا وجود ندارد.

نسخه 1.2.0-alpha08

20 آوریل 2022

androidx.compose.animation:animation:1.2.0-alpha08 ، androidx.compose.animation:animation-core:1.2.0-alpha08 ، و androidx.compose.animation:animation-graphics:1.2.0-alpha08 آزاد می شوند. نسخه 1.2.0-alpha08 شامل این تعهدات است.

نسخه 1.2.0-alpha07

6 آوریل 2022

androidx.compose.animation:animation:1.2.0-alpha07 ، androidx.compose.animation:animation-core:1.2.0-alpha07 ، و androidx.compose.animation:animation-graphics:1.2.0-alpha07 منتشر می شود. نسخه 1.2.0-alpha07 شامل این تعهدات است.

API تغییر می کند

  • AnimatedImageVector اکنون از repeatCount و repeatMode پشتیبانی می کند ( IA3E75 ، B/199304067 )

نسخه 1.2.0-alpha06

23 مارس 2022

androidx.compose.animation:animation:1.2.0-alpha06 ، androidx.compose.animation:animation-core:1.2.0-alpha06 ، و androidx.compose.animation:animation-graphics:1.2.0-alpha06 منتشر می شود. نسخه 1.2.0-alpha06 شامل این تعهدات است.

API تغییر می کند

  • در صورتی که جهت طرح فعلی RTL باشد ، تجزیه و تحلیل بردار برای پشتیبانی از آینه سازی خودکار برای تلنگر محتوای یک VectorPainter . ( i79cd9 ، b/185760237 )

رفع اشکال

  • API های گرافیکی بردار به روز شده برای استفاده از حاشیه نویسی مناسب @VectorComposable به جای @UiComposable ( I942BC )

نسخه 1.2.0-alpha05

9 مارس 2022

androidx.compose.animation:animation:1.2.0-alpha05 ، androidx.compose.animation:animation-core:1.2.0-alpha05 ، و androidx.compose.animation:animation-graphics:1.2.0-alpha05 آزاد می شوند. نسخه 1.2.0-alpha05 شامل این تعهدات است.

API تغییر می کند

  • هورا! آهنگسازی انیمیشن اکنون از تنظیمات "مقیاس انیماتور" از گزینه های توسعه دهنده پشتیبانی می کند. ( i5a4fc ، b/161675988 )

نسخه 1.2.0-alpha04

23 فوریه 2022

androidx.compose.animation:animation:1.2.0-alpha04 ، androidx.compose.animation:animation-core:1.2.0-alpha04 ، و androidx.compose.animation:animation-graphics:1.2.0-alpha04 منتشر می شود. نسخه 1.2.0-alpha04 شامل این تعهدات است.

نسخه 1.2.0-alpha03

9 فوریه 2022

androidx.compose.animation:animation:1.2.0-alpha03 ، androidx.compose.animation:animation-core:1.2.0-alpha03 ، و androidx.compose.animation:animation-graphics:1.2.0-alpha03 منتشر می شوند. نسخه 1.2.0-alpha03 شامل این تعهدات است.

نسخه 1.2.0-alpha02

26 ژانویه 2022

androidx.compose.animation:animation:1.2.0-alpha02 ، androidx.compose.animation:animation-core:1.2.0-alpha02 ، و androidx.compose.animation:animation-graphics:1.2.0-alpha02 آزاد می شوند. نسخه 1.2.0-alpha02 شامل این تعهدات است.

نسخه 1.2.0-alpha01

12 ژانویه 2022

androidx.compose.animation:animation:1.2.0-alpha01 ، androidx.compose.animation:animation-core:1.2.0-alpha01 ، و androidx.compose.animation:animation-graphics:1.2.0-alpha01 آزاد می شوند. نسخه 1.2.0-alpha01 شامل این تعهدات است.

API تغییر می کند

  • از AnimatedImageVector.animatedVectorResource به جای animatedVectorResource استفاده کنید تا یک فایل منبع <animated-vector> را بارگیری کنید.
    • به جای استفاده از AnimatedImageVector#painterFor برای ارائه یک AnimatedImageVector rememberAnimatedVectorResource . ( i9c300 )

رفع اشکال

  • روشهای toString را به انیمیشن و انیمیشن اضافه کنید. ( ICD3A6 )

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

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

نسخه 1.1

نسخه 1.1.1

23 فوریه 2022

androidx.compose.animation:animation:1.1.1 ، androidx.compose.animation:animation-core:1.1.1 ، و androidx.compose.animation:animation-graphics:1.1.1 منتشر می شود. نسخه 1.1.1 شامل این تعهدات است.

رفع اشکال

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

نسخه 1.1.0

9 فوریه 2022

androidx.compose.animation:animation:1.1.0 ، androidx.compose.animation:animation-core:1.1.0 ، و androidx.compose.animation:animation-graphics:1.1.0 منتشر می شود. نسخه 1.1.0 شامل این تعهدات است.

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

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

نسخه 1.1.0-RC03

26 ژانویه 2022

androidx.compose.animation:animation:1.1.0-rc03 ، androidx.compose.animation:animation-core:1.1.0-rc03 ، و androidx.compose.animation:animation-graphics:1.1.0-rc03 منتشر می شود. نسخه 1.1.0-RC03 شامل این تعهدات است.

رفع اشکال

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

نسخه 1.1.0-RC01

15 دسامبر 2021

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

API تغییر می کند

  • از AnimatedImageVector.animatedVectorResource به جای animatedVectorResource استفاده کنید تا یک فایل منبع <animated-vector> را بارگیری کنید.
    • به جای استفاده از AnimatedImageVector#painterFor برای ارائه یک AnimatedImageVector rememberAnimatedVectorResource . ( i9c300 )

نسخه 1.1.0-beta04

1 دسامبر 2021

androidx.compose.animation:animation:1.1.0-beta04 ، androidx.compose.animation:animation-core:1.1.0-beta04 و androidx.compose.animation:animation-graphics:1.1.0-beta04 منتشر می شود. نسخه 1.1.0-beta04 شامل این تعهدات است.

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

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

نسخه 1.1.0-beta03

17 نوامبر 2021

androidx.compose.animation:animation:1.1.0-beta03 ، androidx.compose.animation:animation-core:1.1.0-beta03 ، و androidx.compose.animation:animation-graphics:1.1.0-beta03 آزاد می شوند. نسخه 1.1.0-beta03 شامل این تعهدات است.

API تغییر می کند

  • اصلاح کننده اصلاح کننده جدید اضافه شده است. بنابراین تغییرات اضافی در جبران اصلاح کننده کودک می تواند بر اساس تغییر قرار دادن مشاهده شده انجام شود. ( i558fd )
  • پشتیبانی جدید برای ContentKey در Crossfade. ContentKey برای بررسی برابری توسط سیستم انیمیشن استفاده خواهد شد. بنابراین می توان از طریق مشخص کردن کلید محتوای مناسب برای کشورهای مختلف ، تفاوتهای سفارشی را در ایالات حاصل کرد.

    ContentKey همچنین به عنوان کلید ذخیره و بازیابی محتوا استفاده می شود. ( I2E055 ، B/197907070 )

نسخه 1.1.0-beta02

3 نوامبر 2021

androidx.compose.animation:animation:1.1.0-beta02 ، androidx.compose.animation:animation-core:1.1.0-beta02 ، و androidx.compose.animation:animation-graphics:1.1.0-beta02 آزاد می شوند. نسخه 1.1.0-beta02 شامل این تعهدات است.

رفع اشکال

  • API های انیمیشن جدید برای پشتیبانی از ابزار. به طور خاص ، آنها به ابزار اجازه می دهند تا انیمیشن ها و تنظیمات آنها را در یک انتقال بازرسی کنند. ( i4116e )

نسخه 1.1.0-beta01

27 اکتبر 2021

androidx.compose.animation:animation:1.1.0-beta01 ، androidx.compose.animation:animation-core:1.1.0-beta01 ، و androidx.compose.animation:animation-graphics:1.1.0-beta01 آزاد می شوند. نسخه 1.1.0-beta01 شامل این تعهدات است.

API تغییر می کند

  • API های انیمیشن جدید برای پشتیبانی از ابزار. به طور خاص ، آنها به ابزار اجازه می دهند تا انیمیشن ها و تنظیمات آنها را در یک انتقال بازرسی کنند. ( i4116e )

نسخه 1.1.0-alpha06

13 اکتبر 2021

androidx.compose.animation:animation:1.1.0-alpha06 ، androidx.compose.animation:animation-core:1.1.0-alpha06 ، و androidx.compose.animation:animation-graphics:1.1.0-alpha06 منتشر می شوند. نسخه 1.1.0-alpha06 شامل این تعهدات است.

نسخه 1.1.0-alpha05

29 سپتامبر 2021

androidx.compose.animation:animation:1.1.0-alpha05 ، androidx.compose.animation:animation-core:1.1.0-alpha05 ، و androidx.compose.animation:animation-graphics:1.1.0-alpha05 منتشر می شوند. نسخه 1.1.0-alpha05 شامل این تعهدات است.

API تغییر می کند

  • EnterTransition ، ExitTransition و برخی از API های AnimatedVisibility پایدار شده اند. MutableTransitionState.isIdle نیز دیگر آزمایشی نیست. ( I5072D )

  • Breaking Change : Lambdas در کارخانه های Enter/ExitTransition به آخرین موقعیت در لیست Param منتقل شده اند. ( I5072D )

نسخه 1.1.0-alpha04

15 سپتامبر 2021

androidx.compose.animation:animation:1.1.0-alpha04 ، androidx.compose.animation:animation-core:1.1.0-alpha04 ، و androidx.compose.animation:animation-graphics:1.1.0-alpha04 منتشر می شوند. نسخه 1.1.0-alpha04 شامل این تعهدات است.

نسخه 1.1.0-alpha03

1 سپتامبر 2021

androidx.compose.animation:animation:1.1.0-alpha03 ، androidx.compose.animation:animation-core:1.1.0-alpha03 ، و androidx.compose.animation:animation-graphics:1.1.0-alpha03 منتشر می شوند. نسخه 1.1.0-alpha03 شامل این تعهدات است.

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

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

نسخه 1.1.0-alpha02

18 آگوست 2021

androidx.compose.animation:animation:1.1.0-alpha02 ، androidx.compose.animation:animation-core:1.1.0-alpha02 ، و androidx.compose.animation:animation-graphics:1.1.0-alpha02 منتشر می شوند. نسخه 1.1.0-alpha02 شامل این تعهدات است.

API تغییر می کند

  • StartOffset اکنون به عنوان راهی برای تأخیر در زمان شروع یا به سرعت به جلو انیمیشن قبل از شروع انیمیشن ، در تکرار و infiniterepeatable پشتیبانی می شود. این شروع شروع تکرار نخواهد شد ( IC679F ، B/195079908 )
  • انتقال/خروج جدید برای مقیاس. می توان از آن در ترکیب با انواع دیگر انتقال/خارج از کشور استفاده کرد. ( i372da ، b/191325593 )

نسخه 1.1.0-alpha01

4 آگوست 2021

androidx.compose.animation:animation:1.1.0-alpha01 ، androidx.compose.animation:animation-core:1.1.0-alpha01 ، و androidx.compose.animation:animation-graphics:1.1.0-alpha01 منتشر می شوند. نسخه 1.1.0-alpha01 شامل این تعهدات است.

API تغییر می کند

  • AnimatedImageVector و API های مرتبط هم اکنون در androidx.compose.animation:animation-graphics Module قرار دارند. ( i60873 )

رفع اشکال

  • InfiniteAnimationPolicy به: آهنگسازی: UI ( I5EB09 ، B/160602714 ) منتقل شد

نسخه 1.0

نسخه 1.0.5

3 نوامبر 2021

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

رفع اشکال

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

نسخه 1.0.4

13 اکتبر 2021

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

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

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

نسخه 1.0.3

29 سپتامبر 2021

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

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

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

نسخه 1.0.2

1 سپتامبر 2021

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

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

نسخه 1.0.1

4 آگوست 2021

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

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

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

نسخه 1.0.0

28 ژوئیه 2021

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

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

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

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

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

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

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

نسخه 1.0.0-RC02

14 جولای 2021

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

نسخه 1.0.0-RC01

1 ژوئیه 2021

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

رفع اشکال

نسخه 1.0.0-beta09

16 ژوئن 2021

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

API تغییر می کند

  • ترکیب جدید AnimatedContent قابل استفاده. این تغییر محتوای خود را با استفاده از محتوای قابل تنظیم ContentTransform با ورود محتوای هدف جدید و ترک محتوای اولیه ، مدیریت می کند. از ترکیب متفاوتی از انتقال Enter و Exit می توان برای تولید ظاهری و احساس سفارشی استفاده کرد. به عنوان بخشی از تبدیل محتوا ، AnimatedContent به طور خودکار اندازه خود را برای مطابقت با محتوای ورودی متحرک می کند. ( I2C3DF )
  • ManualFrameClock حذف کرد. اگر نیاز به کنترل انیمیشن ها دارید ، به جای آن از composeTestRule.mainClock استفاده کنید. ( i3c3e8 ، b/189951065 )

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

نسخه 1.0.0-beta08

2 ژوئن 2021

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

رفع اشکال

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

نسخه 1.0.0-beta07

18 مه 2021

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

API تغییر می کند

  • API جدید AnimatedVisibility که از دید برای مشخص شدن در یک MutableTransitionState پشتیبانی می کند. این همچنین اجازه می دهد تا حالت های انیمیشن از طریق currentState و isIdle به صورت بیرونی از AnimatedVisibility مشاهده شوند.
    • پشتیبانی جدید انتقال کودک در انتقال
    • پشتیبانی از خروج سفارشی/وارد کردن انیمیشن انتقال در AnimatedIsitability با استفاده از AnimationsCope.Transition
    • اصلاح کننده جدید AnimateEnterExit برای همه کودکان AnimatedVisibility قابل دسترسی است
    • API های انیمیشن را که یک پارامتر initiallyVisible قابل مشاهده است ، کاهش داد ( I702F3 )

نسخه 1.0.0-beta06

5 مه 2021

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

نسخه 1.0.0-beta05

21 آوریل 2021

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

رفع اشکال

  • پرونده های AndroidManifest از UI-Test-Manifest و Ui-Tooling-Data اکنون با Android 12 سازگار است ( I6F9DE ، B/184718994 )

نسخه 1.0.0-beta04

7 آوریل 2021

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

API تغییر می کند

  • موارد عمومی RowScope ، ColumnScope ، BoxScope ، BoxWithConstraintsScope برداشته شد. ( i4e83e ، b/181869067 )

نسخه 1.0.0-beta03

24 مارس 2021

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

نسخه 1.0.0-beta02

10 مارس 2021

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

رفع اشکال

  • اجرای محدودیت در استفاده عمومی از API های آزمایشی ( I6AA29 ، B/174531520 )

نسخه 1.0.0-beta01

24 فوریه 2021

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

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

API تغییر می کند

  • InteractionState با [Mutable]InteractionSource جایگزین شده است
    • رابط ها وظیفه انتشار / جمع آوری رویدادهای تعامل را بر عهده دارند.
    • به جای عبور interactionState = remember { InteractionState() } به مؤلفه هایی مانند Button و Modifier.clickable() ، از interactionSource = remember { MutableInteractionSource() } .
    • به جای: Interaction.Pressed in interactionState شما باید در عوض از توابع پسوند در تعامل استفاده کنید ، مانند interactionSource.CollectIspressedAsState ().
    • برای موارد استفاده پیچیده می توانید از تعامل استفاده کنید. برای مشاهده جریان تعامل. برای اطلاعات بیشتر به اسناد و نمونه های تعامل و نمونه ها مراجعه کنید.
    • ( i85965 ، b/152525426 ، b/171913923 ، b/171710801 ، b/174852378 )
  • بسته های روشهای SmoothsCrollby و Scrollby به androidx.compose.foundation.gestures.* ( I3F7C1 ، B/175294473 )
  • اصلاح کننده های اندازه تغییر نام دادند. اصلاح کننده. عرض/ارتفاع/اندازه به عرض مورد نیاز/مورد نیاز/مورد نیاز تغییر نام داده شد. اصلاح کننده. preferredwidth/preferredheight/preferredsize به عرض/ارتفاع/اندازه تغییر نام داده شد. ( i5b414 )
  • جهت گیری به بسته بنیاد منتقل شده است. VelocirtTracker از ui.gesture به ui.input.pointer منتقل شد. ( IFF4A8 ، B/175294473 )
  • AnimationClockObservable و زیر کلاس ها حذف شده اند. AnimatedFloat برداشته شده است. ( ICDE52 ، B/177457083 )
  • modifier.draggable اکنون به جای یک لامبدا ساده ، draggablestate را می پذیرد. برای به دست آوردن همان رفتار مانند گذشته می توانید حالت را از طریق rememberDraggableState { delta -> } ایجاد کنید ( ICA70F ، b/175294473 )
  • Animate ، AnimatedValue ، AnimatedValue API برداشته شده است ( IF27BC ، B/177457083 )
  • AnimationEndReason.Interpreated حذف می شود. در صورت قطع انیمیشن ، لغو اکسپیسم پرتاب می شود. ( i2cbbc ، b/179695417 )
  • API TargetAnimation حذف شده است. ( IF47D1 ، B/177457083 )

نسخه 1.0.0-alpha12

10 فوریه 2021

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

API تغییر می کند

  • Modifier.pointerInput اکنون به کلیدهای یادآوری نیاز دارد تا نشان دهد چه زمانی Coroutine تشخیص ورودی نشانگر باید برای وابستگی های جدید مجدداً راه اندازی شود. ( i849cd )
  • مرزها به DPRECT تغییر نام داده است ( I4B32A )
  • یک نام پارام برای AnimationsPec به AnimationsPec در سراسر سیستم انیمیشن متحد شد. همچنین Enter/ExitTransition را برای پذیرش FiniteanimationsPec محدود کنید. ( IE47C5 ، B/177457083 )
  • animatable.snapto و animatable.stop اکنون توابع تعلیق هستند ( IF4288 )
  • به طور مشابه با نحوه حذف state { 0 } composite و اکنون استفاده از آن را مانند remember { mutableStateOf(0) } ما قصد داریم savedInstanceState { 0 } حذف کنیم. در عوض باید از rememberSaveable { mutableStateOf(0) } استفاده کنید و در صورتی که نوع استفاده شده در داخل mutablestate در بسته نرم افزاری ذخیره می شود ، به طور خودکار ذخیره و بازیابی می شود. اگر قبلاً در حال عبور از یک شیء خرج سفارشی بودید ، اکنون باید از اضافه بار جدیدی از RembersAvelable استفاده کنید که دارای پارامتر stateSaver است. استفاده به این شکل خواهد بود: val holder = rememberSaveable(stateSaver = HolderSaver) { mutableStateOf(Holder(0)) } ( IB4C26 ، b/177338004 )
  • امضای روش Crossfade به روز شده تا با بقیه سیستم انیمیشن سازگار باشد. ( IB05ED ، b/177457083 )
  • به یاد داشته باشید که به یاد داشته باشید. ( i1366e ، b/177338004 )
  • RestorAblestateHolder به SaveAblestateHolder تغییر نام داد و به Androidx.compose.runtime.saveable منتقل شد. روش داخلی RestorAblestateProvider به SaveLestateProvider تغییر نام داد. نوع عمومی برداشته شد تا بتوانید فقط به عنوان یک کلید از آن عبور کنید. حاشیه نویسی تجربی دیگر لازم نیست. ( I0902E ، B/174598702 )
  • اصلاح شده به روز شده. ANIMATECONTENTSIZE API با بقیه سیستم انیمیشن سازگار است. ( i0bf75 ، b/177457083 )
  • AnimatedValue/Float اکنون کاهش یافته است. لطفاً به جای آن از Animatable استفاده کنید. ( i71345 ، b/177457083 )
  • TAPGESSTUREFILTER ، DOUBLETAPEGREGHTUREFILTER ، LONGPRESSEGENTUREFILTER و PRESSINDICAITONGESTUREFILTER کاهش یافته است. به جای آن از modifier.clickable یا modifier.pointerinput با عملکرد DetectTapgreggestures استفاده کنید. ( i6baf9 ، b/175294473 )
  • یک عنصر Coroutine InfiniteAnimationPolicy را معرفی کرد که در انیمیشن های بی نهایت اعمال می شود. به طور پیش فرض هیچ سیاستی نصب نشده است ، به جز هنگام اجرای تست با ComposeTestRule . ( i50ec4 ، b/151940543 )
  • روشهای تخریب و کپی () از چندین کلاس که به ندرت مورد استفاده قرار می گرفت ، حذف شده است. ( I26702 ، b/178659281 )
  • زمان پخش در انیمیشن اکنون به نانو ثانیه ها بی وقفه است ( IF776a )
  • The Compose: Runtime-Dispatch Artifact اکنون کاهش یافته است. MonotonicFrameclock اکنون می توانید در آهنگسازی یافت: زمان اجرا و Androiduidispatcher را می توان در آهنگسازی یافت: UI. ( IB5C36 )
  • Animation.isInfinite و VectorizedAnimationSpec.isInfinite اضافه شده است که اگر یک انیمیشن بی نهایت باشد یا نه. این می تواند در اجرای انیمیشن ها برای برخورداری از چنین انیمیشن هایی استفاده شود. به عنوان مثال ، می توان یک پیام ویژه "باقیمانده" را نشان داد ، یا در طول تست ها می توان انیمیشن را لغو کرد تا به طور نامحدود از انتظار برای بیکاری جلوگیری شود. ( IEBB05 ، B/151940543 )
  • از Long به جای Uptime به عنوان نوع زمان انیمیشن استفاده کنید ( IE3AA7 ، B/177420019 )

نسخه 1.0.0-alpha11

28 ژانویه 2021

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

API تغییر می کند

  • انتقال مبتنی بر TransitionDefinition کاهش یافته است ( I0AC57 )
  • یک زمینه برچسب برای انتقال و انیمیشن های کودک در ابزارها ( I619FB ) نمایش داده می شود
  • Animateasstate اکنون AnimateFoosstate است ، جایی که Foo نوع متغیر متحرک است. به عنوان مثال شناور ، DP ، افست و غیره ( IE7E25 )
  • انتقال جدید که هر تعداد انیمیشن کودک را اجرا می کند. ( i1da81 )
  • واسطهای پارامتر حالت را تغییر می دهد تا عملکردهای کامپوزیتی داشته باشد که State<T> باز می گرداند. animatable.asstate () را اضافه می کند تا بتواند یک Animatable به یک حالت را آسان تر کند. همچنین AnimateElevation را به عنوان یک پسوند تعلیق در Animatable تغییر می دهد. ( if613c )

رفع اشکال

  • OnCommit ، Ondispose و Onactive به نفع API های جانبی و یکبار مصرف ( IF760E ) کاهش یافته است
  • حالت اولیه در updateterantion اکنون پشتیبانی می شود ( IFD51D )
  • پارامتر توضیحات محتوا به تصویر و نماد اضافه شده است. برای ارائه توضیحات به خدمات دسترسی ( I2AC4C ) استفاده می شود
  • بی اعتبار و ترکیب () اکنون به ترتیب به نفع جریان فعلی و به یاد داشته باشید که به یاد داشته باشید. ( i583a8 )
  • مدت زمان و به روز با میلی ثانیه طولانی جایگزین خواهد شد و این مرحله وابستگی ورودی اشاره گر به آن کلاس ها را از بین می برد. ( ia33b2 ، b/175142755 ، b/177420019 )
  • قابل کلیک ، toggleable و قابل انتخاب می تواند در خارج از ترکیب ایجاد شود ( I0A130 ، B/172938345 ، B/175294473 )
  • تسکین به یک رابط کاربری ( IB14E5 ) تغییر یافته است
  • items(count: Int) روش کارخانه برای دامنه LazyColumn/Lazyrow/LazyverticalGrid. items(items: List) و itemsIndexed(items: List) اکنون توابع پسوند هستند ، بنابراین شما باید هنگام استفاده به صورت دستی آنها را وارد کنید. اضافه بار پسوند جدید برای آرایه ها: موارد (موارد: آرایه) و موارد Indexed (آرایه) ( I803FC ، B/175562574 )
  • اهرم تست coroutinedispatcher در آزمایش ( i532b6 )
  • PointerinputData را حذف کرده و PointerinputChange اصلاح شده را به همه زمینه های PointerinputData ارائه دهید. pointerinputevent و pointerinputeventdata داخلی ساخته شده است زیرا در هیچ API عمومی استفاده نمی شود. ( IFFF97 ، B/175142755 )

نسخه 1.0.0-alpha10

13 ژانویه 2021

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

API تغییر می کند

  • سرعت اصلاح شده برای داشتن قطعات مؤلفه و عملیات ریاضی. ( IB0447 )
  • تغییر نام توسط @ExperimentalTesting به @ExperimentalTestApi با حاشیه نویسی API آزمایشی مشابه ( IA4502 ، B/171464963 )
  • موقعیت به DPOFFSET تغییر نام داد و GetDistance () ( IB2DFD ) را حذف کرد
  • حذف Any.IdentityHashCode () API عمومی ( I025D7 )

رفع اشکال

  • API API جدید مبتنی بر Animatable که انحصار متقابل را در بین انیمیشن های آن تضمین می کند. DecayanimationsPec جدید برای پشتیبانی از انیمیشن پوسیدگی چند بعدی ( I820F2 ، B/168014930 )
  • animate() اکنون با animateAsState() جایگزین شده است ، که به جای T یک State<T> برمی گرداند. این امر عملکرد بهتری را فراهم می کند ، زیرا دامنه بی اعتبار کردن می تواند به جایی که مقدار حالت خوانده می شود کاهش یابد. ( IB179E )

نسخه 1.0.0-alpha09

16 دسامبر 2020

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

API تغییر می کند

  • جابجا شده dp.vectorconverter ، position.vectorconverter و غیره به انیمیشن-هسته ، و وکتور های قدیمی ( IF0C4B ) را کاهش داد
  • مجموعه کاملاً جدیدی از API های انتقال را با سهولت در استفاده بهتر و پشتیبانی از انیمیشن های اضافه شده پویا و اهداف انیمیشن محاسبه شده به صورت پویا معرفی کرد. این API ها برای تمایز آسان از API مبتنی بر TransitionDefinition تجربی هستند. ( ia7fe3 )

رفع اشکال

  • Lambdas در اصلاح کننده های افست اکنون به جای شناور ، بازگردانده می شوند. ( IC9EE5 ، B/174137212 ، B/174146755 )
  • LazyColumnfor ، Lazyrowfor ، LazyColumnforeDexed و LazyrowforeDexed را کاهش دهید. به جای آن از LazyColumn و Lazyrow استفاده کنید ( i5b48c )
  • برای تعلیق API های ورودی نشانگر ، تغییر نام HanderpointerinputScope به AwaitPoIntereVentscope و Handlepointerinput () به AwaitPoInnerEventScope (). ( IDF0A1 ، B/175142755 )
  • عملکرد جدید infiniterepeatable برای ایجاد یک infiniterepeatablespec ( i668e5 )
  • حاشیه نویسی ExperimentalPointerinput حذف شده ( IA7A24 )

نسخه 1.0.0-alpha08

2 دسامبر 2020

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

API تغییر می کند

  • اضافه شده برای نامگذاری و موقعیت پارامتر Lambda ، برای بررسی سازگاری با دستورالعمل های آهنگسازی ، بررسی اضافه شده است. با توجه به بررسی و راهنمایی ، برخی از API ها را با استفاده از children به عنوان نام لامبدا دنباله دار خود به content مهاجرت کردند. ( IEC48E )
  • API های پیش از این حذف شده بودند:
    • Modifier.onPositioned حذف شد ، از Modifier.onGloballyPositioned .
    • Modifier.onDraw حذف شد ، Modifier.onDrawBehind استفاده کنید.
    • Modifier.plus حذف شد ، از Modifier.then استفاده کنید.
    • Color.Unset حذف شد ، از Color.Unspecified استفاده کنید.
    • کلاس PxBounds برداشته شد ، به جای آن Rect استفاده کنید.
    • ( IE9D02 ، B/172562222 )
  • گزینه موقت اضافه شده برای اجازه دادن به TestAnimationClock توسط MonotonicFrameclock ( I1403B ، B/173402197 ) هدایت می شود

رفع اشکال

  • با تغییر نام به اصلاح نام توسط modifer.drawlayer به اصلاح. GraphicsLayer همچنین کلاس های مرتبط را به روزرسانی به GraphicsLayer طبق بازخورد شورای API به روز کرد. ( i0bd29 ، b/173834241 )
  • اصلاح کننده اضافه شده است.
    • تغییر نام به اصلاح کننده. drawopacity به اصلاح کننده
    • تغییر نام نامگذاری شده. drawshadow به اصلاح کننده. شادو ( I264CA ، b/173208140 )
  • زمینه های Uptime and Post PointerinputData را غیر قابل تهی ساخت. ( id468a )
  • اصلاح کننده های OffsetPx به جبران تغییر نام دادند. آنها اکنون به جای دولت پارامترهای لامبدا را می گیرند. ( IC3021 ، B/173594846 )
  • API های جدید برای اجرای انیمیشن ها در Coroutines ( IED662 )
  • محیط های مستهلک شده با Ambient به عنوان پسوند آنها ، و آنها را با خواص جدید پیشوند با محیط ، پیروی از سایر محیط ها و دستورالعمل های API جایگزین کردند. ( i33440 )
  • کنترل زمان در تست ها (TestAnimationClock و کاربردهای آن) اکنون آزمایشی است ( I6EF86 ، B/171378521 )
  • ماژول قدیمی UI و خردهای آن را حذف کنید ( i3a7cb )
  • RestorableStateHolder.withRestorableState به RestorableStateProvider ( I66640 ) تغییر نام داد
  • رابط تراز به روز شد و کاربردی شد. ( i46a07 ، b/172311734 )

نسخه 1.0.0-alpha07

11 نوامبر 2020

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

رفع اشکال

  • بنیاد AmbientTextStyle ، ProvideTextStyle و AmbientContentColor کاهش یافته است. در عوض از نسخه های جدید موجود در کتابخانه مواد استفاده کنید. برای برنامه های غیر مادی ، در عوض باید سیستم طراحی خاص خود را ایجاد کنید تا محیط های خاص مضامین خود را ایجاد کنید که می توانند در اجزای خود مصرف شوند. ( I74ACC ، B/172067770 )
  • Foundation.Text مستهلک شده و با Material.Text جایگزین شده است. برای یک API متن اساسی و غیرقابل توصیف که مقادیر یک موضوع را مصرف نمی کند ، به Androidx.compose.foundation.basictext مراجعه کنید. ( if64cb )
  • MeasureResult was moved out of MeasureScope. ( Ibf96d , b/171184002 )
  • Several layout related symbols were moved from androidx.compose.ui to androidx.compose.layout.ui. ( I0fa98 , b/170475424 )

Version 1.0.0-alpha06

28 اکتبر 2020

androidx.compose.animation:animation:1.0.0-alpha06 and androidx.compose.animation:animation-core:1.0.0-alpha06 are released. Version 1.0.0-alpha06 contains these commits.

API Changes

  • Enable transitions in ComposeTestRule; remove option to enable the blinking cursor from ComposeTestRule. ( If0de3 )

Version 1.0.0-alpha05

14 اکتبر 2020

androidx.compose.animation:animation:1.0.0-alpha05 and androidx.compose.animation:animation-core:1.0.0-alpha05 are released. Version 1.0.0-alpha05 contains these commits.

API Changes

  • New Animation interface and subclasses: These classes store the start and end conditions for animations, and therefore allow value and velocity to be queried via only playtime ( Ie95bd , b/163329867 )

رفع اشکال

  • OnPositionedModifier is renamed to OnGloballyPositionedModifier and onPositioned() is renamed to onGloballyPositioned(). ( I587e8 , b/169083903 )
  • Deprecates contentColor() and currentTextStyle() APIs, and replaces them with AmbientContentColor and AmbientTextStyle ambients respectively. You can access the current value by using .current on the ambient property, as with any other ambient. This was change was made for consistency and to avoid having multiple ways to accomplish the same thing. Additionally renames some ambient properties to better describe their purpose as follows:

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

Version 1.0.0-alpha04

1 اکتبر 2020

androidx.compose.animation:animation:1.0.0-alpha04 and androidx.compose.animation:animation-core:1.0.0-alpha04 are released. Version 1.0.0-alpha04 contains these commits.

API Changes

  • Annotated rootAnimationClockFactory, transitionsEnabled, blinkingCursorEnabled and textInputServiceFactory with @VisibleForTesting, make them internal API and hide their kdoc ( I554eb , b/168308412 )

رفع اشکال

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

Version 1.0.0-alpha03

16 سپتامبر 2020

androidx.compose.animation:animation:1.0.0-alpha03 and androidx.compose.animation:animation-core:1.0.0-alpha03 are released. Version 1.0.0-alpha03 contains these commits.

رفع اشکال

  • Usages of gravity were consistently renamed to align or alignment in layout APIs. ( I2421a , b/164077038 )

Version 1.0.0-alpha02

2 سپتامبر 2020

androidx.compose.animation:animation:1.0.0-alpha02 and androidx.compose.animation:animation-core:1.0.0-alpha02 are released. Version 1.0.0-alpha02 contains these commits.

API Changes

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

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

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

    ( I0a85b , b/161247083 )

رفع اشکال

  • onPreCommit is deprecated; onCommit now has onPreCommit's behavior.

    onCommit and onActive now run in the same choreographer frame that the composition changes committed in rather than at the beginning of the next choreographer frame. ( I70403 )

Version 1.0.0-alpha01

26 آگوست 2020

androidx.compose.animation:animation:1.0.0-alpha01 and androidx.compose.animation:animation-core:1.0.0-alpha01 are released. Version 1.0.0-alpha01 contains these commits.

Version 0.1.0-dev

Version 0.1.0-dev17

19 آگوست 2020

androidx.compose.animation:animation:0.1.0-dev17 and androidx.compose.animation:animation-core:0.1.0-dev17 are released. Version 0.1.0-dev17 contains these commits.

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

API Changes

  • Offset has become an inline class ( Iaec70 )
  • IntOffset is now an inline class ( Iac0bf )
  • IntSize is now an inline class ( I2bf42 )
  • AnimatedVisibilty composable animates the appearance and disappearance of the child content.

    EnterTransition and ExitTransition are introduced to work with AnimatedVisibilty composable to provide 3 different typs of appearance and disappearance animation: fade, slide, and expand/shrink the content. The different types of animations can be combined to achieve more bespoke look and feel. ( Idda11 )

  • Deprecated PxBounds in favor of Rect. Updated all usages of PxBounds with rect and added proper deprecate/replace with annotations to assist with the migration. ( I37038 , b/162627058 )

رفع اشکال

  • PlacementScope.placeAbsolute() was renamed to PlacementScope.place() , and the previous PlacementScope.place() was renamed to PlacementScope.placeRelative() . As a result, the PlacementScope.place() method will not automatically mirror the position in right-to-left contexts anymore. If this is desired, use PlacementScope.placeRelative() instead. ( I873ac , b/162916675 )
  • The state { ... } composable is now deprecated in favor of explicit calls to remember { mutableStateOf(...) } for clarity. This reduces the overall API surface and number of concepts for state management, and matches the by mutableStateOf() pattern for class property delegation. ( Ia5727 )

Version 0.1.0-dev16

5 آگوست 2020

androidx.compose.animation:animation:0.1.0-dev16 and androidx.compose.animation:animation-core:0.1.0-dev16 are released. Version 0.1.0-dev16 contains these commits.

API Changes

  • Built-in vector converters to convert built-in units are now accessible via Foo.VectorConverter . eg Dp.VectorConverter , Color.VectorConverter , Float.VectorConverter , etc ( I3e273 )
  • Support end listener in Modifier.animateContentSize() such that when size change animation finishes, the listener will be notified, along with start/end size of the animation. ( I277b2 )
  • New animateContentSize modifier that animates the layout size change of its child modifier ( Ieffdc )
  • Added MonotonicFrameAnimationClock that enables you to use a MonotonicFrameClock as an AnimationClockObservable to bridge the gap between the new coroutines based clocks and APIs that still use the old callback based clocks.

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

رفع اشکال

  • The APIs for right-to-left support has been updated. LayoutDirectionAmbient has been added, which can be used to read and change the layout direction. Modifier.rtl and Modifier.ltr have been removed. ( I080b3 )
  • Require type T to be explicitly specified for transitionDefinition. ( I1aded )
  • foundation.shape.corner package were flatten to foundation.share ( I46491 , b/161887429 )
  • Modifier.plus has been deprecated, use Modifier.then instead. 'Then' has a stronger signal of ordering, while also prohibits to type Modifier.padding().background() + anotherModifier , which breaks the chain and harder to read ( Iedd58 , b/161529964 )
  • Modifier.drawBackground has been renamed to Modifier.background ( I13677 )

Version 0.1.0-dev15

22 جولای 2020

androidx.compose.animation:animation:0.1.0-dev15 and androidx.compose.animation:animation-core:0.1.0-dev15 are released. Version 0.1.0-dev15 contains these commits.

Dependencies Update

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

API Changes

  • Transition API has been changed to return a TransitionState instead of passing the TransitionState to children. This makes the API more consistent with animate() APIs. ( I24e38 )
  • Modifier parameter added for Crossfade ( I87cfe , b/159706180 )
  • Use AnimationSpec instead of AnimationBuilder in the top level APIs to clarify the concept of static animation specification
    • Improve the transition DSL by removing the lambda requirement for creating AnimationSpecs such as tween, spring. They instead take constructor params directly.
    • Improve the overall ease of use of AnimationSpec opening up constructors instead of relying on builders
    • Change the duration and delay for KeyFrames and Tween to Int. This eliminates unnecessary type casts and method overloading (for supporting both Long and Int). ( Ica0b4 )
  • Replaced usage of IntPx with Int. Replaced IntPxPosition with IntOffset. Replaced IntPxSize with IntSize. ( Ib7b44 )
  • In order to consolidate the number of classes used to represent sizing information, standardize on usage of the Size class instead of PxSize. This provides the benefits of an inline class to leverage a long to pack 2 float values to represent width and height represented as floats. ( Ic0191 )
  • In order to consolidate the number of classes used to represent positioning information, standardize on usage of the Offset class instead of PxPosition. This provides the benefits of an inline class to leverage a long to pack 2 float values to represent x and y offsets represented as floats. ( I3ad98 )
  • Replaced usage of Px class in various compose classes as part of the large refactoring effort to only rely on Dp and primitive types for pixel parameters ( I086f4 )
  • Added animate() support for Dp, Px, Size, Position, Bounds, PxPosition, PxSize, PxBounds, IntPx, IntPxSize, IntPxPosition, IntPxBounds, and AnimationVector ( Ib7518 )
  • Crossfade now accepts optional AnimationBuilder param to allow configuring the animation ( I6d6e0 )
  • Replaced all nullable Color uses in API with non-nullable and use Color.Unset instead of null ( Iabaa7 )
  • Removed ValueHolder class. Restructured AnimatedValue, AnimatedFloat classes to make the animation value field abstract so that subclasses can watch the value update.
    • Added model classes for AnimatedValue, AnimatedFloat, etc.
    • Added a new set of light-weight @Composable API for animating between values. ( I79530 )
  • Breaking changes to the ambients API. See log and Ambient<T> documentation for details ( I4c7ee , b/143769776 )
  • New repeat mode: Reverse. This mode reverses the previous iteration as the animation repeats in RepeatableSpec or VectorizedRepeatableSpec. ( Ibe0f5 )
  • API additions to ManualAnimationClock: hasObservers: Boolean and constructor parameter dispatchOnSubscribe: Boolean ( Iaa134 )
  • Added APIs for getting min/max bounds in AnimatedFloat ( Icd9cc )

رفع اشکال

  • runOnIdleCompose renamed to runOnIdle ( I83607 )
  • Several testing APIs were renamed to be more intuitive. All findXYZ APIs were renamed to onNodeXYZ. All doXYZ APIs were renamed to performXYZ. ( I7f164 )
  • Introduced low level stateless animation APIs. These APIs ( I63bf7 )
  • The Recompose composable is no longer a useful abstraction. Most recomposition should happen as a result of MutableState assignments. For anything beyond that, it is recommended that you use the invalidate function to trigger a recomposition of the current scope. ( Ifc992 )
  • Replaced usage of Px class in various compose classes as part of the large refactoring effort to only rely on Dp and primitive types for pixel parameters. Deleted Px class in its entirety ( I3ff33 )
  • Replaced usage of Px class in various compose classes as part of the large refactoring effort to only rely on Dp and primitive types for pixel parameters ( Id3434 )
  • Crossfade can now work with null as initial value ( Iad6a4 , b/155947711 )
  • Replaced usage of Px class in various compose classes as part of the large refactoring effort to only rely on Dp and primitive types for pixel parameters ( I19d02 )
  • Consolidated CanvasScope implementations so there is now just DrawScope and ContentDrawScope Renamed CanvasScope to DrawScope. Updated DrawScope to implement Density interface and provide LayoutDirection Deleted DrawScope subclass in ContentDrawScope Painter and PainterModifier have been updated to no longer maintain an RTL property themselves as DrawScope provides this already without manually providing it ( I1798e )
  • Updated higher level compose APIs that expose a Canvas to expose CanvasScope instead. This removes the need for consumers to maintain their own Paint objects. For consumers that still require access to a Canvas they can use the drawCanvas extension method which provides a callback to issue drawing commands with the underlying Canvas. ( I80afd )
  • Added verticalGravity and horizontalGravity parameters to Row and Column, respectively. ( I7dc5a )
  • ui-text module is renamed as ui-text-core ( I57dec )
  • Improve DrawModifier API:
    • Made the receiver scope for draw() ContentDrawScope
    • Removed all parameters on draw()
    • DrawScope has same interface as former CanvasScope
    • ContentDrawScope has drawContent() method ( Ibaced , b/152919067 )
  • runOnIdleCompose and runOnUiThread are now global functions instead of methods on ComposeTestRule. ( Icbe8f )
  • [Mutable]State property delegate operators moved to extensions to support Kotlin 1.4 property delegate optimizations. Callers must add imports to continue using by state { ... } or by mutableStateOf(...) . ( I5312c )
  • ColoredRect has been deprecated. Use Box(Modifier.preferredSize(width, height).drawBackground(color)) instead. ( I499fa , b/152753731 )
  • Replaced Modifier plus operator with factory extension functions ( I225e4 )
  • Deprecated Center composable. It should be replaced either with the LayoutSize.Fill + LayoutAlign.Center modifier, or with one of the Box or Stack composables with suitable modifiers applied ( Idf5e0 )
  • Renamed LayoutFlexible to LayoutWeight. Renamed tight parameter to fill. ( If4738 )
  • The Opacity composable function has been replaced with the drawOpacity modifier. ( I5fb62 )
  • Tests using AndroidComposeTestRule now provide an animation clock at the root of the composition that allows it to be paused, resumed and advanced manually. ( Id54c5 )
  • Support right-to-left direction in LayoutPadding modifier ( I9e8da )
  • Density and DensityScope were merged into one interface. Instead of ambientDensity() you can now use DensityAmbient.current. Instead of withDensity(density) just with(density) ( I11cb1 )
  • Added copy methods to various inline class types including:
    • افست
    • اندازه
    • شعاع
    • حرکت
    • TransformOrigin
    • Deprecated Size.copy companion object method favor of instance copy method ( Ife290 , b/159905651 )
  • androidx.compose.ViewComposer has been moved to androidx.ui.node.UiComposer androidx.compose.Emittable has been removed. It was redundant with ComponentNode. androidx.compose.ViewAdapters has been removed. They are no longer a supported use case. Compose.composeInto has been deprecated. Use setContent or setViewContent instead. Compose.disposeComposition has been deprecated. Use the dispose method on the Composition returned by setContent instead. androidx.compose.Compose.subcomposeInto has moved to androidx.ui.core.subcomposeInto ComponentNode#emitInsertAt has been renamed to ComponentNode#insertAt ComponentNode#emitRemoveAt has been renamed to ComponentNode#removeAt ComponentNode#emitMode has been renamed to ComponentNode#move ( Idef00 )
،

Compose Animation

Build animations in their Jetpack Compose applications to enrich the user experience.
آخرین به روز رسانی Stable Release کاندید را آزاد کنید Beta Release Alpha Release
4 سپتامبر 2024 1.7.0 - - 1.8.0-alpha01

ساختار

Compose is a combination of 7 Maven group IDs within androidx . Each group contains a targeted subset of functionality, each with its own set of release notes.

This table explains the groups and links to each set of release notes.

گروه توضیحات
compose.animation Build animations in their Jetpack Compose applications to enrich the user experience.
compose.compiler Transform @Composable functions and enable optimizations with a Kotlin compiler plugin.
compose.foundation Write Jetpack Compose applications with ready to use building blocks and extend foundation to build your own design system pieces.
compose.material Build Jetpack Compose UIs with ready to use Material Design Components. This is the higher level entry point of Compose, designed to provide components that match those described at www.material.io.
compose.material3 Build Jetpack Compose UIs with Material Design 3 Components, the next evolution of Material Design. Material 3 includes updated theming and components and Material You personalization features like dynamic color, and is designed to be cohesive with the new Android 12 visual style and system UI.
compose.runtime Fundamental building blocks of Compose's programming model and state management, and core runtime for the Compose Compiler Plugin to target.
compose.ui Fundamental components of compose UI needed to interact with the device, including layout, drawing, and input.

Declaring dependencies

To add a dependency on Compose, you must add the Google Maven repository to your project. Read Google's Maven repository for more information.

Add the dependencies for the artifacts you need in the build.gradle file for your app or module:

شیار

dependencies {
    implementation "androidx.compose.animation:animation:1.7.0"
}

android {
    buildFeatures {
        compose true
    }

    composeOptions {
        kotlinCompilerExtensionVersion = "1.5.15"
    }

    kotlinOptions {
        jvmTarget = "1.8"
    }
}

کاتلین

dependencies {
    implementation("androidx.compose.animation:animation:1.7.0")
}

android {
    buildFeatures {
        compose = true
    }

    composeOptions {
        kotlinCompilerExtensionVersion = "1.5.15"
    }

    kotlinOptions {
        jvmTarget = "1.8"
    }
}

For more information about dependencies, see Add build dependencies .

بازخورد

Your feedback helps make Jetpack better. Let us know if you discover new issues or have ideas for improving this library. Please take a look at the existing issues in this library before you create a new one. You can add your vote to an existing issue by clicking the star button.

Create a new issue

See the Issue Tracker documentation for more information.

Version 1.8

Version 1.8.0-alpha01

4 سپتامبر 2024

androidx.compose.animation:animation-*:1.8.0-alpha01 is released. Version 1.8.0-alpha01 contains these commits .

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

  • New Modifier.animateBounds API for animating size and position changes within a lookahead scope. 94b9394

API Changes

  • Remove experimental flags on Keyframes with Arcs and Splines ( 89e1199 )

رفع اشکال

  • Skip placeHolderSize logic when no match is found ( 77c0160 )
  • Clamp play time in AndroidFlingSpline to prevent crashes due to non-monotonically increasing play time( 9d47587 )
  • Fix SharedTransitionScope not drawing items in certain conditions ( b41077b6 )

External Contribution

  • Prevent setting seekable transition playTime when no transition is running by Steven Schoen. ( c2e6e7e6 )

Version 1.7

Version 1.7.0

4 سپتامبر 2024

androidx.compose.animation:animation-*:1.7.0 is released.

Important changes since 1.6.0

Important changes in version 1.7.0 are covered in this blogpost .

New Shared Element Transition APIs

  • New shared element transition APIs await your usage and feedback. These new experimental APIs enable tagging layouts as shared across layout tree using the provided modifiers, producing smoothly changing bounds when one set of shared content exits and the other set enters. ( Icb0b9 )
  • New scaleInSharedContentToBounds and scaleOutSharedContentToBounds to scale content in sharedBounds ( I731c1 )
  • Experimental SharedTransitionScope is now an interface rather than a class. ( Iaf856 )
  • New resizeModes ( ScaleToBounds and RemeasureToBounds ) for sharedBounds to choose between scaling and remeasure. The previous scaleIn/OutSharedContentToBounds APIs are now deprecated. ( I0d41a )

Improvements to existing APIs:

  • New Modifier.animateContentSize that takes an additional parameter for custom content alignment. ( I5623a , b/269803907 )
  • New Experimental DeferredTargetAnimation for animating size, position, or any other target that is unknown during instantiation. ( I60745 )
  • SeekableTransitionState replaces snapTo() with seekTo() , and adds a snapTo() that immediately changes the state to a destination state without any kind of animation.
  • You may now pass a periodicBias value (Float) to keyframesWithSpline , this will make it so that the initial and final velocity of the spline are equal. Useful for repeatable animations using splines. The bias indicates how much each velocity (initial and final) gets modified to achieve periodicity. ( Ic1e6c , b/292114811 )

The following APIs have become stable or been removed:

  • AnimatedVisibilityScope.transition is now a stable API. Modifier.animateEnterExit(..) has also been made stable. ( I6c1d1 )
  • ApproachLayoutModifierNode and Modifier.approachLayout are now stable, with new isMeasurementApproachInProgress() and isPlacementApproachInProgress() to replace the old isMeasurementApproachComplete() and isPlacementApproachComplete() respectively.
  • Removed deprecated intermediateLayout modifier. ( I3e91c )
  • LookaheadScope APIs have been made stable. ( I21507 )

Version 1.7.0-rc01

21 آگوست 2024

androidx.compose.animation:animation-*:1.7.0-rc01 is released. Version 1.7.0-rc01 contains these commits .

Version 1.7.0-beta07

7 آگوست 2024

androidx.compose.animation:animation-*:1.7.0-beta07 is released. Version 1.7.0-beta07 contains these commits .

رفع اشکال

  • Fixed SharedTransitionScope not drawing overlay items during transition in certain conditions, which would typically include usage with Navigation. ( Id65ab , b/347520198 )

Version 1.7.0-beta06

24 جولای 2024

androidx.compose.animation:animation-*:1.7.0-beta06 is released. Version 1.7.0-beta06 contains these commits .

رفع اشکال

  • Fixed SeekableTransition leaking transition states by properly cleaning up observations from SnapshotStateObserver when the transition is disposed. ( b9c7182 )
  • Fixed edge cases where child Transitions are not properly marked complete when the parent completes. ( dc42216 )

Version 1.7.0-beta05

10 جولای 2024

androidx.compose.animation:animation-*:1.7.0-beta05 is released. Version 1.7.0-beta05 contains these commits .

رفع اشکال

  • The Transition property totalDurationNanos now can be properly read within a snapshotFlow .

Version 1.7.0-beta04

26 ژوئن 2024

androidx.compose.animation:animation-*:1.7.0-beta04 is released. Version 1.7.0-beta04 contains these commits .

Version 1.7.0-beta03

12 ژوئن 2024

androidx.compose.animation:animation-*:1.7.0-beta03 is released. Version 1.7.0-beta03 contains these commits .

Version 1.7.0-beta02

29 مه 2024

androidx.compose.animation:animation-*:1.7.0-beta02 is released. Version 1.7.0-beta02 contains these commits .

Version 1.7.0-beta01

14 مه 2024

androidx.compose.animation:animation-*:1.7.0-beta01 is released. Version 1.7.0-beta01 contains these commits .

API Changes

  • New resizeModes ( ScaleToBounds and RemeasureToBounds ) for sharedBounds to choose between scaling and remeasure. The previous scaleIn/OutSharedContentToBounds APIs are now deprecated. ( I0d41a )

External Contribution

Version 1.7.0-alpha08

1 مه 2024

androidx.compose.animation:animation-*:1.7.0-alpha08 is released. Version 1.7.0-alpha08 contains these commits .

API Changes

  • LookaheadScope APIs have been made stable. ( I21507 )

External Contribution

  • Clear start animation time after SeekableTransitionState animates/snaps by Steven Schoen ( 1ca89529 )

Version 1.7.0-alpha07

17 آوریل 2024

androidx.compose.animation:animation-*:1.7.0-alpha07 is released. Version 1.7.0-alpha07 contains these commits .

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

  • New shared element transition APIs await your usage and feedback. These new experimental APIs enable tagging layouts as shared across layout tree using the provided modifiers, producing smoothly changing bounds when one set of shared content exits and the other set enters. ( Icb0b9 )
  • New scaleInSharedContentToBounds and scaleOutSharedContentToBounds to scale content in sharedBounds ( I731c1 )

API Changes

  • AnimatedVisibilityScope.transition is now a stable API. Modifier.animateEnterExit(..) has also been made stable. ( I6c1d1 )
  • ApproachLayoutModifierNode and Modifier.approachLayout are now stable, with new isMeasurementApproachInProgress() and isPlacementApproachInProgress() to replace the old isMeasurementApproachComplete() and isPlacementApproachComplete() respectively.
  • Removed deprecated intermediateLayout modifier. ( I3e91c )
  • You may now pass a periodicBias value (Float) to keyframesWithSpline , this will make it so that the initial and final velocity of the spline are equal. Useful for repeatable animations using splines. The bias indicates how much each velocity (initial and final) gets modified to achieve periodicity. ( Ic1e6c , b/292114811 )

رفع اشکال

  • Fixed over-shooting and under-shooting easing curves that would previously be clamped to 0..1 ( I38747 )

Version 1.7.0-alpha06

3 آوریل 2024

androidx.compose.animation:animation-*:1.7.0-alpha06 is released. Version 1.7.0-alpha06 contains these commits .

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

  • Item appearance and disappearance animation support was added into LazyColumn and LazyRow . Previously it was possible to add Modifier.animateItemPlacement() modifier in order to support placement (reordering) animations. We deprecated this modifier and introduced a new non-experimental modifier called Modifier.animateItem() which allows you to support all three animation types: appearance (fade in), disappearance (fade out) and reordering. ( I2d7f7 , b/330152398 , b/150812265 )

رفع اشکال

  • Improved performance of updateTransition API.

Version 1.7.0-alpha05

20 مارس 2024

androidx.compose.animation:animation-*:1.7.0-alpha05 is released. Version 1.7.0-alpha05 contains these commits .

API Changes

  • SeekableTransitionState replaces snapTo() with seekTo() , and adds a snapTo() that immediately changes the state to a destination state without any kind of animation.

Version 1.7.0-alpha04

6 مارس 2024

androidx.compose.animation:animation-*:1.7.0-alpha04 is released. Version 1.7.0-alpha04 contains these commits .

API Changes

  • New API Path.reverse() to reverse a path's direction ( I36348 )

Version 1.7.0-alpha03

February 21, 2024

androidx.compose.animation:animation-*:1.7.0-alpha03 is released. Version 1.7.0-alpha03 contains these commits.

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

  • New Modifier.animateContentSize that takes an additional parameter for custom content alignment. ( I5623a , b/269803907 )
  • New Experimental DeferredTargetAnimation for animating size, position, or any other target that is unknown during instantiation. ( I60745 )

Version 1.7.0-alpha02

7 فوریه 2024

androidx.compose.animation:animation-*:1.7.0-alpha02 is released. Version 1.7.0-alpha02 contains these commits.

رفع اشکال

  • Compatibility fix for KeyframesSpec . ( I2bdf3 , b/322214617 )
  • Fixed Modifier.animateContentSize not resetting properly when used in LazyList . ( I070512 , b/322525716 )
  • Fixed IllegalStateException on KeyframesSpec when using out of range timestamps. ( I341b8 , b/322839811 )

Version 1.7.0-alpha01

24 ژانویه 2024

androidx.compose.animation:animation-*:1.7.0-alpha01 is released. Version 1.7.0-alpha01 contains these commits.

Version 1.6

Version 1.6.8

12 ژوئن 2024

androidx.compose.animation:animation-*:1.6.8 is released. Version 1.6.8 contains these commits .

Version 1.6.7

1 مه 2024

androidx.compose.animation:animation-*:1.6.7 is released. Version 1.6.7 contains these commits .

Version 1.6.6

17 آوریل 2024

androidx.compose.animation:animation-*:1.6.6 is released. No changes since the previous release

Version 1.6.5

3 آوریل 2024

androidx.compose.animation:animation-*:1.6.5 is released. Version 1.6.5 contains these commits .

Version 1.6.4

20 مارس 2024

androidx.compose.animation:animation-*:1.6.4 is released. Version 1.6.4 contains these commits .

Version 1.6.3

6 مارس 2024

androidx.compose.animation:animation-*:1.6.3 is released. Version 1.6.3 contains these commits .

Version 1.6.2

February 21, 2024

androidx.compose.animation:animation-*:1.6.2 is released. Version 1.6.2 contains these commits.

نسخه 1.6.1

7 فوریه 2024

androidx.compose.animation:animation-*:1.6.1 is released. Version 1.6.1 contains these commits.

رفع اشکال

Version 1.6.0

24 ژانویه 2024

androidx.compose.animation:animation-*:1.6.0 is released. Version 1.6.0 contains these commits.

Version 1.6.0-rc01

10 ژانویه 2024

androidx.compose.animation:animation-*:1.6.0-rc01 is released. Version 1.6.0-rc01 contains these commits.

Version 1.6.0-beta03

13 دسامبر 2023

androidx.compose.animation:animation-*:1.6.0-beta03 is released. Version 1.6.0-beta03 contains these commits.

API Changes

  • Temporarily removed scaleInToFitContainer and scaleOutToFitContainer from AnimatedContentTransitionScope as they require lookahead. They will be available when lookahead is on by default or opted-in in future releases.

Version 1.6.0-beta02

29 نوامبر 2023

androidx.compose.animation:animation-*:1.6.0-beta02 is released. Version 1.6.0-beta02 contains these commits.

Version 1.6.0-beta01

15 نوامبر 2023

androidx.compose.animation:animation-*:1.6.0-beta01 is released. Version 1.6.0-beta01 contains these commits.

API Changes

  • ExitTransition.Hold has been renamed to ExitTransition.KeepUntilTransitionsFinished to be more explicit. ( I1c490 )
  • You may now use keyframesWithSpline to interpolate any N-dimensional value using monotonic splines. It's particularly useful to interpolate positional values such as Offset , IntOffset , DpOffset . Added as Experimental API.

رفع اشکال

  • Add renderer support for Sweep Gradient in ArcLine . ( I4d5bb )
  • Implement equals and hashcode for PageSize.Fixed . ( Ie3ede , b/300134276 )
  • Fix binary compatibility issue with Window Inset change. ( Iee695 )
  • Remove material core layer for Material3 Chip/Button as the microbenchmarks show better performance without it. ( I55555 )

Version 1.6.0-alpha08

18 اکتبر 2023

androidx.compose.animation:animation-*:1.6.0-alpha08 is released. Version 1.6.0-alpha08 contains these commits.

API Changes

  • Deprecated KeyframesSpecConfig#with in favor KeyframesSpecConfig#using which preserves the builder pattern. ( I1d769 )

Version 1.6.0-alpha07

4 اکتبر 2023

androidx.compose.animation:animation-*:1.6.0-alpha07 is released. Version 1.6.0-alpha07 contains these commits.

API Changes

  • Fixed and Scrollable Tabrows now have Primary and Secondary variants. These correctly map to the color and indicator behavior as defined in Material3.
  • PrimaryScrollableTabRow and SecondaryScrollableTabRow now expose scroll state. ( Iec8f5 , b/260572337 )

Version 1.6.0-alpha06

20 سپتامبر 2023

androidx.compose.animation:animation-*:1.6.0-alpha06 is released. Version 1.6.0-alpha06 contains these commits.

Version 1.6.0-alpha05

6 سپتامبر 2023

androidx.compose.animation:animation-*:1.6.0-alpha05 is released. Version 1.6.0-alpha05 contains these commits.

API Changes

  • Added PathEasing to enable an arbitrary path to be supplied to an easing curve. ( Idb4b9 )

Version 1.6.0-alpha04

23 آگوست 2023

androidx.compose.animation:animation-*:1.6.0-alpha04 is released. Version 1.6.0-alpha04 contains these commits.

API Changes

  • Add SeekableTransitionState to allow developers to control the progress of a transition. ( I8e69d )

Version 1.6.0-alpha03

9 آگوست 2023

androidx.compose.animation:animation-*:1.6.0-alpha03 is released. Version 1.6.0-alpha03 contains these commits.

API Changes

  • New type of enter/exit transition that scales the content based on the size of the animating container during enter & exit animation. LookaheadScope Composable fun and interface are now stable. ( Ifb2ce )

Version 1.6.0-alpha02

July 26, 2023

androidx.compose.animation:animation-*:1.6.0-alpha02 is released. Version 1.6.0-alpha02 contains these commits.

API Changes

  • New ExitTransition.Hold to display outgoing content in AnimatedContent until both enter & exit transition are finished. ( I5984f )
  • Additional annotations to specify allowed inputs to composables ( I51109 )

Version 1.6.0-alpha01

21 ژوئن 2023

androidx.compose.animation:animation-*:1.6.0-alpha01 is released. Version 1.6.0-alpha01 contains these commits.

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

  • Enable Modifier.animateContentSize and AnimatedVisibility to be fully integrated into the lookahead system by reporting the target size in the lookahead pass.

API Changes

  • New property in IntrinsincMeasureScope and its implementations (eg MeasureScope ) to indicate whether the current measure pass is a lookahead pass. ( I7a812 )

رفع اشکال

  • Removed allocations from spring animations. ( Ie9431 )
  • value parameter name for Enum.valueOf changed ( Ia9b89 )
  • more thrown exceptions from enum valueOf ( I818fe )

Version 1.5

Version 1.5.4

18 اکتبر 2023

androidx.compose.animation:animation-*:1.5.4 is released. Version 1.5.4 contains these commits.

Version 1.5.3

4 اکتبر 2023

androidx.compose.animation:animation-*:1.5.3 is released. This version has no changes

Version 1.5.2

27 سپتامبر 2023

androidx.compose.animation:animation-*:1.5.2 is released. Version 1.5.2 contains these commits.

Version 1.5.1

6 سپتامبر 2023

androidx.compose.foundation:foundation-*:1.5.1 is released. Version 1.5.1 contains these commits.

رفع اشکال

  • Fixed text fields showing keyboard and being editable when readOnly is true. Also fixed the keyboard not showing when readOnly is changed from true to false while focused. ( I34a19 , b/246909589 )

Version 1.5.1

6 سپتامبر 2023

androidx.compose.animation:animation-*:1.5.1 is released. Version 1.5.1 contains these commits.

Version 1.5.0

9 آگوست 2023

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

Version 1.5.0-rc01

July 26, 2023

androidx.compose.animation:animation-*:1.5.0-rc01 is released. Version 1.5.0-rc01 contains these commits.

رفع اشکال

  • Fixed an issue where calling .value on a primitive state type (like MutableIntState ) would report a lint warning with an invalid fix. The inspection will now recommend migrating to the correct property. ( Iba953 , b/287279257 )

  • An optional inspection to recommend migrating mutableStateOf() calls to their corresponding specialized types for primitives is available. Its lint ID is AutoboxingStateCreation . Previously, this inspection was enabled by default for all projects. To see this warning in Android Studio's editor and your project's lint outputs, change its severity from informational to warning (or higher) by declaring warning "AutoboxingStateCreation" inside your module's build.gradle or build.gradle.kts configuration as shown ( I34f7e ):

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

Version 1.5.0-beta03

28 ژوئن 2023

androidx.compose.animation:animation-*:1.5.0-beta03 is released. Version 1.5.0-beta03 contains these commits.

Version 1.5.0-beta02

7 ژوئن 2023

androidx.compose.animation:animation-*:1.5.0-beta02 is released. Version 1.5.0-beta02 contains these commits.

Version 1.5.0-beta01

24 مه 2023

androidx.compose.animation:animation-*:1.5.0-beta01 is released. Version 1.5.0-beta01 contains these commits.

API Changes

  • Removed allocations in recomposition, color animations, and AndroidComposeView ( Ib2bfa )

رفع اشکال

  • Removed allocations from spring animations ( Ie9431 )

Version 1.5.0-alpha04

10 مه 2023

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

API Changes

  • ContentKey is now supported in AnimatedContent to allow more control for when transition should happen. ( Ic069b )

Version 1.5.0-alpha03

19 آوریل 2023

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

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

  • New default behavior for SubcomposeLayout in LookaheadScope . It allows SubcomposeLayouts that don't have conditional slots (eg TabRow , Scaffold , BoxWithConstraints , etc) to work nicely with lookahead animations.

API Changes

  • New default intermediateMeasurePolicy that reuses measure policy from lookahead pass allows SubcomposeLayout subtypes without conditional slots such as Scaffold , TabRow , and BoxWithConstraints to work with lookahead by default. ( Id84c8 )
  • Rename infix fun with to togetherWith for combining enter and exit transitions. New AnimatedContentScope as receiver for the content lambda. ( Ic39ae )

Version 1.5.0-alpha02

5 آوریل 2023

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

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

  • New experimental API to support lookahead in SubcomposeLayout . This will allow SubcomposeLayout to function properly in a LookaheadScope . More out-of-the-box support for specific subtypes of SubcomposeLayout will come soon.

API Changes

  • New SubcomposeLayout API that takes an additional intermediate measure policy for handling measure/layout logic during lookahead-based animations. ( I017d3 )

Version 1.5.0-alpha01

22 مارس 2023

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

API Changes

  • AnimatedContent APIs are now stable AnimatedContentScope has been renamed to AnimatedContentTransitionScope . scaleIn and scaleOut are now stable APIs. ( Iaf54e )

Version 1.4

Version 1.4.3

3 مه 2023

androidx.compose.animation:animation:1.4.3 , androidx.compose.animation:animation-core:1.4.3 , and androidx.compose.animation:animation-graphics:1.4.3 are released with no changes (only a version bump ).

Version 1.4.2

19 آوریل 2023

androidx.compose.animation:animation:1.4.2 , androidx.compose.animation:animation-core:1.4.2 , and androidx.compose.animation:animation-graphics:1.4.2 are released with no changes. Version 1.4.2 contains these commits.

Version 1.4.1

5 آوریل 2023

androidx.compose.animation:animation:1.4.1 , androidx.compose.animation:animation-core:1.4.1 , and androidx.compose.animation:animation-graphics:1.4.1 are released with no changes. Version 1.4.1 contains these commits.

Version 1.4.0

22 مارس 2023

androidx.compose.animation:animation:1.4.0 , androidx.compose.animation:animation-core:1.4.0 , and androidx.compose.animation:animation-graphics:1.4.0 are released. Version 1.4.0 contains these commits.

Important changes since 1.3.0

  • Tooling label is supported in r ememberInfiniteTransition and all the extension functions on InfiniteTransition and Transition (eg InfiniteTransition#animateColor ) ( I56ef7 )

Version 1.4.0-rc01

8 مارس 2023

androidx.compose.animation:animation:1.4.0-rc01 , androidx.compose.animation:animation-core:1.4.0-rc01 , and androidx.compose.animation:animation-graphics:1.4.0-rc01 are released with no تغییر می کند. Version 1.4.0-rc01 contains these commits.

Version 1.4.0-beta02

22 فوریه 2023

androidx.compose.animation:animation:1.4.0-beta02 , androidx.compose.animation:animation-core:1.4.0-beta02 , and androidx.compose.animation:animation-graphics:1.4.0-beta02 are released with no تغییر می کند. Version 1.4.0-beta02 contains these commits.

Version 1.4.0-beta01

8 فوریه 2023

androidx.compose.animation:animation:1.4.0-beta01 , androidx.compose.animation:animation-core:1.4.0-beta01 , and androidx.compose.animation:animation-graphics:1.4.0-beta01 are released with no تغییر می کند. Version 1.4.0-beta01 contains these commits.

Version 1.4.0-alpha05

January 25, 2023

androidx.compose.animation:animation:1.4.0-alpha05 , androidx.compose.animation:animation-core:1.4.0-alpha05 , and androidx.compose.animation:animation-graphics:1.4.0-alpha05 are released. Version 1.4.0-alpha05 contains these commits.

تغییرات

  • No changes in animation libraries since the last alpha, version bump only

Version 1.4.0-alpha04

11 ژانویه 2023

androidx.compose.animation:animation:1.4.0-alpha04 , androidx.compose.animation:animation-core:1.4.0-alpha04 , and androidx.compose.animation:animation-graphics:1.4.0-alpha04 are released. Version 1.4.0-alpha04 contains these commits.

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

  • Tooling label is supported in rememberInfiniteTransition and all the extension functions on InfiniteTransition and Transition (eg InfiniteTransition#animateColor ) ( I56ef7 )

API Changes

  • InfiniteTransition#TransitionAnimationState and InfiniteTransition#animations APIs are now public. ( I36682 )

Version 1.4.0-alpha03

7 دسامبر 2022

androidx.compose.animation:animation:1.4.0-alpha03 , androidx.compose.animation:animation-core:1.4.0-alpha03 , and androidx.compose.animation:animation-graphics:1.4.0-alpha03 are released. Version 1.4.0-alpha03 contains these commits.

API Changes

  • In UI tests using a Compose rule, continuations resumed during withFrameNanos callbacks will not be dispatched until after all frame callbacks have finished running. This matches the behavior of compose when running normally. However, tests that rely on the old behavior may fail. This should only affect code that calls withFrameNanos or withFrameMillis directly, and has logic outside of callback passed to those functions that may need to be moved inside the callbacks. See the animation test changes in this CL for examples .
  • Added optional onPerformTraversals: (Long) -> Unit parameter to TestMonotonicFrameClock constructor and factory function to run code after withFrameNanos callbacks but before resuming callers' coroutines. ( Idb413 , b/254115946 , b/222093277 , b/255802670 )
  • New param in AnimatedContent for tooling label ( Iebe2d )

Version 1.4.0-alpha02

9 نوامبر 2022

androidx.compose.animation:animation:1.4.0-alpha02 , androidx.compose.animation:animation-core:1.4.0-alpha02 , and androidx.compose.animation:animation-graphics:1.4.0-alpha02 are released. Version 1.4.0-alpha02 contains these commits.

API Changes

  • Add ToolingState to allow tooling to change internal states of Composable ( Ie6614 )

Version 1.4.0-alpha01

24 اکتبر 2022

androidx.compose.animation:animation:1.4.0-alpha01 , androidx.compose.animation:animation-core:1.4.0-alpha01 , and androidx.compose.animation:animation-graphics:1.4.0-alpha01 are released. Version 1.4.0-alpha01 contains these commits.

رفع اشکال

  • Fix incorrect interruption animation in AnimatedContent ( b/238662479 )

نسخه 1.3

Version 1.3.3

11 ژانویه 2023

androidx.compose.animation:animation:1.3.3 , androidx.compose.animation:animation-core:1.3.3 , and androidx.compose.animation:animation-graphics:1.3.3 are released. Version 1.3.3 contains these commits.

  • No changes since the 1.3.2.

Version 1.3.2

7 دسامبر 2022

androidx.compose.animation:animation:1.3.2 , androidx.compose.animation:animation-core:1.3.2 , and androidx.compose.animation:animation-graphics:1.3.2 are released. Version 1.3.2 contains these commits.

رفع اشکال

  • Updated to support androidx.compose.ui 1.3.2

Version 1.3.1

9 نوامبر 2022

androidx.compose.animation:animation:1.3.1 , androidx.compose.animation:animation-core:1.3.1 , and androidx.compose.animation:animation-graphics:1.3.1 are released. Version 1.3.1 contains these commits.

Version 1.3.0

24 اکتبر 2022

androidx.compose.animation:animation:1.3.0 , androidx.compose.animation:animation-core:1.3.0 , and androidx.compose.animation:animation-graphics:1.3.0 are released. Version 1.3.0 contains these commits.

Important changes since 1.2.0

  • New set of easing functions are made stable

Version 1.3.0-rc01

5 اکتبر 2022

androidx.compose.animation:animation:1.3.0-rc01 , androidx.compose.animation:animation-core:1.3.0-rc01 , and androidx.compose.animation:animation-graphics:1.3.0-rc01 are released. Version 1.3.0-rc01 contains these commits.

Version 1.3.0-beta03

21 سپتامبر 2022

androidx.compose.animation:animation:1.3.0-beta03 , androidx.compose.animation:animation-core:1.3.0-beta03 , and androidx.compose.animation:animation-graphics:1.3.0-beta03 are released. Version 1.3.0-beta03 contains these commits.

  • No changes since 1.3.0-beta02.

Version 1.3.0-beta02

7 سپتامبر 2022

androidx.compose.animation:animation:1.3.0-beta02 , androidx.compose.animation:animation-core:1.3.0-beta02 , and androidx.compose.animation:animation-graphics:1.3.0-beta02 are released. Version 1.3.0-beta02 contains these commits.

  • Removed Kotlin.experimental from the compiler options since it is depricated

Version 1.3.0-beta01

24 آگوست 2022

androidx.compose.animation:animation:1.3.0-beta01 , androidx.compose.animation:animation-core:1.3.0-beta01 , and androidx.compose.animation:animation-graphics:1.3.0-beta01 are released. Version 1.3.0-beta01 contains these commits.

Version 1.3.0-alpha03

10 آگوست 2022

androidx.compose.animation:animation:1.3.0-alpha03 , androidx.compose.animation:animation-core:1.3.0-alpha03 , and androidx.compose.animation:animation-graphics:1.3.0-alpha03 are released. Version 1.3.0-alpha03 contains these commits.

API Changes

  • New param in Crossfade , animateAsState and Animatable for tooling label ( Iac08a )
  • Added atFraction function for defining keyframes at a fraction instead of at a specific duration. ( I20c76 , b/232059455 )

Version 1.3.0-alpha02

27 جولای 2022

androidx.compose.animation:animation:1.3.0-alpha02 , androidx.compose.animation:animation-core:1.3.0-alpha02 , and androidx.compose.animation:animation-graphics:1.3.0-alpha02 are released. Version 1.3.0-alpha02 contains these commits.

Version 1.3.0-alpha01

29 ژوئن 2022

androidx.compose.animation:animation:1.3.0-alpha01 , androidx.compose.animation:animation-core:1.3.0-alpha01 , and androidx.compose.animation:animation-graphics:1.3.0-alpha01 are released. Version 1.3.0-alpha01 contains these commits.

API Changes

  • New LookaheadLayout that supports a lookahead pass before the actual measure/layout. This allows a pre-calculation of the layout when it changes, while permitting the post-lookahead measure/layout to use the pre-calculated size/position to animate the size and positions towards the target. SubcomposeLayouts are not yet supported, but will be in an upcoming release. ( I477f5 )

نسخه 1.2

Version 1.2.1

10 آگوست 2022

androidx.compose.animation:animation:1.2.1 , androidx.compose.animation:animation-core:1.2.1 , and androidx.compose.animation:animation-graphics:1.2.1 are released. Version 1.2.1 contains these commits.

Version 1.2.0

27 جولای 2022

androidx.compose.animation:animation:1.2.0 , androidx.compose.animation:animation-core:1.2.0 , and androidx.compose.animation:animation-graphics:1.2.0 are released. Version 1.2.0 contains these commits.

Important changes since 1.1.0

  • Compose animation now supports 'Animator duration scale' setting from Developer Options.
  • A large selection of new experimental easing curves.
  • AnimatedImageVector now supports repeatCount and repeatMode

Version 1.2.0-rc03

29 ژوئن 2022

androidx.compose.animation:animation:1.2.0-rc03 , androidx.compose.animation:animation-core:1.2.0-rc03 , and androidx.compose.animation:animation-graphics:1.2.0-rc03 are released. Version 1.2.0-rc03 contains these commits.

  • No changes since 1.2.0-rc02.

Version 1.2.0-rc02

22 ژوئن 2022

androidx.compose.animation:animation:1.2.0-rc02 , androidx.compose.animation:animation-core:1.2.0-rc02 , and androidx.compose.animation:animation-graphics:1.2.0-rc02 are released. Version 1.2.0-rc02 contains these commits.

رفع اشکال

  • Removed ExperimentalEasingApi annotation on Easing functions ( Ied441 )

Version 1.2.0-rc01

15 ژوئن 2022

androidx.compose.animation:animation:1.2.0-rc01 , androidx.compose.animation:animation-core:1.2.0-rc01 , and androidx.compose.animation:animation-graphics:1.2.0-rc01 are released. Version 1.2.0-rc01 contains these commits.

API Changes

  • Interfaces in compose libraries are now built using jdk8 default interface methods ( I5bcf1 )

Version 1.2.0-beta03

1 ژوئن 2022

androidx.compose.animation:animation:1.2.0-beta03 , androidx.compose.animation:animation-core:1.2.0-beta03 , and androidx.compose.animation:animation-graphics:1.2.0-beta03 are released. Version 1.2.0-beta03 contains these commits.

API Changes

  • Added Experimental Easing Curves for Animations ( I64a38 )

Version 1.2.0-beta02

18 مه 2022

androidx.compose.animation:animation:1.2.0-beta02 , androidx.compose.animation:animation-core:1.2.0-beta02 , and androidx.compose.animation:animation-graphics:1.2.0-beta02 are released. Version 1.2.0-beta02 contains these commits.

Version 1.2.0-beta01

11 مه 2022

androidx.compose.animation:animation:1.2.0-beta01 , androidx.compose.animation:animation-core:1.2.0-beta01 , and androidx.compose.animation:animation-graphics:1.2.0-beta01 are released. Version 1.2.0-beta01 contains these commits.

  • This is the first beta release of 1.2! There are no changes since the last alpha.

Version 1.2.0-alpha08

20 آوریل 2022

androidx.compose.animation:animation:1.2.0-alpha08 , androidx.compose.animation:animation-core:1.2.0-alpha08 , and androidx.compose.animation:animation-graphics:1.2.0-alpha08 are released. Version 1.2.0-alpha08 contains these commits.

Version 1.2.0-alpha07

6 آوریل 2022

androidx.compose.animation:animation:1.2.0-alpha07 , androidx.compose.animation:animation-core:1.2.0-alpha07 , and androidx.compose.animation:animation-graphics:1.2.0-alpha07 are released. Version 1.2.0-alpha07 contains these commits.

API Changes

  • AnimatedImageVector now supports repeatCount and repeatMode ( Ia3e75 , b/199304067 )

Version 1.2.0-alpha06

23 مارس 2022

androidx.compose.animation:animation:1.2.0-alpha06 , androidx.compose.animation:animation-core:1.2.0-alpha06 , and androidx.compose.animation:animation-graphics:1.2.0-alpha06 are released. Version 1.2.0-alpha06 contains these commits.

API Changes

  • Updated parsing of vector drawables to support auto mirroring to flip the content of a VectorPainter if the current layout direction is RTL. ( I79cd9 , b/185760237 )

رفع اشکال

  • Updated Vector graphics APIs to use the proper composable annotation @VectorComposable instead of @UiComposable ( I942bc )

Version 1.2.0-alpha05

9 مارس 2022

androidx.compose.animation:animation:1.2.0-alpha05 , androidx.compose.animation:animation-core:1.2.0-alpha05 , and androidx.compose.animation:animation-graphics:1.2.0-alpha05 are released. Version 1.2.0-alpha05 contains these commits.

API Changes

  • هورا! Compose animation now supports 'Animator duration scale' setting from Developer Options. ( I5a4fc , b/161675988 )

Version 1.2.0-alpha04

23 فوریه 2022

androidx.compose.animation:animation:1.2.0-alpha04 , androidx.compose.animation:animation-core:1.2.0-alpha04 , and androidx.compose.animation:animation-graphics:1.2.0-alpha04 are released. Version 1.2.0-alpha04 contains these commits.

Version 1.2.0-alpha03

9 فوریه 2022

androidx.compose.animation:animation:1.2.0-alpha03 , androidx.compose.animation:animation-core:1.2.0-alpha03 , and androidx.compose.animation:animation-graphics:1.2.0-alpha03 are released. Version 1.2.0-alpha03 contains these commits.

Version 1.2.0-alpha02

26 ژانویه 2022

androidx.compose.animation:animation:1.2.0-alpha02 , androidx.compose.animation:animation-core:1.2.0-alpha02 , and androidx.compose.animation:animation-graphics:1.2.0-alpha02 are released. Version 1.2.0-alpha02 contains these commits.

Version 1.2.0-alpha01

12 ژانویه 2022

androidx.compose.animation:animation:1.2.0-alpha01 , androidx.compose.animation:animation-core:1.2.0-alpha01 , and androidx.compose.animation:animation-graphics:1.2.0-alpha01 are released. Version 1.2.0-alpha01 contains these commits.

API Changes

  • Use AnimatedImageVector.animatedVectorResource instead of animatedVectorResource to load an <animated-vector> resource file.
    • Use rememberAnimatedVectorResource instead of AnimatedImageVector#painterFor to render an AnimatedImageVector . ( I9c300 )

رفع اشکال

  • Add toString methods to Animatable and AnimationResult. ( Icd3a6 )

Dependency Updates

  • Now depends on Kotlin 1.6.10 .

نسخه 1.1

نسخه 1.1.1

23 فوریه 2022

androidx.compose.animation:animation:1.1.1 , androidx.compose.animation:animation-core:1.1.1 , and androidx.compose.animation:animation-graphics:1.1.1 are released. Version 1.1.1 contains these commits.

رفع اشکال

Version 1.1.0

9 فوریه 2022

androidx.compose.animation:animation:1.1.0 , androidx.compose.animation:animation-core:1.1.0 , and androidx.compose.animation:animation-graphics:1.1.0 are released. Version 1.1.0 contains these commits.

Important changes since 1.0.0

  • Stable support for the Android 12 Overscroll effect
  • Improvements to touch target sizing
  • Note that, with respect to Compose 1.0, Material components will expand their layout space to meet Material accessibility guidelines for touch target size . For instance, Button touch target will expand to a minimum size of 48x48dp, even if you set the Button's size to be smaller. This aligns Compose Material to the same behavior of Material Design Components, providing consistent behavior if you mix Views and Compose. This change also ensures that when you create your UI using Compose Material components, minimum requirements for touch target accessibility will be met.
  • Stable support for Navigation Rail
  • Graduates a number of previously experimental APIs to stable
  • Support for newer versions of Kotlin

Version 1.1.0-rc03

26 ژانویه 2022

androidx.compose.animation:animation:1.1.0-rc03 , androidx.compose.animation:animation-core:1.1.0-rc03 , and androidx.compose.animation:animation-graphics:1.1.0-rc03 are released. Version 1.1.0-rc03 contains these commits.

رفع اشکال

  • Updated to support Compose Material 1.1.0-rc03

Version 1.1.0-rc01

15 دسامبر 2021

androidx.compose.animation:animation:1.1.0-rc01 and androidx.compose.animation:animation-core:1.1.0-rc01 are released. Version 1.1.0-rc01 contains these commits.

API Changes

  • Use AnimatedImageVector.animatedVectorResource instead of animatedVectorResource to load an <animated-vector> resource file.
    • Use rememberAnimatedVectorResource instead of AnimatedImageVector#painterFor to render an AnimatedImageVector . ( I9c300 )

Version 1.1.0-beta04

1 دسامبر 2021

androidx.compose.animation:animation:1.1.0-beta04 , androidx.compose.animation:animation-core:1.1.0-beta04 , and androidx.compose.animation:animation-graphics:1.1.0-beta04 are released. Version 1.1.0-beta04 contains these commits.

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

  • Updated to be compatible with Kotlin 1.6.0

Version 1.1.0-beta03

17 نوامبر 2021

androidx.compose.animation:animation:1.1.0-beta03 , androidx.compose.animation:animation-core:1.1.0-beta03 , and androidx.compose.animation:animation-graphics:1.1.0-beta03 are released. Version 1.1.0-beta03 contains these commits.

API Changes

  • Added new modifier Modifier.onPlaced to allow placement change to be observed. Additional changes to child modifier's offset can therefore be made based on the observed placement change. ( I558fd )
  • New support for contentKey in Crossfade. ContentKey will be used for equality check by animation system. Therefore custom diffing on states can be achieved via specifying appropriate contentKey for different states.

    ContentKey will also be used as the key for save & restore content. ( I2e055 , b/197907070 )

Version 1.1.0-beta02

3 نوامبر 2021

androidx.compose.animation:animation:1.1.0-beta02 , androidx.compose.animation:animation-core:1.1.0-beta02 , and androidx.compose.animation:animation-graphics:1.1.0-beta02 are released. Version 1.1.0-beta02 contains these commits.

رفع اشکال

  • New animation APIs for supporting tooling. Specifically, they allow tooling to inspect the animations & their configurations in a Transitions. ( I4116e )

Version 1.1.0-beta01

27 اکتبر 2021

androidx.compose.animation:animation:1.1.0-beta01 , androidx.compose.animation:animation-core:1.1.0-beta01 , and androidx.compose.animation:animation-graphics:1.1.0-beta01 are released. Version 1.1.0-beta01 contains these commits.

API Changes

  • New animation APIs for supporting tooling. Specifically, they allow tooling to inspect the animations & their configurations in a Transitions. ( I4116e )

Version 1.1.0-alpha06

October 13, 2021

androidx.compose.animation:animation:1.1.0-alpha06 , androidx.compose.animation:animation-core:1.1.0-alpha06 , and androidx.compose.animation:animation-graphics:1.1.0-alpha06 are released. Version 1.1.0-alpha06 contains these commits.

Version 1.1.0-alpha05

29 سپتامبر 2021

androidx.compose.animation:animation:1.1.0-alpha05 , androidx.compose.animation:animation-core:1.1.0-alpha05 , and androidx.compose.animation:animation-graphics:1.1.0-alpha05 are released. Version 1.1.0-alpha05 contains these commits.

API Changes

  • EnterTransition , ExitTransition , and some of the AnimatedVisibility APIs have been made stable. MutableTransitionState.isIdle is also no longer experimental. ( I5072d )

  • Breaking change : lambdas in Enter/ExitTransition factories have been moved to the last position in the param list. ( I5072d )

Version 1.1.0-alpha04

15 سپتامبر 2021

androidx.compose.animation:animation:1.1.0-alpha04 , androidx.compose.animation:animation-core:1.1.0-alpha04 , and androidx.compose.animation:animation-graphics:1.1.0-alpha04 are released. Version 1.1.0-alpha04 contains these commits.

Version 1.1.0-alpha03

1 سپتامبر 2021

androidx.compose.animation:animation:1.1.0-alpha03 , androidx.compose.animation:animation-core:1.1.0-alpha03 , and androidx.compose.animation:animation-graphics:1.1.0-alpha03 are released. Version 1.1.0-alpha03 contains these commits.

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

  • Updated Compose 1.1.0-alpha03 to depend on Kotlin 1.5.30 . ( I74545 )

Version 1.1.0-alpha02

18 آگوست 2021

androidx.compose.animation:animation:1.1.0-alpha02 , androidx.compose.animation:animation-core:1.1.0-alpha02 , and androidx.compose.animation:animation-graphics:1.1.0-alpha02 are released. Version 1.1.0-alpha02 contains these commits.

API Changes

  • StartOffset is now supported in repeatable and infiniteRepeatable, as a way to delay the start time or fast forward the animation before the animation starts. This start offset will not be repeated ( Ic679f , b/195079908 )
  • New Enter/Exit transition for scale. It can be used in combination with other types of Enter/ExitTransitions. ( I372da , b/191325593 )

Version 1.1.0-alpha01

4 آگوست 2021

androidx.compose.animation:animation:1.1.0-alpha01 , androidx.compose.animation:animation-core:1.1.0-alpha01 , and androidx.compose.animation:animation-graphics:1.1.0-alpha01 are released. Version 1.1.0-alpha01 contains these commits.

API Changes

  • AnimatedImageVector and the related APIs are now in the new androidx.compose.animation:animation-graphics module. ( I60873 )

رفع اشکال

نسخه 1.0

Version 1.0.5

3 نوامبر 2021

androidx.compose.animation:animation:1.0.5 and androidx.compose.animation:animation-core:1.0.5 are released. Version 1.0.5 contains these commits.

رفع اشکال

  • Fixed a crash tracking derivedStateOf instances. ( aosp/1792247 )

Version 1.0.4

October 13, 2021

androidx.compose.animation:animation:1.0.4 and androidx.compose.animation:animation-core:1.0.4 are released. Version 1.0.4 contains these commits.

Dependency Updates

  • Updated to depend on Kotlin 1.5.31

Version 1.0.3

29 سپتامبر 2021

androidx.compose.animation:animation:1.0.3 and androidx.compose.animation:animation-core:1.0.3 are released. Version 1.0.3 contains these commits.

Dependency Updates

  • Updated to depend on Kotlin 1.5.30

نسخه 1.0.2

1 سپتامبر 2021

androidx.compose.animation:animation:1.0.2 and androidx.compose.animation:animation-core:1.0.2 are released. Version 1.0.2 contains these commits.

Updated to support the Compose 1.0.2 release. Compose 1.0.2 is still compatible with Kotlin 1.5.21 .

Version 1.0.1

4 آگوست 2021

androidx.compose.animation:animation:1.0.1 and androidx.compose.animation:animation-core:1.0.1 are released. Version 1.0.1 contains these commits.

Dependency Updates

  • Updated to depend on Kotlin 1.5.21 .

Version 1.0.0

28 ژوئیه 2021

androidx.compose.animation:animation:1.0.0 and androidx.compose.animation:animation-core:1.0.0 are released. Version 1.0.0 contains these commits.

Major features of 1.0.0

This is the first stable release of Compose. Please see the official Compose Release blog for more details!

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

  • If you are using Android Studio Bumblebee Canary 4 or AGP 7.1.0-alpha04 / 7.1.0-alpha05 , you may hit the following crash:

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

    To fix, temporarily increase your minSdkVersion to 24+ in your build.gradle file. This issue will be fixed in the next version of Android Studio Bumblebee and AGP 7.1 . ( b/194289155 )

Version 1.0.0-rc02

14 جولای 2021

androidx.compose.animation:animation:1.0.0-rc02 and androidx.compose.animation:animation-core:1.0.0-rc02 are released. Version 1.0.0-rc02 contains these commits.

Version 1.0.0-rc01

1 ژوئیه 2021

androidx.compose.animation:animation:1.0.0-rc01 and androidx.compose.animation:animation-core:1.0.0-rc01 are released. Version 1.0.0-rc01 contains these commits.

رفع اشکال

Version 1.0.0-beta09

June 16, 2021

androidx.compose.animation:animation:1.0.0-beta09 and androidx.compose.animation:animation-core:1.0.0-beta09 are released. Version 1.0.0-beta09 contains these commits.

API Changes

  • New AnimatedContent Composable. It manages its content change using customizable ContentTransform as new target content enters and initial content leaves. Different combination of enter and exit transitions can be used to produce a customized look and feel. As a part of the content transform, AnimatedContent automatically animates its size to match the incoming content. ( I2c3df )
  • Removed ManualFrameClock . If you need to control animations, use composeTestRule.mainClock instead. ( I3c3e8 , b/189951065 )

Added Profile Rules

This release adds profile rules to the following compose modules ( 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

What are profile rules?

  • Profile rules for a library are specified in a text file baseline-prof.txt located in the src/main or equivalent directory. The file specifies a rule per line, where a rule in this case is a pattern for matching to methods or classes in the library. The syntax for these rules is a superset of the human-readable ART profile format that is used when using adb shell profman --dump-classes-and-methods ... . These rules take one of two forms to target either methods or classes.

  • A method rule will have the following pattern:

    <FLAGS><CLASS_DESCRIPTOR>-><METHOD_SIGNATURE>
    
  • And a class rule will have the following pattern:

    <CLASS_DESCRIPTOR>
    
  • Here <FLAGS> is one or more of the characters H , S , and P to indicate whether or not this method should be flagged as "Hot", "Startup", or "Post Startup".

  • The <CLASS_DESCRIPTOR> is the descriptor for the class that the targeted method belongs to. For example, the class androidx.compose.runtime.SlotTable would have a descriptor of Landroidx/compose/runtime/SlotTable; .

  • The <METHOD_SIGNATURE> is the signature of the method, and includes the name, parameter types, and return types of the method. For example, the method fun isPlaced(): Boolean on LayoutNode has the signature isPlaced()Z .

  • These patterns can have wildcards ( ** , * , and ? ) in order to have a single rule encompass multiple methods or classes.

What do the rules do?

  • A method that has the flag H indicates that this method is a "hot" method, and should be compiled ahead of time.

  • A method that has the flag S indicates that it is a method which is called at startup, and should be compiled ahead of time to avoid the cost of compilation and interpreting the method at startup time.

  • A method that has the flag P indicates that it is a method which is called after startup.

  • A class that is present in this file indicates that it is used during startup and should be pre-allocated in the heap to avoid the cost of class loading.

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

  • Libraries can define these rules which will be packaged in AAR artifacts. When an app is then built which includes these artifacts, these rules are merged together and the merged rules are used to build a compact binary ART profile that is specific to the app. ART can then leverage this profile when the app is installed on devices in order to ahead-of-time compile a specific subset of the application to improve the performance of the application, especially the first run. Note that this will have no effect on debuggable applications.

Version 1.0.0-beta08

2 ژوئن 2021

androidx.compose.animation:animation:1.0.0-beta08 and androidx.compose.animation:animation-core:1.0.0-beta08 are released. Version 1.0.0-beta08 contains these commits.

رفع اشکال

  • Now detectDragGesures , detectVerticalGestures , and detectHorizontalGestures will consume the position change automatically, no need to call change.consumePositionChange in the onDrag callbacks ( I42fc4 , b/185096350 , b/187320697 )
  • Modifier.onGloballyPositioned() was changed to report the coordinates of this modifier in the modifier chain, not the layout coordinates after applying all the modifiers. This means that now the ordering of modifiers is affecting what coordinates would be reported. ( Ieb67d , b/177926591 )

Version 1.0.0-beta07

18 مه 2021

androidx.compose.animation:animation:1.0.0-beta07 and androidx.compose.animation:animation-core:1.0.0-beta07 are released. Version 1.0.0-beta07 contains these commits.

API Changes

  • New AnimatedVisibility API that support visibility to be specified in a MutableTransitionState . This also allows the animation states to be observed external to AnimatedVisibility via currentState and isIdle .
    • New child transition support in Transition
    • Support custom exit/enter transition animation in AnimatedVisibility using AnimationScope.transition
    • New animateEnterExit modifier accessible for all children of AnimatedVisibility
    • Deprecated the AnimatedVisibility APIs that take an initiallyVisible parameter ( I702f3 )

Version 1.0.0-beta06

5 مه 2021

androidx.compose.animation:animation:1.0.0-beta06 and androidx.compose.animation:animation-core:1.0.0-beta06 are released. Version 1.0.0-beta06 contains these commits.

Version 1.0.0-beta05

21 آوریل 2021

androidx.compose.animation:animation:1.0.0-beta05 and androidx.compose.animation:animation-core:1.0.0-beta05 are released. Version 1.0.0-beta05 contains these commits.

رفع اشکال

  • The AndroidManifest files from ui-test-manifest and ui-tooling-data are now compatible with Android 12 ( I6f9de , b/184718994 )

Version 1.0.0-beta04

7 آوریل 2021

androidx.compose.animation:animation:1.0.0-beta04 and androidx.compose.animation:animation-core:1.0.0-beta04 are released. Version 1.0.0-beta04 contains these commits.

API Changes

  • Public instances of RowScope , ColumnScope , BoxScope , BoxWithConstraintsScope were removed. ( I4e83e , b/181869067 )

Version 1.0.0-beta03

24 مارس 2021

androidx.compose.animation:animation:1.0.0-beta03 and androidx.compose.animation:animation-core:1.0.0-beta03 are released. Version 1.0.0-beta03 contains these commits.

Version 1.0.0-beta02

10 مارس 2021

androidx.compose.animation:animation:1.0.0-beta02 and androidx.compose.animation:animation-core:1.0.0-beta02 are released. Version 1.0.0-beta02 contains these commits.

رفع اشکال

Version 1.0.0-beta01

24 فوریه 2021

androidx.compose.animation:animation:1.0.0-beta01 and androidx.compose.animation:animation-core:1.0.0-beta01 are released. Version 1.0.0-beta01 contains these commits.

This is the first release of Compose 1.0.0 Beta.

API Changes

  • InteractionState has been replaced with [Mutable]InteractionSource
    • Interfaces are responsible for emitting / collecting Interaction events.
    • Instead of passing interactionState = remember { InteractionState() } to components such as Button and Modifier.clickable() , use interactionSource = remember { MutableInteractionSource() } .
    • Instead of: Interaction.Pressed in interactionState you should instead use the extension functions on InteractionSource, such as InteractionSource.collectIsPressedAsState().
    • For complex use cases you can use InteractionSource.interactions to observe the stream of Interactions. See the InteractionSource documentation and samples for more information.
    • ( I85965 , b/152525426 , b/171913923 , b/171710801 , b/174852378 )
  • smoothScrollBy and scrollBy methods' packages changed to androidx.compose.foundation.gestures.* ( I3f7c1 , b/175294473 )
  • Size modifiers were renamed. Modifier.width/height/size were renamed to requiredWidth/requiredHeight/requiredSize. Modifier.preferredWidth/preferredHeight/preferredSize were renamed to width/height/size. ( I5b414 )
  • Orientation has been moved to foundation package. VelocirtTracker moved from ui.gesture to ui.input.pointer. ( Iff4a8 , b/175294473 )
  • AnimationClockObservable and subclasses have been removed. AnimatedFloat has been removed. ( Icde52 , b/177457083 )
  • Modifier.draggable now accepts DraggableState instead of a simple lambda. you can create state via rememberDraggableState { delta -> } to get the same behaviour as before ( Ica70f , b/175294473 )
  • animate, animatedValue, AnimatedValue APIs have been removed ( If27bc , b/177457083 )
  • AnimationEndReason.Interrupted is removed. CancellationException will be throws if animation is interrupted. ( I2cbbc , b/179695417 )
  • TargetAnimation API has been removed. ( If47d1 , b/177457083 )

Version 1.0.0-alpha12

10 فوریه 2021

androidx.compose.animation:animation:1.0.0-alpha12 and androidx.compose.animation:animation-core:1.0.0-alpha12 are released. Version 1.0.0-alpha12 contains these commits.

API Changes

  • Modifier.pointerInput now requires remember keys to indicate when the pointer input detection coroutine should restart for new dependencies. ( I849cd )
  • Bounds has been renamed to DpRect ( I4b32a )
  • Unified the param name for AnimationSpec to animationSpec across the animation system. Also constrain the Enter/ExitTransition to accept FiniteAnimationSpec. ( Ie47c5 , b/177457083 )
  • Animatable.snapTo and Animatable.stop are now suspend functions ( If4288 )
  • Similarly to how we previously removed state { 0 } composable and now promote usage like remember { mutableStateOf(0) } we are going to remove savedInstanceState { 0 } composable. You should use rememberSaveable { mutableStateOf(0) } instead and it will save and restore automatically if the type used inside the MutableState can be stored in the Bundle. If previously you were passing a custom saver object now you need to use a new overload of rememberSaveable which has stateSaver parameter. The usage will look like this: val holder = rememberSaveable(stateSaver = HolderSaver) { mutableStateOf(Holder(0)) } ( Ib4c26 , b/177338004 )
  • Updated Crossfade's method signature to be more consistent with the rest of the animation system. ( Ib05ed , b/177457083 )
  • rememberSavedInstanceState() was renamed to rememberSaveable() and moved to androidx.compose.runtime.saveable package. ( I1366e , b/177338004 )
  • RestorableStateHolder was renamed to SaveableStateHolder and moved to androidx.compose.runtime.saveable package. Inner method RestorableStateProvider was renamed to SaveableStateProvider. Generic type was removed so you can just pass Any as a key. Experimental annotation is not needed anymore. ( I0902e , b/174598702 )
  • Updated Modifier.animateContentSize API to be consistent with the rest of the animation system. ( I0bf75 , b/177457083 )
  • AnimatedValue/Float is now deprecated. Please use Animatable instead. ( I71345 , b/177457083 )
  • tapGestureFilter, doubleTapGestureFilter, longPressGestureFilter and pressIndicaitonGestureFilter have been deprecated. Use Modifier.clickable or Modifier.pointerInput with detectTapGestures function instead. ( I6baf9 , b/175294473 )
  • Introduced an InfiniteAnimationPolicy coroutine context element that will be applied in infinite animations. By default no policy is installed, except when running tests with ComposeTestRule . ( I50ec4 , b/151940543 )
  • Destructuring and copy() methods have been removed from several classes where they were rarely used. ( I26702 , b/178659281 )
  • Playtime in animation is now unfiied to nanoseconds ( If776a )
  • The compose:runtime-dispatch artifact is now deprecated. MonotonicFrameClock can now be found in compose:runtime and AndroidUiDispatcher can be found in compose:ui. ( Ib5c36 )
  • Added Animation.isInfinite and VectorizedAnimationSpec.isInfinite that signal if an animation is infinite or not. This can be used in implementations of animations to have special handling of such animations. For example, a special "time remaining" message can be shown, or during tests the animation can be cancelled to prevent waiting for idleness indefinitely. ( Iebb05 , b/151940543 )
  • Use Long instead of Uptime as animation time type ( Ie3aa7 , b/177420019 )

Version 1.0.0-alpha11

28 ژانویه 2021

androidx.compose.animation:animation:1.0.0-alpha11 and androidx.compose.animation:animation-core:1.0.0-alpha11 are released. Version 1.0.0-alpha11 contains these commits.

API Changes

  • TransitionDefinition-based Transition has been deprecated ( I0ac57 )
  • A label field is added for Transition and child animations to be displayed in tools ( I619fb )
  • animateAsState is now animateFooAsState, where Foo is the type of the variable being animated. eg Float, Dp, Offset, etc ( Ie7e25 )
  • New InfiniteTransition that runs any number of child animations. ( I1da81 )
  • Changes Material stateful parameter interfaces to have @Composable functions that return State<T> . Adds Animatable.asState() to make it easier to convert an Animatable to a State. Also changes animateElevation to be a suspend extension on Animatable. ( If613c )

رفع اشکال

  • onCommit, onDispose, and onActive have been deprecated in favor of SideEffect and DisposableEffect APIs ( If760e )
  • Initial State in updateTransition is now supported ( Ifd51d )
  • Content description parameter has been added to the Image and Icon. It is used to provide description to the accessibility services ( I2ac4c )
  • invalidate and compositionReference() are now deprecated in favor of currentRecomposeScope and rememberCompositionReference respectively. ( I583a8 )
  • Duration and Uptime will be replace with Long milliseconds, and this step removes the dependency of pointer input on those classes. ( Ia33b2 , b/175142755 , b/177420019 )
  • clickable, toggleable and selectable can be created outside of composition now ( I0a130 , b/172938345 , b/175294473 )
  • Easing has been changed to a functional interface ( Ib14e5 )
  • New items(count: Int) factory method for scope of LazyColumn/LazyRow/LazyVerticalGrid. items(items: List) and itemsIndexed(items: List) are now extension functions so you have to manually import them when used. New extension overloads for Arrays: items(items: Array) and itemsIndexed(Array) ( I803fc , b/175562574 )
  • Leverage TestCoroutineDispatcher in testing ( I532b6 )
  • Removed PointerInputData and modified PointerInputChange to give it all of PointerInputData's fields. Made PointerInputEvent and PointerInputEventData internal because they aren't used in any public API. ( Ifff97 , b/175142755 )

Version 1.0.0-alpha10

13 ژانویه 2021

androidx.compose.animation:animation:1.0.0-alpha10 and androidx.compose.animation:animation-core:1.0.0-alpha10 are released. Version 1.0.0-alpha10 contains these commits.

API Changes

  • Modified Velocity to have component parts and mathematical operations. ( Ib0447 )
  • Renamed @ExperimentalTesting to @ExperimentalTestApi to be consistent with similar experimental api annotations ( Ia4502 , b/171464963 )
  • Renamed Position to DpOffset and removed getDistance() ( Ib2dfd )
  • Removed Any.identityHashCode() public api ( I025d7 )

رفع اشکال

  • New coroutine-based API Animatable that ensures mutual exclusiveness among its animations. New DecayAnimationSpec to support multi-dimensional decay animation ( I820f2 , b/168014930 )
  • animate() is now replaced with animateAsState() , which returns a State<T> instead of T . This allows better performance, as the invalidation scope can be narrowed down to where the State value is read. ( Ib179e )

Version 1.0.0-alpha09

16 دسامبر 2020

androidx.compose.animation:animation:1.0.0-alpha09 and androidx.compose.animation:animation-core:1.0.0-alpha09 are released. Version 1.0.0-alpha09 contains these commits.

API Changes

  • Moved Dp.VectorConverter, Position.VectorConverter, etc to animation-core, and deprecated the old VectorConveters ( If0c4b )
  • Introduced a whole new set of Transition APIs with improved ease of use, and support for dynamically added animations, and dynamically calculated animation targets. This APIs are marked experimental for easy differentiation from the TransitionDefinition-based API. ( Ia7fe3 )

رفع اشکال

  • Lambdas in offset modifiers now return IntOffset rather than Float. ( Ic9ee5 , b/174137212 , b/174146755 )
  • Deprecate LazyColumnFor, LazyRowFor, LazyColumnForIndexed and LazyRowForIndexed. Use LazyColumn and LazyRow instead ( I5b48c )
  • For suspending pointer input APIs, renamed HandlePointerInputScope to AwaitPointerEventScope and handlePointerInput() to awaitPointerEventScope(). ( Idf0a1 , b/175142755 )
  • New infiniteRepeatable function for creating an InfiniteRepeatableSpec ( I668e5 )
  • Removed ExperimentalPointerInput annotation ( Ia7a24 )

Version 1.0.0-alpha08

2 دسامبر 2020

androidx.compose.animation:animation:1.0.0-alpha08 and androidx.compose.animation:animation-core:1.0.0-alpha08 are released. Version 1.0.0-alpha08 contains these commits.

API Changes

  • Added lint check for composable lambda parameter naming and position, to check for consistency with Compose guidelines. Also migrated some APIs using children as the name for their trailing lambda to content , according to the lint check and guidance. ( Iec48e )
  • Previously Deprecated APIs were removed:
    • Modifier.onPositioned was removed, use Modifier.onGloballyPositioned .
    • Modifier.onDraw was removed, use Modifier.onDrawBehind .
    • Modifier.plus was removed, use Modifier.then .
    • Color.Unset was removed, use Color.Unspecified .
    • PxBounds class was removed, use Rect instead.
    • ( Ie9d02 , b/172562222 )
  • Temporarily added option to let the TestAnimationClock be driven by the MonotonicFrameClock ( I1403b , b/173402197 )

رفع اشکال

  • Renamed Modifier.drawLayer to Modifier.graphicsLayer Also updated related classes to GraphicsLayer as per API council feedback. ( I0bd29 , b/173834241 )
  • Added Modifier.scale/rotate APIs as conveniences for drawLayer.
    • Renamed Modifier.drawOpacity to Modifier.alpha
    • Renamed Modifier.drawShadow to Modifier.shadow ( I264ca , b/173208140 )
  • Made PointerInputData's uptime and position fields non-nullable. ( Id468a )
  • offsetPx modifiers were renamed to offset. They are now taking lambda parameters instead of State. ( Ic3021 , b/173594846 )
  • New APIs for running animations in coroutines ( Ied662 )
  • Deprecated Ambients named with Ambient as their suffix, and replaced them with new properties prefixed with Ambient, following other Ambients and Compose API guidelines. ( I33440 )
  • Time control in tests (TestAnimationClock and its usages) is now experimental ( I6ef86 , b/171378521 )
  • Remove old ui-test module and its stubs ( I3a7cb )
  • RestorableStateHolder.withRestorableState function was renamed to RestorableStateProvider ( I66640 )
  • The Alignment interface was updated and made functional. ( I46a07 , b/172311734 )

Version 1.0.0-alpha07

11 نوامبر 2020

androidx.compose.animation:animation:1.0.0-alpha07 and androidx.compose.animation:animation-core:1.0.0-alpha07 are released. Version 1.0.0-alpha07 contains these commits.

رفع اشکال

  • The foundation AmbientTextStyle, ProvideTextStyle, and AmbientContentColor have been deprecated. Instead use the new versions available in the Material library. For non-Material applications, you should instead create your own design system specific theming ambients that can be consumed in your own components. ( I74acc , b/172067770 )
  • foundation.Text has been deprecated and replaced with material.Text. For a basic, unopinionated text API that does not consume values from a theme, see androidx.compose.foundation.BasicText. ( If64cb )
  • MeasureResult was moved out of MeasureScope. ( Ibf96d , b/171184002 )
  • Several layout related symbols were moved from androidx.compose.ui to androidx.compose.layout.ui. ( I0fa98 , b/170475424 )

Version 1.0.0-alpha06

28 اکتبر 2020

androidx.compose.animation:animation:1.0.0-alpha06 and androidx.compose.animation:animation-core:1.0.0-alpha06 are released. Version 1.0.0-alpha06 contains these commits.

API Changes

  • Enable transitions in ComposeTestRule; remove option to enable the blinking cursor from ComposeTestRule. ( If0de3 )

Version 1.0.0-alpha05

14 اکتبر 2020

androidx.compose.animation:animation:1.0.0-alpha05 and androidx.compose.animation:animation-core:1.0.0-alpha05 are released. Version 1.0.0-alpha05 contains these commits.

API Changes

  • New Animation interface and subclasses: These classes store the start and end conditions for animations, and therefore allow value and velocity to be queried via only playtime ( Ie95bd , b/163329867 )

رفع اشکال

  • OnPositionedModifier is renamed to OnGloballyPositionedModifier and onPositioned() is renamed to onGloballyPositioned(). ( I587e8 , b/169083903 )
  • Deprecates contentColor() and currentTextStyle() APIs, and replaces them with AmbientContentColor and AmbientTextStyle ambients respectively. You can access the current value by using .current on the ambient property, as with any other ambient. This was change was made for consistency and to avoid having multiple ways to accomplish the same thing. Additionally renames some ambient properties to better describe their purpose as follows:

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

Version 1.0.0-alpha04

1 اکتبر 2020

androidx.compose.animation:animation:1.0.0-alpha04 and androidx.compose.animation:animation-core:1.0.0-alpha04 are released. Version 1.0.0-alpha04 contains these commits.

API Changes

  • Annotated rootAnimationClockFactory, transitionsEnabled, blinkingCursorEnabled and textInputServiceFactory with @VisibleForTesting, make them internal API and hide their kdoc ( I554eb , b/168308412 )

رفع اشکال

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

Version 1.0.0-alpha03

16 سپتامبر 2020

androidx.compose.animation:animation:1.0.0-alpha03 and androidx.compose.animation:animation-core:1.0.0-alpha03 are released. Version 1.0.0-alpha03 contains these commits.

رفع اشکال

  • Usages of gravity were consistently renamed to align or alignment in layout APIs. ( I2421a , b/164077038 )

Version 1.0.0-alpha02

2 سپتامبر 2020

androidx.compose.animation:animation:1.0.0-alpha02 and androidx.compose.animation:animation-core:1.0.0-alpha02 are released. Version 1.0.0-alpha02 contains these commits.

API Changes

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

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

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

    ( I0a85b , b/161247083 )

رفع اشکال

  • onPreCommit is deprecated; onCommit now has onPreCommit's behavior.

    onCommit and onActive now run in the same choreographer frame that the composition changes committed in rather than at the beginning of the next choreographer frame. ( I70403 )

Version 1.0.0-alpha01

26 آگوست 2020

androidx.compose.animation:animation:1.0.0-alpha01 and androidx.compose.animation:animation-core:1.0.0-alpha01 are released. Version 1.0.0-alpha01 contains these commits.

Version 0.1.0-dev

Version 0.1.0-dev17

19 آگوست 2020

androidx.compose.animation:animation:0.1.0-dev17 and androidx.compose.animation:animation-core:0.1.0-dev17 are released. Version 0.1.0-dev17 contains these commits.

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

API Changes

  • Offset has become an inline class ( Iaec70 )
  • IntOffset is now an inline class ( Iac0bf )
  • IntSize is now an inline class ( I2bf42 )
  • AnimatedVisibilty composable animates the appearance and disappearance of the child content.

    EnterTransition and ExitTransition are introduced to work with AnimatedVisibilty composable to provide 3 different typs of appearance and disappearance animation: fade, slide, and expand/shrink the content. The different types of animations can be combined to achieve more bespoke look and feel. ( Idda11 )

  • Deprecated PxBounds in favor of Rect. Updated all usages of PxBounds with rect and added proper deprecate/replace with annotations to assist with the migration. ( I37038 , b/162627058 )

رفع اشکال

  • PlacementScope.placeAbsolute() was renamed to PlacementScope.place() , and the previous PlacementScope.place() was renamed to PlacementScope.placeRelative() . As a result, the PlacementScope.place() method will not automatically mirror the position in right-to-left contexts anymore. If this is desired, use PlacementScope.placeRelative() instead. ( I873ac , b/162916675 )
  • The state { ... } composable is now deprecated in favor of explicit calls to remember { mutableStateOf(...) } for clarity. This reduces the overall API surface and number of concepts for state management, and matches the by mutableStateOf() pattern for class property delegation. ( Ia5727 )

Version 0.1.0-dev16

5 آگوست 2020

androidx.compose.animation:animation:0.1.0-dev16 and androidx.compose.animation:animation-core:0.1.0-dev16 are released. Version 0.1.0-dev16 contains these commits.

API Changes

  • Built-in vector converters to convert built-in units are now accessible via Foo.VectorConverter . eg Dp.VectorConverter , Color.VectorConverter , Float.VectorConverter , etc ( I3e273 )
  • Support end listener in Modifier.animateContentSize() such that when size change animation finishes, the listener will be notified, along with start/end size of the animation. ( I277b2 )
  • New animateContentSize modifier that animates the layout size change of its child modifier ( Ieffdc )
  • Added MonotonicFrameAnimationClock that enables you to use a MonotonicFrameClock as an AnimationClockObservable to bridge the gap between the new coroutines based clocks and APIs that still use the old callback based clocks.

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

رفع اشکال

  • The APIs for right-to-left support has been updated. LayoutDirectionAmbient has been added, which can be used to read and change the layout direction. Modifier.rtl and Modifier.ltr have been removed. ( I080b3 )
  • Require type T to be explicitly specified for transitionDefinition. ( I1aded )
  • foundation.shape.corner package were flatten to foundation.share ( I46491 , b/161887429 )
  • Modifier.plus has been deprecated, use Modifier.then instead. 'Then' has a stronger signal of ordering, while also prohibits to type Modifier.padding().background() + anotherModifier , which breaks the chain and harder to read ( Iedd58 , b/161529964 )
  • Modifier.drawBackground has been renamed to Modifier.background ( I13677 )

Version 0.1.0-dev15

22 جولای 2020

androidx.compose.animation:animation:0.1.0-dev15 and androidx.compose.animation:animation-core:0.1.0-dev15 are released. Version 0.1.0-dev15 contains these commits.

Dependencies Update

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

API Changes

  • Transition API has been changed to return a TransitionState instead of passing the TransitionState to children. This makes the API more consistent with animate() APIs. ( I24e38 )
  • Modifier parameter added for Crossfade ( I87cfe , b/159706180 )
  • Use AnimationSpec instead of AnimationBuilder in the top level APIs to clarify the concept of static animation specification
    • Improve the transition DSL by removing the lambda requirement for creating AnimationSpecs such as tween, spring. They instead take constructor params directly.
    • Improve the overall ease of use of AnimationSpec opening up constructors instead of relying on builders
    • Change the duration and delay for KeyFrames and Tween to Int. This eliminates unnecessary type casts and method overloading (for supporting both Long and Int). ( Ica0b4 )
  • Replaced usage of IntPx with Int. Replaced IntPxPosition with IntOffset. Replaced IntPxSize with IntSize. ( Ib7b44 )
  • In order to consolidate the number of classes used to represent sizing information, standardize on usage of the Size class instead of PxSize. This provides the benefits of an inline class to leverage a long to pack 2 float values to represent width and height represented as floats. ( Ic0191 )
  • In order to consolidate the number of classes used to represent positioning information, standardize on usage of the Offset class instead of PxPosition. This provides the benefits of an inline class to leverage a long to pack 2 float values to represent x and y offsets represented as floats. ( I3ad98 )
  • Replaced usage of Px class in various compose classes as part of the large refactoring effort to only rely on Dp and primitive types for pixel parameters ( I086f4 )
  • Added animate() support for Dp, Px, Size, Position, Bounds, PxPosition, PxSize, PxBounds, IntPx, IntPxSize, IntPxPosition, IntPxBounds, and AnimationVector ( Ib7518 )
  • Crossfade now accepts optional AnimationBuilder param to allow configuring the animation ( I6d6e0 )
  • Replaced all nullable Color uses in API with non-nullable and use Color.Unset instead of null ( Iabaa7 )
  • Removed ValueHolder class. Restructured AnimatedValue, AnimatedFloat classes to make the animation value field abstract so that subclasses can watch the value update.
    • Added model classes for AnimatedValue, AnimatedFloat, etc.
    • Added a new set of light-weight @Composable API for animating between values. ( I79530 )
  • Breaking changes to the ambients API. See log and Ambient<T> documentation for details ( I4c7ee , b/143769776 )
  • New repeat mode: Reverse. This mode reverses the previous iteration as the animation repeats in RepeatableSpec or VectorizedRepeatableSpec. ( Ibe0f5 )
  • API additions to ManualAnimationClock: hasObservers: Boolean and constructor parameter dispatchOnSubscribe: Boolean ( Iaa134 )
  • Added APIs for getting min/max bounds in AnimatedFloat ( Icd9cc )

رفع اشکال

  • runOnIdleCompose renamed to runOnIdle ( I83607 )
  • Several testing APIs were renamed to be more intuitive. All findXYZ APIs were renamed to onNodeXYZ. All doXYZ APIs were renamed to performXYZ. ( I7f164 )
  • Introduced low level stateless animation APIs. These APIs ( I63bf7 )
  • The Recompose composable is no longer a useful abstraction. Most recomposition should happen as a result of MutableState assignments. For anything beyond that, it is recommended that you use the invalidate function to trigger a recomposition of the current scope. ( Ifc992 )
  • Replaced usage of Px class in various compose classes as part of the large refactoring effort to only rely on Dp and primitive types for pixel parameters. Deleted Px class in its entirety ( I3ff33 )
  • Replaced usage of Px class in various compose classes as part of the large refactoring effort to only rely on Dp and primitive types for pixel parameters ( Id3434 )
  • Crossfade can now work with null as initial value ( Iad6a4 , b/155947711 )
  • Replaced usage of Px class in various compose classes as part of the large refactoring effort to only rely on Dp and primitive types for pixel parameters ( I19d02 )
  • Consolidated CanvasScope implementations so there is now just DrawScope and ContentDrawScope Renamed CanvasScope to DrawScope. Updated DrawScope to implement Density interface and provide LayoutDirection Deleted DrawScope subclass in ContentDrawScope Painter and PainterModifier have been updated to no longer maintain an RTL property themselves as DrawScope provides this already without manually providing it ( I1798e )
  • Updated higher level compose APIs that expose a Canvas to expose CanvasScope instead. This removes the need for consumers to maintain their own Paint objects. For consumers that still require access to a Canvas they can use the drawCanvas extension method which provides a callback to issue drawing commands with the underlying Canvas. ( I80afd )
  • Added verticalGravity and horizontalGravity parameters to Row and Column, respectively. ( I7dc5a )
  • ui-text module is renamed as ui-text-core ( I57dec )
  • Improve DrawModifier API:
    • Made the receiver scope for draw() ContentDrawScope
    • Removed all parameters on draw()
    • DrawScope has same interface as former CanvasScope
    • ContentDrawScope has drawContent() method ( Ibaced , b/152919067 )
  • runOnIdleCompose and runOnUiThread are now global functions instead of methods on ComposeTestRule. ( Icbe8f )
  • [Mutable]State property delegate operators moved to extensions to support Kotlin 1.4 property delegate optimizations. Callers must add imports to continue using by state { ... } or by mutableStateOf(...) . ( I5312c )
  • ColoredRect has been deprecated. Use Box(Modifier.preferredSize(width, height).drawBackground(color)) instead. ( I499fa , b/152753731 )
  • Replaced Modifier plus operator with factory extension functions ( I225e4 )
  • Deprecated Center composable. It should be replaced either with the LayoutSize.Fill + LayoutAlign.Center modifier, or with one of the Box or Stack composables with suitable modifiers applied ( Idf5e0 )
  • Renamed LayoutFlexible to LayoutWeight. Renamed tight parameter to fill. ( If4738 )
  • The Opacity composable function has been replaced with the drawOpacity modifier. ( I5fb62 )
  • Tests using AndroidComposeTestRule now provide an animation clock at the root of the composition that allows it to be paused, resumed and advanced manually. ( Id54c5 )
  • Support right-to-left direction in LayoutPadding modifier ( I9e8da )
  • Density and DensityScope were merged into one interface. Instead of ambientDensity() you can now use DensityAmbient.current. Instead of withDensity(density) just with(density) ( I11cb1 )
  • Added copy methods to various inline class types including:
    • افست
    • اندازه
    • شعاع
    • حرکت
    • TransformOrigin
    • Deprecated Size.copy companion object method favor of instance copy method ( Ife290 , b/159905651 )
  • androidx.compose.ViewComposer has been moved to androidx.ui.node.UiComposer androidx.compose.Emittable has been removed. It was redundant with ComponentNode. androidx.compose.ViewAdapters has been removed. They are no longer a supported use case. Compose.composeInto has been deprecated. Use setContent or setViewContent instead. Compose.disposeComposition has been deprecated. Use the dispose method on the Composition returned by setContent instead. androidx.compose.Compose.subcomposeInto has moved to androidx.ui.core.subcomposeInto ComponentNode#emitInsertAt has been renamed to ComponentNode#insertAt ComponentNode#emitRemoveAt has been renamed to ComponentNode#removeAt ComponentNode#emitMode has been renamed to ComponentNode#move ( Idef00 )
،

Compose Animation

Build animations in their Jetpack Compose applications to enrich the user experience.
آخرین به روز رسانی Stable Release کاندید را آزاد کنید Beta Release Alpha Release
4 سپتامبر 2024 1.7.0 - - 1.8.0-alpha01

ساختار

Compose is a combination of 7 Maven group IDs within androidx . Each group contains a targeted subset of functionality, each with its own set of release notes.

This table explains the groups and links to each set of release notes.

گروه توضیحات
compose.animation Build animations in their Jetpack Compose applications to enrich the user experience.
compose.compiler Transform @Composable functions and enable optimizations with a Kotlin compiler plugin.
compose.foundation Write Jetpack Compose applications with ready to use building blocks and extend foundation to build your own design system pieces.
compose.material Build Jetpack Compose UIs with ready to use Material Design Components. This is the higher level entry point of Compose, designed to provide components that match those described at www.material.io.
compose.material3 Build Jetpack Compose UIs with Material Design 3 Components, the next evolution of Material Design. Material 3 includes updated theming and components and Material You personalization features like dynamic color, and is designed to be cohesive with the new Android 12 visual style and system UI.
compose.runtime Fundamental building blocks of Compose's programming model and state management, and core runtime for the Compose Compiler Plugin to target.
compose.ui Fundamental components of compose UI needed to interact with the device, including layout, drawing, and input.

Declaring dependencies

To add a dependency on Compose, you must add the Google Maven repository to your project. Read Google's Maven repository for more information.

Add the dependencies for the artifacts you need in the build.gradle file for your app or module:

شیار

dependencies {
    implementation "androidx.compose.animation:animation:1.7.0"
}

android {
    buildFeatures {
        compose true
    }

    composeOptions {
        kotlinCompilerExtensionVersion = "1.5.15"
    }

    kotlinOptions {
        jvmTarget = "1.8"
    }
}

کاتلین

dependencies {
    implementation("androidx.compose.animation:animation:1.7.0")
}

android {
    buildFeatures {
        compose = true
    }

    composeOptions {
        kotlinCompilerExtensionVersion = "1.5.15"
    }

    kotlinOptions {
        jvmTarget = "1.8"
    }
}

For more information about dependencies, see Add build dependencies .

بازخورد

Your feedback helps make Jetpack better. Let us know if you discover new issues or have ideas for improving this library. Please take a look at the existing issues in this library before you create a new one. You can add your vote to an existing issue by clicking the star button.

Create a new issue

See the Issue Tracker documentation for more information.

Version 1.8

Version 1.8.0-alpha01

4 سپتامبر 2024

androidx.compose.animation:animation-*:1.8.0-alpha01 is released. Version 1.8.0-alpha01 contains these commits .

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

  • New Modifier.animateBounds API for animating size and position changes within a lookahead scope. 94b9394

API Changes

  • Remove experimental flags on Keyframes with Arcs and Splines ( 89e1199 )

رفع اشکال

  • Skip placeHolderSize logic when no match is found ( 77c0160 )
  • Clamp play time in AndroidFlingSpline to prevent crashes due to non-monotonically increasing play time( 9d47587 )
  • Fix SharedTransitionScope not drawing items in certain conditions ( b41077b6 )

External Contribution

  • Prevent setting seekable transition playTime when no transition is running by Steven Schoen. ( c2e6e7e6 )

Version 1.7

Version 1.7.0

4 سپتامبر 2024

androidx.compose.animation:animation-*:1.7.0 is released.

Important changes since 1.6.0

Important changes in version 1.7.0 are covered in this blogpost .

New Shared Element Transition APIs

  • New shared element transition APIs await your usage and feedback. These new experimental APIs enable tagging layouts as shared across layout tree using the provided modifiers, producing smoothly changing bounds when one set of shared content exits and the other set enters. ( Icb0b9 )
  • New scaleInSharedContentToBounds and scaleOutSharedContentToBounds to scale content in sharedBounds ( I731c1 )
  • Experimental SharedTransitionScope is now an interface rather than a class. ( Iaf856 )
  • New resizeModes ( ScaleToBounds and RemeasureToBounds ) for sharedBounds to choose between scaling and remeasure. The previous scaleIn/OutSharedContentToBounds APIs are now deprecated. ( I0d41a )

Improvements to existing APIs:

  • New Modifier.animateContentSize that takes an additional parameter for custom content alignment. ( I5623a , b/269803907 )
  • New Experimental DeferredTargetAnimation for animating size, position, or any other target that is unknown during instantiation. ( I60745 )
  • SeekableTransitionState replaces snapTo() with seekTo() , and adds a snapTo() that immediately changes the state to a destination state without any kind of animation.
  • You may now pass a periodicBias value (Float) to keyframesWithSpline , this will make it so that the initial and final velocity of the spline are equal. Useful for repeatable animations using splines. The bias indicates how much each velocity (initial and final) gets modified to achieve periodicity. ( Ic1e6c , b/292114811 )

The following APIs have become stable or been removed:

  • AnimatedVisibilityScope.transition is now a stable API. Modifier.animateEnterExit(..) has also been made stable. ( I6c1d1 )
  • ApproachLayoutModifierNode and Modifier.approachLayout are now stable, with new isMeasurementApproachInProgress() and isPlacementApproachInProgress() to replace the old isMeasurementApproachComplete() and isPlacementApproachComplete() respectively.
  • Removed deprecated intermediateLayout modifier. ( I3e91c )
  • LookaheadScope APIs have been made stable. ( I21507 )

Version 1.7.0-rc01

21 آگوست 2024

androidx.compose.animation:animation-*:1.7.0-rc01 is released. Version 1.7.0-rc01 contains these commits .

Version 1.7.0-beta07

7 آگوست 2024

androidx.compose.animation:animation-*:1.7.0-beta07 is released. Version 1.7.0-beta07 contains these commits .

رفع اشکال

  • Fixed SharedTransitionScope not drawing overlay items during transition in certain conditions, which would typically include usage with Navigation. ( Id65ab , b/347520198 )

Version 1.7.0-beta06

24 جولای 2024

androidx.compose.animation:animation-*:1.7.0-beta06 is released. Version 1.7.0-beta06 contains these commits .

رفع اشکال

  • Fixed SeekableTransition leaking transition states by properly cleaning up observations from SnapshotStateObserver when the transition is disposed. ( b9c7182 )
  • Fixed edge cases where child Transitions are not properly marked complete when the parent completes. ( dc42216 )

Version 1.7.0-beta05

10 جولای 2024

androidx.compose.animation:animation-*:1.7.0-beta05 is released. Version 1.7.0-beta05 contains these commits .

رفع اشکال

  • The Transition property totalDurationNanos now can be properly read within a snapshotFlow .

Version 1.7.0-beta04

26 ژوئن 2024

androidx.compose.animation:animation-*:1.7.0-beta04 is released. Version 1.7.0-beta04 contains these commits .

Version 1.7.0-beta03

12 ژوئن 2024

androidx.compose.animation:animation-*:1.7.0-beta03 is released. Version 1.7.0-beta03 contains these commits .

Version 1.7.0-beta02

29 مه 2024

androidx.compose.animation:animation-*:1.7.0-beta02 is released. Version 1.7.0-beta02 contains these commits .

Version 1.7.0-beta01

14 مه 2024

androidx.compose.animation:animation-*:1.7.0-beta01 is released. Version 1.7.0-beta01 contains these commits .

API Changes

  • New resizeModes ( ScaleToBounds and RemeasureToBounds ) for sharedBounds to choose between scaling and remeasure. The previous scaleIn/OutSharedContentToBounds APIs are now deprecated. ( I0d41a )

External Contribution

Version 1.7.0-alpha08

1 مه 2024

androidx.compose.animation:animation-*:1.7.0-alpha08 is released. Version 1.7.0-alpha08 contains these commits .

API Changes

  • LookaheadScope APIs have been made stable. ( I21507 )

External Contribution

  • Clear start animation time after SeekableTransitionState animates/snaps by Steven Schoen ( 1ca89529 )

Version 1.7.0-alpha07

17 آوریل 2024

androidx.compose.animation:animation-*:1.7.0-alpha07 is released. Version 1.7.0-alpha07 contains these commits .

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

  • New shared element transition APIs await your usage and feedback. These new experimental APIs enable tagging layouts as shared across layout tree using the provided modifiers, producing smoothly changing bounds when one set of shared content exits and the other set enters. ( Icb0b9 )
  • New scaleInSharedContentToBounds and scaleOutSharedContentToBounds to scale content in sharedBounds ( I731c1 )

API Changes

  • AnimatedVisibilityScope.transition is now a stable API. Modifier.animateEnterExit(..) has also been made stable. ( I6c1d1 )
  • ApproachLayoutModifierNode and Modifier.approachLayout are now stable, with new isMeasurementApproachInProgress() and isPlacementApproachInProgress() to replace the old isMeasurementApproachComplete() and isPlacementApproachComplete() respectively.
  • Removed deprecated intermediateLayout modifier. ( I3e91c )
  • You may now pass a periodicBias value (Float) to keyframesWithSpline , this will make it so that the initial and final velocity of the spline are equal. Useful for repeatable animations using splines. The bias indicates how much each velocity (initial and final) gets modified to achieve periodicity. ( Ic1e6c , b/292114811 )

رفع اشکال

  • Fixed over-shooting and under-shooting easing curves that would previously be clamped to 0..1 ( I38747 )

Version 1.7.0-alpha06

3 آوریل 2024

androidx.compose.animation:animation-*:1.7.0-alpha06 is released. Version 1.7.0-alpha06 contains these commits .

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

  • Item appearance and disappearance animation support was added into LazyColumn and LazyRow . Previously it was possible to add Modifier.animateItemPlacement() modifier in order to support placement (reordering) animations. We deprecated this modifier and introduced a new non-experimental modifier called Modifier.animateItem() which allows you to support all three animation types: appearance (fade in), disappearance (fade out) and reordering. ( I2d7f7 , b/330152398 , b/150812265 )

رفع اشکال

  • Improved performance of updateTransition API.

Version 1.7.0-alpha05

20 مارس 2024

androidx.compose.animation:animation-*:1.7.0-alpha05 is released. Version 1.7.0-alpha05 contains these commits .

API Changes

  • SeekableTransitionState replaces snapTo() with seekTo() , and adds a snapTo() that immediately changes the state to a destination state without any kind of animation.

Version 1.7.0-alpha04

6 مارس 2024

androidx.compose.animation:animation-*:1.7.0-alpha04 is released. Version 1.7.0-alpha04 contains these commits .

API Changes

  • New API Path.reverse() to reverse a path's direction ( I36348 )

Version 1.7.0-alpha03

February 21, 2024

androidx.compose.animation:animation-*:1.7.0-alpha03 is released. Version 1.7.0-alpha03 contains these commits.

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

  • New Modifier.animateContentSize that takes an additional parameter for custom content alignment. ( I5623a , b/269803907 )
  • New Experimental DeferredTargetAnimation for animating size, position, or any other target that is unknown during instantiation. ( I60745 )

Version 1.7.0-alpha02

7 فوریه 2024

androidx.compose.animation:animation-*:1.7.0-alpha02 is released. Version 1.7.0-alpha02 contains these commits.

رفع اشکال

  • Compatibility fix for KeyframesSpec . ( I2bdf3 , b/322214617 )
  • Fixed Modifier.animateContentSize not resetting properly when used in LazyList . ( I070512 , b/322525716 )
  • Fixed IllegalStateException on KeyframesSpec when using out of range timestamps. ( I341b8 , b/322839811 )

Version 1.7.0-alpha01

24 ژانویه 2024

androidx.compose.animation:animation-*:1.7.0-alpha01 is released. Version 1.7.0-alpha01 contains these commits.

Version 1.6

Version 1.6.8

12 ژوئن 2024

androidx.compose.animation:animation-*:1.6.8 is released. Version 1.6.8 contains these commits .

Version 1.6.7

1 مه 2024

androidx.compose.animation:animation-*:1.6.7 is released. Version 1.6.7 contains these commits .

Version 1.6.6

17 آوریل 2024

androidx.compose.animation:animation-*:1.6.6 is released. No changes since the previous release

Version 1.6.5

3 آوریل 2024

androidx.compose.animation:animation-*:1.6.5 is released. Version 1.6.5 contains these commits .

Version 1.6.4

20 مارس 2024

androidx.compose.animation:animation-*:1.6.4 is released. Version 1.6.4 contains these commits .

Version 1.6.3

6 مارس 2024

androidx.compose.animation:animation-*:1.6.3 is released. Version 1.6.3 contains these commits .

Version 1.6.2

February 21, 2024

androidx.compose.animation:animation-*:1.6.2 is released. Version 1.6.2 contains these commits.

نسخه 1.6.1

7 فوریه 2024

androidx.compose.animation:animation-*:1.6.1 is released. Version 1.6.1 contains these commits.

رفع اشکال

Version 1.6.0

24 ژانویه 2024

androidx.compose.animation:animation-*:1.6.0 is released. Version 1.6.0 contains these commits.

Version 1.6.0-rc01

10 ژانویه 2024

androidx.compose.animation:animation-*:1.6.0-rc01 is released. Version 1.6.0-rc01 contains these commits.

Version 1.6.0-beta03

13 دسامبر 2023

androidx.compose.animation:animation-*:1.6.0-beta03 is released. Version 1.6.0-beta03 contains these commits.

API Changes

  • Temporarily removed scaleInToFitContainer and scaleOutToFitContainer from AnimatedContentTransitionScope as they require lookahead. They will be available when lookahead is on by default or opted-in in future releases.

Version 1.6.0-beta02

29 نوامبر 2023

androidx.compose.animation:animation-*:1.6.0-beta02 is released. Version 1.6.0-beta02 contains these commits.

Version 1.6.0-beta01

15 نوامبر 2023

androidx.compose.animation:animation-*:1.6.0-beta01 is released. Version 1.6.0-beta01 contains these commits.

API Changes

  • ExitTransition.Hold has been renamed to ExitTransition.KeepUntilTransitionsFinished to be more explicit. ( I1c490 )
  • You may now use keyframesWithSpline to interpolate any N-dimensional value using monotonic splines. It's particularly useful to interpolate positional values such as Offset , IntOffset , DpOffset . Added as Experimental API.

رفع اشکال

  • Add renderer support for Sweep Gradient in ArcLine . ( I4d5bb )
  • Implement equals and hashcode for PageSize.Fixed . ( Ie3ede , b/300134276 )
  • Fix binary compatibility issue with Window Inset change. ( Iee695 )
  • Remove material core layer for Material3 Chip/Button as the microbenchmarks show better performance without it. ( I55555 )

Version 1.6.0-alpha08

18 اکتبر 2023

androidx.compose.animation:animation-*:1.6.0-alpha08 is released. Version 1.6.0-alpha08 contains these commits.

API Changes

  • Deprecated KeyframesSpecConfig#with in favor KeyframesSpecConfig#using which preserves the builder pattern. ( I1d769 )

Version 1.6.0-alpha07

4 اکتبر 2023

androidx.compose.animation:animation-*:1.6.0-alpha07 is released. Version 1.6.0-alpha07 contains these commits.

API Changes

  • Fixed and Scrollable Tabrows now have Primary and Secondary variants. These correctly map to the color and indicator behavior as defined in Material3.
  • PrimaryScrollableTabRow and SecondaryScrollableTabRow now expose scroll state. ( Iec8f5 , b/260572337 )

Version 1.6.0-alpha06

20 سپتامبر 2023

androidx.compose.animation:animation-*:1.6.0-alpha06 is released. Version 1.6.0-alpha06 contains these commits.

Version 1.6.0-alpha05

6 سپتامبر 2023

androidx.compose.animation:animation-*:1.6.0-alpha05 is released. Version 1.6.0-alpha05 contains these commits.

API Changes

  • Added PathEasing to enable an arbitrary path to be supplied to an easing curve. ( Idb4b9 )

Version 1.6.0-alpha04

23 آگوست 2023

androidx.compose.animation:animation-*:1.6.0-alpha04 is released. Version 1.6.0-alpha04 contains these commits.

API Changes

  • Add SeekableTransitionState to allow developers to control the progress of a transition. ( I8e69d )

Version 1.6.0-alpha03

9 آگوست 2023

androidx.compose.animation:animation-*:1.6.0-alpha03 is released. Version 1.6.0-alpha03 contains these commits.

API Changes

  • New type of enter/exit transition that scales the content based on the size of the animating container during enter & exit animation. LookaheadScope Composable fun and interface are now stable. ( Ifb2ce )

Version 1.6.0-alpha02

July 26, 2023

androidx.compose.animation:animation-*:1.6.0-alpha02 is released. Version 1.6.0-alpha02 contains these commits.

API Changes

  • New ExitTransition.Hold to display outgoing content in AnimatedContent until both enter & exit transition are finished. ( I5984f )
  • Additional annotations to specify allowed inputs to composables ( I51109 )

Version 1.6.0-alpha01

21 ژوئن 2023

androidx.compose.animation:animation-*:1.6.0-alpha01 is released. Version 1.6.0-alpha01 contains these commits.

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

  • Enable Modifier.animateContentSize and AnimatedVisibility to be fully integrated into the lookahead system by reporting the target size in the lookahead pass.

API Changes

  • New property in IntrinsincMeasureScope and its implementations (eg MeasureScope ) to indicate whether the current measure pass is a lookahead pass. ( I7a812 )

رفع اشکال

  • Removed allocations from spring animations. ( Ie9431 )
  • value parameter name for Enum.valueOf changed ( Ia9b89 )
  • more thrown exceptions from enum valueOf ( I818fe )

Version 1.5

Version 1.5.4

18 اکتبر 2023

androidx.compose.animation:animation-*:1.5.4 is released. Version 1.5.4 contains these commits.

Version 1.5.3

4 اکتبر 2023

androidx.compose.animation:animation-*:1.5.3 is released. This version has no changes

Version 1.5.2

27 سپتامبر 2023

androidx.compose.animation:animation-*:1.5.2 is released. Version 1.5.2 contains these commits.

Version 1.5.1

6 سپتامبر 2023

androidx.compose.foundation:foundation-*:1.5.1 is released. Version 1.5.1 contains these commits.

رفع اشکال

  • Fixed text fields showing keyboard and being editable when readOnly is true. Also fixed the keyboard not showing when readOnly is changed from true to false while focused. ( I34a19 , b/246909589 )

Version 1.5.1

6 سپتامبر 2023

androidx.compose.animation:animation-*:1.5.1 is released. Version 1.5.1 contains these commits.

Version 1.5.0

9 آگوست 2023

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

Version 1.5.0-rc01

July 26, 2023

androidx.compose.animation:animation-*:1.5.0-rc01 is released. Version 1.5.0-rc01 contains these commits.

رفع اشکال

  • Fixed an issue where calling .value on a primitive state type (like MutableIntState ) would report a lint warning with an invalid fix. The inspection will now recommend migrating to the correct property. ( Iba953 , b/287279257 )

  • An optional inspection to recommend migrating mutableStateOf() calls to their corresponding specialized types for primitives is available. Its lint ID is AutoboxingStateCreation . Previously, this inspection was enabled by default for all projects. To see this warning in Android Studio's editor and your project's lint outputs, change its severity from informational to warning (or higher) by declaring warning "AutoboxingStateCreation" inside your module's build.gradle or build.gradle.kts configuration as shown ( I34f7e ):

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

Version 1.5.0-beta03

28 ژوئن 2023

androidx.compose.animation:animation-*:1.5.0-beta03 is released. Version 1.5.0-beta03 contains these commits.

Version 1.5.0-beta02

7 ژوئن 2023

androidx.compose.animation:animation-*:1.5.0-beta02 is released. Version 1.5.0-beta02 contains these commits.

Version 1.5.0-beta01

24 مه 2023

androidx.compose.animation:animation-*:1.5.0-beta01 is released. Version 1.5.0-beta01 contains these commits.

API Changes

  • Removed allocations in recomposition, color animations, and AndroidComposeView ( Ib2bfa )

رفع اشکال

  • Removed allocations from spring animations ( Ie9431 )

Version 1.5.0-alpha04

10 مه 2023

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

API Changes

  • ContentKey is now supported in AnimatedContent to allow more control for when transition should happen. ( Ic069b )

Version 1.5.0-alpha03

19 آوریل 2023

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

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

  • New default behavior for SubcomposeLayout in LookaheadScope . It allows SubcomposeLayouts that don't have conditional slots (eg TabRow , Scaffold , BoxWithConstraints , etc) to work nicely with lookahead animations.

API Changes

  • New default intermediateMeasurePolicy that reuses measure policy from lookahead pass allows SubcomposeLayout subtypes without conditional slots such as Scaffold , TabRow , and BoxWithConstraints to work with lookahead by default. ( Id84c8 )
  • Rename infix fun with to togetherWith for combining enter and exit transitions. New AnimatedContentScope as receiver for the content lambda. ( Ic39ae )

Version 1.5.0-alpha02

5 آوریل 2023

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

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

  • New experimental API to support lookahead in SubcomposeLayout . This will allow SubcomposeLayout to function properly in a LookaheadScope . More out-of-the-box support for specific subtypes of SubcomposeLayout will come soon.

API Changes

  • New SubcomposeLayout API that takes an additional intermediate measure policy for handling measure/layout logic during lookahead-based animations. ( I017d3 )

Version 1.5.0-alpha01

22 مارس 2023

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

API Changes

  • AnimatedContent APIs are now stable AnimatedContentScope has been renamed to AnimatedContentTransitionScope . scaleIn and scaleOut are now stable APIs. ( Iaf54e )

Version 1.4

Version 1.4.3

3 مه 2023

androidx.compose.animation:animation:1.4.3 , androidx.compose.animation:animation-core:1.4.3 , and androidx.compose.animation:animation-graphics:1.4.3 are released with no changes (only a version bump ).

Version 1.4.2

19 آوریل 2023

androidx.compose.animation:animation:1.4.2 , androidx.compose.animation:animation-core:1.4.2 , and androidx.compose.animation:animation-graphics:1.4.2 are released with no changes. Version 1.4.2 contains these commits.

Version 1.4.1

5 آوریل 2023

androidx.compose.animation:animation:1.4.1 , androidx.compose.animation:animation-core:1.4.1 , and androidx.compose.animation:animation-graphics:1.4.1 are released with no changes. Version 1.4.1 contains these commits.

Version 1.4.0

22 مارس 2023

androidx.compose.animation:animation:1.4.0 , androidx.compose.animation:animation-core:1.4.0 , and androidx.compose.animation:animation-graphics:1.4.0 are released. Version 1.4.0 contains these commits.

Important changes since 1.3.0

  • Tooling label is supported in r ememberInfiniteTransition and all the extension functions on InfiniteTransition and Transition (eg InfiniteTransition#animateColor ) ( I56ef7 )

Version 1.4.0-rc01

8 مارس 2023

androidx.compose.animation:animation:1.4.0-rc01 , androidx.compose.animation:animation-core:1.4.0-rc01 , and androidx.compose.animation:animation-graphics:1.4.0-rc01 are released with no تغییر می کند. Version 1.4.0-rc01 contains these commits.

Version 1.4.0-beta02

22 فوریه 2023

androidx.compose.animation:animation:1.4.0-beta02 , androidx.compose.animation:animation-core:1.4.0-beta02 , and androidx.compose.animation:animation-graphics:1.4.0-beta02 are released with no تغییر می کند. Version 1.4.0-beta02 contains these commits.

Version 1.4.0-beta01

8 فوریه 2023

androidx.compose.animation:animation:1.4.0-beta01 , androidx.compose.animation:animation-core:1.4.0-beta01 , and androidx.compose.animation:animation-graphics:1.4.0-beta01 are released with no تغییر می کند. Version 1.4.0-beta01 contains these commits.

Version 1.4.0-alpha05

January 25, 2023

androidx.compose.animation:animation:1.4.0-alpha05 , androidx.compose.animation:animation-core:1.4.0-alpha05 , and androidx.compose.animation:animation-graphics:1.4.0-alpha05 are released. Version 1.4.0-alpha05 contains these commits.

تغییرات

  • No changes in animation libraries since the last alpha, version bump only

Version 1.4.0-alpha04

11 ژانویه 2023

androidx.compose.animation:animation:1.4.0-alpha04 , androidx.compose.animation:animation-core:1.4.0-alpha04 , and androidx.compose.animation:animation-graphics:1.4.0-alpha04 are released. Version 1.4.0-alpha04 contains these commits.

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

  • Tooling label is supported in rememberInfiniteTransition and all the extension functions on InfiniteTransition and Transition (eg InfiniteTransition#animateColor ) ( I56ef7 )

API Changes

  • InfiniteTransition#TransitionAnimationState and InfiniteTransition#animations APIs are now public. ( I36682 )

Version 1.4.0-alpha03

7 دسامبر 2022

androidx.compose.animation:animation:1.4.0-alpha03 , androidx.compose.animation:animation-core:1.4.0-alpha03 , and androidx.compose.animation:animation-graphics:1.4.0-alpha03 are released. Version 1.4.0-alpha03 contains these commits.

API Changes

  • In UI tests using a Compose rule, continuations resumed during withFrameNanos callbacks will not be dispatched until after all frame callbacks have finished running. This matches the behavior of compose when running normally. However, tests that rely on the old behavior may fail. This should only affect code that calls withFrameNanos or withFrameMillis directly, and has logic outside of callback passed to those functions that may need to be moved inside the callbacks. See the animation test changes in this CL for examples .
  • Added optional onPerformTraversals: (Long) -> Unit parameter to TestMonotonicFrameClock constructor and factory function to run code after withFrameNanos callbacks but before resuming callers' coroutines. ( Idb413 , b/254115946 , b/222093277 , b/255802670 )
  • New param in AnimatedContent for tooling label ( Iebe2d )

Version 1.4.0-alpha02

9 نوامبر 2022

androidx.compose.animation:animation:1.4.0-alpha02 , androidx.compose.animation:animation-core:1.4.0-alpha02 , and androidx.compose.animation:animation-graphics:1.4.0-alpha02 are released. Version 1.4.0-alpha02 contains these commits.

API Changes

  • Add ToolingState to allow tooling to change internal states of Composable ( Ie6614 )

Version 1.4.0-alpha01

24 اکتبر 2022

androidx.compose.animation:animation:1.4.0-alpha01 , androidx.compose.animation:animation-core:1.4.0-alpha01 , and androidx.compose.animation:animation-graphics:1.4.0-alpha01 are released. Version 1.4.0-alpha01 contains these commits.

رفع اشکال

  • Fix incorrect interruption animation in AnimatedContent ( b/238662479 )

نسخه 1.3

Version 1.3.3

11 ژانویه 2023

androidx.compose.animation:animation:1.3.3 , androidx.compose.animation:animation-core:1.3.3 , and androidx.compose.animation:animation-graphics:1.3.3 are released. Version 1.3.3 contains these commits.

  • No changes since the 1.3.2.

Version 1.3.2

7 دسامبر 2022

androidx.compose.animation:animation:1.3.2 , androidx.compose.animation:animation-core:1.3.2 , and androidx.compose.animation:animation-graphics:1.3.2 are released. Version 1.3.2 contains these commits.

رفع اشکال

  • Updated to support androidx.compose.ui 1.3.2

Version 1.3.1

9 نوامبر 2022

androidx.compose.animation:animation:1.3.1 , androidx.compose.animation:animation-core:1.3.1 , and androidx.compose.animation:animation-graphics:1.3.1 are released. Version 1.3.1 contains these commits.

Version 1.3.0

24 اکتبر 2022

androidx.compose.animation:animation:1.3.0 , androidx.compose.animation:animation-core:1.3.0 , and androidx.compose.animation:animation-graphics:1.3.0 are released. Version 1.3.0 contains these commits.

Important changes since 1.2.0

  • New set of easing functions are made stable

Version 1.3.0-rc01

5 اکتبر 2022

androidx.compose.animation:animation:1.3.0-rc01 , androidx.compose.animation:animation-core:1.3.0-rc01 , and androidx.compose.animation:animation-graphics:1.3.0-rc01 are released. Version 1.3.0-rc01 contains these commits.

Version 1.3.0-beta03

21 سپتامبر 2022

androidx.compose.animation:animation:1.3.0-beta03 , androidx.compose.animation:animation-core:1.3.0-beta03 , and androidx.compose.animation:animation-graphics:1.3.0-beta03 are released. Version 1.3.0-beta03 contains these commits.

  • No changes since 1.3.0-beta02.

Version 1.3.0-beta02

7 سپتامبر 2022

androidx.compose.animation:animation:1.3.0-beta02 , androidx.compose.animation:animation-core:1.3.0-beta02 , and androidx.compose.animation:animation-graphics:1.3.0-beta02 are released. Version 1.3.0-beta02 contains these commits.

  • Removed Kotlin.experimental from the compiler options since it is depricated

Version 1.3.0-beta01

24 آگوست 2022

androidx.compose.animation:animation:1.3.0-beta01 , androidx.compose.animation:animation-core:1.3.0-beta01 , and androidx.compose.animation:animation-graphics:1.3.0-beta01 are released. Version 1.3.0-beta01 contains these commits.

Version 1.3.0-alpha03

10 آگوست 2022

androidx.compose.animation:animation:1.3.0-alpha03 , androidx.compose.animation:animation-core:1.3.0-alpha03 , and androidx.compose.animation:animation-graphics:1.3.0-alpha03 are released. Version 1.3.0-alpha03 contains these commits.

API Changes

  • New param in Crossfade , animateAsState and Animatable for tooling label ( Iac08a )
  • Added atFraction function for defining keyframes at a fraction instead of at a specific duration. ( I20c76 , b/232059455 )

Version 1.3.0-alpha02

27 جولای 2022

androidx.compose.animation:animation:1.3.0-alpha02 , androidx.compose.animation:animation-core:1.3.0-alpha02 , and androidx.compose.animation:animation-graphics:1.3.0-alpha02 are released. Version 1.3.0-alpha02 contains these commits.

Version 1.3.0-alpha01

29 ژوئن 2022

androidx.compose.animation:animation:1.3.0-alpha01 , androidx.compose.animation:animation-core:1.3.0-alpha01 , and androidx.compose.animation:animation-graphics:1.3.0-alpha01 are released. Version 1.3.0-alpha01 contains these commits.

API Changes

  • New LookaheadLayout that supports a lookahead pass before the actual measure/layout. This allows a pre-calculation of the layout when it changes, while permitting the post-lookahead measure/layout to use the pre-calculated size/position to animate the size and positions towards the target. SubcomposeLayouts are not yet supported, but will be in an upcoming release. ( I477f5 )

نسخه 1.2

Version 1.2.1

10 آگوست 2022

androidx.compose.animation:animation:1.2.1 , androidx.compose.animation:animation-core:1.2.1 , and androidx.compose.animation:animation-graphics:1.2.1 are released. Version 1.2.1 contains these commits.

Version 1.2.0

27 جولای 2022

androidx.compose.animation:animation:1.2.0 , androidx.compose.animation:animation-core:1.2.0 , and androidx.compose.animation:animation-graphics:1.2.0 are released. Version 1.2.0 contains these commits.

Important changes since 1.1.0

  • Compose animation now supports 'Animator duration scale' setting from Developer Options.
  • A large selection of new experimental easing curves.
  • AnimatedImageVector now supports repeatCount and repeatMode

Version 1.2.0-rc03

29 ژوئن 2022

androidx.compose.animation:animation:1.2.0-rc03 , androidx.compose.animation:animation-core:1.2.0-rc03 , and androidx.compose.animation:animation-graphics:1.2.0-rc03 are released. Version 1.2.0-rc03 contains these commits.

  • No changes since 1.2.0-rc02.

Version 1.2.0-rc02

22 ژوئن 2022

androidx.compose.animation:animation:1.2.0-rc02 , androidx.compose.animation:animation-core:1.2.0-rc02 , and androidx.compose.animation:animation-graphics:1.2.0-rc02 are released. Version 1.2.0-rc02 contains these commits.

رفع اشکال

  • Removed ExperimentalEasingApi annotation on Easing functions ( Ied441 )

Version 1.2.0-rc01

15 ژوئن 2022

androidx.compose.animation:animation:1.2.0-rc01 , androidx.compose.animation:animation-core:1.2.0-rc01 , and androidx.compose.animation:animation-graphics:1.2.0-rc01 are released. Version 1.2.0-rc01 contains these commits.

API Changes

  • Interfaces in compose libraries are now built using jdk8 default interface methods ( I5bcf1 )

Version 1.2.0-beta03

1 ژوئن 2022

androidx.compose.animation:animation:1.2.0-beta03 , androidx.compose.animation:animation-core:1.2.0-beta03 , and androidx.compose.animation:animation-graphics:1.2.0-beta03 are released. Version 1.2.0-beta03 contains these commits.

API Changes

  • Added Experimental Easing Curves for Animations ( I64a38 )

Version 1.2.0-beta02

18 مه 2022

androidx.compose.animation:animation:1.2.0-beta02 , androidx.compose.animation:animation-core:1.2.0-beta02 , and androidx.compose.animation:animation-graphics:1.2.0-beta02 are released. Version 1.2.0-beta02 contains these commits.

Version 1.2.0-beta01

11 مه 2022

androidx.compose.animation:animation:1.2.0-beta01 , androidx.compose.animation:animation-core:1.2.0-beta01 , and androidx.compose.animation:animation-graphics:1.2.0-beta01 are released. Version 1.2.0-beta01 contains these commits.

  • This is the first beta release of 1.2! There are no changes since the last alpha.

Version 1.2.0-alpha08

20 آوریل 2022

androidx.compose.animation:animation:1.2.0-alpha08 , androidx.compose.animation:animation-core:1.2.0-alpha08 , and androidx.compose.animation:animation-graphics:1.2.0-alpha08 are released. Version 1.2.0-alpha08 contains these commits.

Version 1.2.0-alpha07

6 آوریل 2022

androidx.compose.animation:animation:1.2.0-alpha07 , androidx.compose.animation:animation-core:1.2.0-alpha07 , and androidx.compose.animation:animation-graphics:1.2.0-alpha07 are released. Version 1.2.0-alpha07 contains these commits.

API Changes

  • AnimatedImageVector now supports repeatCount and repeatMode ( Ia3e75 , b/199304067 )

Version 1.2.0-alpha06

23 مارس 2022

androidx.compose.animation:animation:1.2.0-alpha06 , androidx.compose.animation:animation-core:1.2.0-alpha06 , and androidx.compose.animation:animation-graphics:1.2.0-alpha06 are released. Version 1.2.0-alpha06 contains these commits.

API Changes

  • Updated parsing of vector drawables to support auto mirroring to flip the content of a VectorPainter if the current layout direction is RTL. ( I79cd9 , b/185760237 )

رفع اشکال

  • Updated Vector graphics APIs to use the proper composable annotation @VectorComposable instead of @UiComposable ( I942bc )

Version 1.2.0-alpha05

9 مارس 2022

androidx.compose.animation:animation:1.2.0-alpha05 , androidx.compose.animation:animation-core:1.2.0-alpha05 , and androidx.compose.animation:animation-graphics:1.2.0-alpha05 are released. Version 1.2.0-alpha05 contains these commits.

API Changes

  • هورا! Compose animation now supports 'Animator duration scale' setting from Developer Options. ( I5a4fc , b/161675988 )

Version 1.2.0-alpha04

23 فوریه 2022

androidx.compose.animation:animation:1.2.0-alpha04 , androidx.compose.animation:animation-core:1.2.0-alpha04 , and androidx.compose.animation:animation-graphics:1.2.0-alpha04 are released. Version 1.2.0-alpha04 contains these commits.

Version 1.2.0-alpha03

9 فوریه 2022

androidx.compose.animation:animation:1.2.0-alpha03 , androidx.compose.animation:animation-core:1.2.0-alpha03 , and androidx.compose.animation:animation-graphics:1.2.0-alpha03 are released. Version 1.2.0-alpha03 contains these commits.

Version 1.2.0-alpha02

26 ژانویه 2022

androidx.compose.animation:animation:1.2.0-alpha02 , androidx.compose.animation:animation-core:1.2.0-alpha02 , and androidx.compose.animation:animation-graphics:1.2.0-alpha02 are released. Version 1.2.0-alpha02 contains these commits.

Version 1.2.0-alpha01

12 ژانویه 2022

androidx.compose.animation:animation:1.2.0-alpha01 , androidx.compose.animation:animation-core:1.2.0-alpha01 , and androidx.compose.animation:animation-graphics:1.2.0-alpha01 are released. Version 1.2.0-alpha01 contains these commits.

API Changes

  • Use AnimatedImageVector.animatedVectorResource instead of animatedVectorResource to load an <animated-vector> resource file.
    • Use rememberAnimatedVectorResource instead of AnimatedImageVector#painterFor to render an AnimatedImageVector . ( I9c300 )

رفع اشکال

  • Add toString methods to Animatable and AnimationResult. ( Icd3a6 )

Dependency Updates

  • Now depends on Kotlin 1.6.10 .

نسخه 1.1

نسخه 1.1.1

23 فوریه 2022

androidx.compose.animation:animation:1.1.1 , androidx.compose.animation:animation-core:1.1.1 , and androidx.compose.animation:animation-graphics:1.1.1 are released. Version 1.1.1 contains these commits.

رفع اشکال

Version 1.1.0

9 فوریه 2022

androidx.compose.animation:animation:1.1.0 , androidx.compose.animation:animation-core:1.1.0 , and androidx.compose.animation:animation-graphics:1.1.0 are released. Version 1.1.0 contains these commits.

Important changes since 1.0.0

  • Stable support for the Android 12 Overscroll effect
  • Improvements to touch target sizing
  • Note that, with respect to Compose 1.0, Material components will expand their layout space to meet Material accessibility guidelines for touch target size . For instance, Button touch target will expand to a minimum size of 48x48dp, even if you set the Button's size to be smaller. This aligns Compose Material to the same behavior of Material Design Components, providing consistent behavior if you mix Views and Compose. This change also ensures that when you create your UI using Compose Material components, minimum requirements for touch target accessibility will be met.
  • Stable support for Navigation Rail
  • Graduates a number of previously experimental APIs to stable
  • Support for newer versions of Kotlin

Version 1.1.0-rc03

26 ژانویه 2022

androidx.compose.animation:animation:1.1.0-rc03 , androidx.compose.animation:animation-core:1.1.0-rc03 , and androidx.compose.animation:animation-graphics:1.1.0-rc03 are released. Version 1.1.0-rc03 contains these commits.

رفع اشکال

  • Updated to support Compose Material 1.1.0-rc03

Version 1.1.0-rc01

15 دسامبر 2021

androidx.compose.animation:animation:1.1.0-rc01 and androidx.compose.animation:animation-core:1.1.0-rc01 are released. Version 1.1.0-rc01 contains these commits.

API Changes

  • Use AnimatedImageVector.animatedVectorResource instead of animatedVectorResource to load an <animated-vector> resource file.
    • Use rememberAnimatedVectorResource instead of AnimatedImageVector#painterFor to render an AnimatedImageVector . ( I9c300 )

Version 1.1.0-beta04

1 دسامبر 2021

androidx.compose.animation:animation:1.1.0-beta04 , androidx.compose.animation:animation-core:1.1.0-beta04 , and androidx.compose.animation:animation-graphics:1.1.0-beta04 are released. Version 1.1.0-beta04 contains these commits.

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

  • Updated to be compatible with Kotlin 1.6.0

Version 1.1.0-beta03

17 نوامبر 2021

androidx.compose.animation:animation:1.1.0-beta03 , androidx.compose.animation:animation-core:1.1.0-beta03 , and androidx.compose.animation:animation-graphics:1.1.0-beta03 are released. Version 1.1.0-beta03 contains these commits.

API Changes

  • Added new modifier Modifier.onPlaced to allow placement change to be observed. Additional changes to child modifier's offset can therefore be made based on the observed placement change. ( I558fd )
  • New support for contentKey in Crossfade. ContentKey will be used for equality check by animation system. Therefore custom diffing on states can be achieved via specifying appropriate contentKey for different states.

    ContentKey will also be used as the key for save & restore content. ( I2e055 , b/197907070 )

Version 1.1.0-beta02

3 نوامبر 2021

androidx.compose.animation:animation:1.1.0-beta02 , androidx.compose.animation:animation-core:1.1.0-beta02 , and androidx.compose.animation:animation-graphics:1.1.0-beta02 are released. Version 1.1.0-beta02 contains these commits.

رفع اشکال

  • New animation APIs for supporting tooling. Specifically, they allow tooling to inspect the animations & their configurations in a Transitions. ( I4116e )

Version 1.1.0-beta01

27 اکتبر 2021

androidx.compose.animation:animation:1.1.0-beta01 , androidx.compose.animation:animation-core:1.1.0-beta01 , and androidx.compose.animation:animation-graphics:1.1.0-beta01 are released. Version 1.1.0-beta01 contains these commits.

API Changes

  • New animation APIs for supporting tooling. Specifically, they allow tooling to inspect the animations & their configurations in a Transitions. ( I4116e )

Version 1.1.0-alpha06

October 13, 2021

androidx.compose.animation:animation:1.1.0-alpha06 , androidx.compose.animation:animation-core:1.1.0-alpha06 , and androidx.compose.animation:animation-graphics:1.1.0-alpha06 are released. Version 1.1.0-alpha06 contains these commits.

Version 1.1.0-alpha05

29 سپتامبر 2021

androidx.compose.animation:animation:1.1.0-alpha05 , androidx.compose.animation:animation-core:1.1.0-alpha05 , and androidx.compose.animation:animation-graphics:1.1.0-alpha05 are released. Version 1.1.0-alpha05 contains these commits.

API Changes

  • EnterTransition , ExitTransition , and some of the AnimatedVisibility APIs have been made stable. MutableTransitionState.isIdle is also no longer experimental. ( I5072d )

  • Breaking change : lambdas in Enter/ExitTransition factories have been moved to the last position in the param list. ( I5072d )

Version 1.1.0-alpha04

15 سپتامبر 2021

androidx.compose.animation:animation:1.1.0-alpha04 , androidx.compose.animation:animation-core:1.1.0-alpha04 , and androidx.compose.animation:animation-graphics:1.1.0-alpha04 are released. Version 1.1.0-alpha04 contains these commits.

Version 1.1.0-alpha03

1 سپتامبر 2021

androidx.compose.animation:animation:1.1.0-alpha03 , androidx.compose.animation:animation-core:1.1.0-alpha03 , and androidx.compose.animation:animation-graphics:1.1.0-alpha03 are released. Version 1.1.0-alpha03 contains these commits.

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

  • Updated Compose 1.1.0-alpha03 to depend on Kotlin 1.5.30 . ( I74545 )

Version 1.1.0-alpha02

18 آگوست 2021

androidx.compose.animation:animation:1.1.0-alpha02 , androidx.compose.animation:animation-core:1.1.0-alpha02 , and androidx.compose.animation:animation-graphics:1.1.0-alpha02 are released. Version 1.1.0-alpha02 contains these commits.

API Changes

  • StartOffset is now supported in repeatable and infiniteRepeatable, as a way to delay the start time or fast forward the animation before the animation starts. This start offset will not be repeated ( Ic679f , b/195079908 )
  • New Enter/Exit transition for scale. It can be used in combination with other types of Enter/ExitTransitions. ( I372da , b/191325593 )

Version 1.1.0-alpha01

4 آگوست 2021

androidx.compose.animation:animation:1.1.0-alpha01 , androidx.compose.animation:animation-core:1.1.0-alpha01 , and androidx.compose.animation:animation-graphics:1.1.0-alpha01 are released. Version 1.1.0-alpha01 contains these commits.

API Changes

  • AnimatedImageVector and the related APIs are now in the new androidx.compose.animation:animation-graphics module. ( I60873 )

رفع اشکال

نسخه 1.0

Version 1.0.5

3 نوامبر 2021

androidx.compose.animation:animation:1.0.5 and androidx.compose.animation:animation-core:1.0.5 are released. Version 1.0.5 contains these commits.

رفع اشکال

  • Fixed a crash tracking derivedStateOf instances. ( aosp/1792247 )

Version 1.0.4

October 13, 2021

androidx.compose.animation:animation:1.0.4 and androidx.compose.animation:animation-core:1.0.4 are released. Version 1.0.4 contains these commits.

Dependency Updates

  • Updated to depend on Kotlin 1.5.31

Version 1.0.3

29 سپتامبر 2021

androidx.compose.animation:animation:1.0.3 and androidx.compose.animation:animation-core:1.0.3 are released. Version 1.0.3 contains these commits.

Dependency Updates

  • Updated to depend on Kotlin 1.5.30

نسخه 1.0.2

1 سپتامبر 2021

androidx.compose.animation:animation:1.0.2 and androidx.compose.animation:animation-core:1.0.2 are released. Version 1.0.2 contains these commits.

Updated to support the Compose 1.0.2 release. Compose 1.0.2 is still compatible with Kotlin 1.5.21 .

Version 1.0.1

4 آگوست 2021

androidx.compose.animation:animation:1.0.1 and androidx.compose.animation:animation-core:1.0.1 are released. Version 1.0.1 contains these commits.

Dependency Updates

  • Updated to depend on Kotlin 1.5.21 .

Version 1.0.0

28 ژوئیه 2021

androidx.compose.animation:animation:1.0.0 and androidx.compose.animation:animation-core:1.0.0 are released. Version 1.0.0 contains these commits.

Major features of 1.0.0

This is the first stable release of Compose. Please see the official Compose Release blog for more details!

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

  • If you are using Android Studio Bumblebee Canary 4 or AGP 7.1.0-alpha04 / 7.1.0-alpha05 , you may hit the following crash:

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

    To fix, temporarily increase your minSdkVersion to 24+ in your build.gradle file. This issue will be fixed in the next version of Android Studio Bumblebee and AGP 7.1 . ( b/194289155 )

Version 1.0.0-rc02

14 جولای 2021

androidx.compose.animation:animation:1.0.0-rc02 and androidx.compose.animation:animation-core:1.0.0-rc02 are released. Version 1.0.0-rc02 contains these commits.

Version 1.0.0-rc01

1 ژوئیه 2021

androidx.compose.animation:animation:1.0.0-rc01 and androidx.compose.animation:animation-core:1.0.0-rc01 are released. Version 1.0.0-rc01 contains these commits.

رفع اشکال

Version 1.0.0-beta09

June 16, 2021

androidx.compose.animation:animation:1.0.0-beta09 and androidx.compose.animation:animation-core:1.0.0-beta09 are released. Version 1.0.0-beta09 contains these commits.

API Changes

  • New AnimatedContent Composable. It manages its content change using customizable ContentTransform as new target content enters and initial content leaves. Different combination of enter and exit transitions can be used to produce a customized look and feel. As a part of the content transform, AnimatedContent automatically animates its size to match the incoming content. ( I2c3df )
  • Removed ManualFrameClock . If you need to control animations, use composeTestRule.mainClock instead. ( I3c3e8 , b/189951065 )

Added Profile Rules

This release adds profile rules to the following compose modules ( 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

What are profile rules?

  • Profile rules for a library are specified in a text file baseline-prof.txt located in the src/main or equivalent directory. The file specifies a rule per line, where a rule in this case is a pattern for matching to methods or classes in the library. The syntax for these rules is a superset of the human-readable ART profile format that is used when using adb shell profman --dump-classes-and-methods ... . These rules take one of two forms to target either methods or classes.

  • A method rule will have the following pattern:

    <FLAGS><CLASS_DESCRIPTOR>-><METHOD_SIGNATURE>
    
  • And a class rule will have the following pattern:

    <CLASS_DESCRIPTOR>
    
  • Here <FLAGS> is one or more of the characters H , S , and P to indicate whether or not this method should be flagged as "Hot", "Startup", or "Post Startup".

  • The <CLASS_DESCRIPTOR> is the descriptor for the class that the targeted method belongs to. For example, the class androidx.compose.runtime.SlotTable would have a descriptor of Landroidx/compose/runtime/SlotTable; .

  • The <METHOD_SIGNATURE> is the signature of the method, and includes the name, parameter types, and return types of the method. For example, the method fun isPlaced(): Boolean on LayoutNode has the signature isPlaced()Z .

  • These patterns can have wildcards ( ** , * , and ? ) in order to have a single rule encompass multiple methods or classes.

What do the rules do?

  • A method that has the flag H indicates that this method is a "hot" method, and should be compiled ahead of time.

  • A method that has the flag S indicates that it is a method which is called at startup, and should be compiled ahead of time to avoid the cost of compilation and interpreting the method at startup time.

  • A method that has the flag P indicates that it is a method which is called after startup.

  • A class that is present in this file indicates that it is used during startup and should be pre-allocated in the heap to avoid the cost of class loading.

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

  • Libraries can define these rules which will be packaged in AAR artifacts. When an app is then built which includes these artifacts, these rules are merged together and the merged rules are used to build a compact binary ART profile that is specific to the app. ART can then leverage this profile when the app is installed on devices in order to ahead-of-time compile a specific subset of the application to improve the performance of the application, especially the first run. Note that this will have no effect on debuggable applications.

Version 1.0.0-beta08

2 ژوئن 2021

androidx.compose.animation:animation:1.0.0-beta08 and androidx.compose.animation:animation-core:1.0.0-beta08 are released. Version 1.0.0-beta08 contains these commits.

رفع اشکال

  • Now detectDragGesures , detectVerticalGestures , and detectHorizontalGestures will consume the position change automatically, no need to call change.consumePositionChange in the onDrag callbacks ( I42fc4 , b/185096350 , b/187320697 )
  • Modifier.onGloballyPositioned() was changed to report the coordinates of this modifier in the modifier chain, not the layout coordinates after applying all the modifiers. This means that now the ordering of modifiers is affecting what coordinates would be reported. ( Ieb67d , b/177926591 )

Version 1.0.0-beta07

18 مه 2021

androidx.compose.animation:animation:1.0.0-beta07 and androidx.compose.animation:animation-core:1.0.0-beta07 are released. Version 1.0.0-beta07 contains these commits.

API Changes

  • New AnimatedVisibility API that support visibility to be specified in a MutableTransitionState . This also allows the animation states to be observed external to AnimatedVisibility via currentState and isIdle .
    • New child transition support in Transition
    • Support custom exit/enter transition animation in AnimatedVisibility using AnimationScope.transition
    • New animateEnterExit modifier accessible for all children of AnimatedVisibility
    • Deprecated the AnimatedVisibility APIs that take an initiallyVisible parameter ( I702f3 )

Version 1.0.0-beta06

5 مه 2021

androidx.compose.animation:animation:1.0.0-beta06 and androidx.compose.animation:animation-core:1.0.0-beta06 are released. Version 1.0.0-beta06 contains these commits.

Version 1.0.0-beta05

21 آوریل 2021

androidx.compose.animation:animation:1.0.0-beta05 and androidx.compose.animation:animation-core:1.0.0-beta05 are released. Version 1.0.0-beta05 contains these commits.

رفع اشکال

  • The AndroidManifest files from ui-test-manifest and ui-tooling-data are now compatible with Android 12 ( I6f9de , b/184718994 )

Version 1.0.0-beta04

7 آوریل 2021

androidx.compose.animation:animation:1.0.0-beta04 and androidx.compose.animation:animation-core:1.0.0-beta04 are released. Version 1.0.0-beta04 contains these commits.

API Changes

  • Public instances of RowScope , ColumnScope , BoxScope , BoxWithConstraintsScope were removed. ( I4e83e , b/181869067 )

Version 1.0.0-beta03

24 مارس 2021

androidx.compose.animation:animation:1.0.0-beta03 and androidx.compose.animation:animation-core:1.0.0-beta03 are released. Version 1.0.0-beta03 contains these commits.

Version 1.0.0-beta02

10 مارس 2021

androidx.compose.animation:animation:1.0.0-beta02 and androidx.compose.animation:animation-core:1.0.0-beta02 are released. Version 1.0.0-beta02 contains these commits.

رفع اشکال

Version 1.0.0-beta01

24 فوریه 2021

androidx.compose.animation:animation:1.0.0-beta01 and androidx.compose.animation:animation-core:1.0.0-beta01 are released. Version 1.0.0-beta01 contains these commits.

This is the first release of Compose 1.0.0 Beta.

API Changes

  • InteractionState has been replaced with [Mutable]InteractionSource
    • Interfaces are responsible for emitting / collecting Interaction events.
    • Instead of passing interactionState = remember { InteractionState() } to components such as Button and Modifier.clickable() , use interactionSource = remember { MutableInteractionSource() } .
    • Instead of: Interaction.Pressed in interactionState you should instead use the extension functions on InteractionSource, such as InteractionSource.collectIsPressedAsState().
    • For complex use cases you can use InteractionSource.interactions to observe the stream of Interactions. See the InteractionSource documentation and samples for more information.
    • ( I85965 , b/152525426 , b/171913923 , b/171710801 , b/174852378 )
  • smoothScrollBy and scrollBy methods' packages changed to androidx.compose.foundation.gestures.* ( I3f7c1 , b/175294473 )
  • Size modifiers were renamed. Modifier.width/height/size were renamed to requiredWidth/requiredHeight/requiredSize. Modifier.preferredWidth/preferredHeight/preferredSize were renamed to width/height/size. ( I5b414 )
  • Orientation has been moved to foundation package. VelocirtTracker moved from ui.gesture to ui.input.pointer. ( Iff4a8 , b/175294473 )
  • AnimationClockObservable and subclasses have been removed. AnimatedFloat has been removed. ( Icde52 , b/177457083 )
  • Modifier.draggable now accepts DraggableState instead of a simple lambda. you can create state via rememberDraggableState { delta -> } to get the same behaviour as before ( Ica70f , b/175294473 )
  • animate, animatedValue, AnimatedValue APIs have been removed ( If27bc , b/177457083 )
  • AnimationEndReason.Interrupted is removed. CancellationException will be throws if animation is interrupted. ( I2cbbc , b/179695417 )
  • TargetAnimation API has been removed. ( If47d1 , b/177457083 )

Version 1.0.0-alpha12

10 فوریه 2021

androidx.compose.animation:animation:1.0.0-alpha12 and androidx.compose.animation:animation-core:1.0.0-alpha12 are released. Version 1.0.0-alpha12 contains these commits.

API Changes

  • Modifier.pointerInput now requires remember keys to indicate when the pointer input detection coroutine should restart for new dependencies. ( I849cd )
  • Bounds has been renamed to DpRect ( I4b32a )
  • Unified the param name for AnimationSpec to animationSpec across the animation system. Also constrain the Enter/ExitTransition to accept FiniteAnimationSpec. ( Ie47c5 , b/177457083 )
  • Animatable.snapTo and Animatable.stop are now suspend functions ( If4288 )
  • Similarly to how we previously removed state { 0 } composable and now promote usage like remember { mutableStateOf(0) } we are going to remove savedInstanceState { 0 } composable. You should use rememberSaveable { mutableStateOf(0) } instead and it will save and restore automatically if the type used inside the MutableState can be stored in the Bundle. If previously you were passing a custom saver object now you need to use a new overload of rememberSaveable which has stateSaver parameter. The usage will look like this: val holder = rememberSaveable(stateSaver = HolderSaver) { mutableStateOf(Holder(0)) } ( Ib4c26 , b/177338004 )
  • Updated Crossfade's method signature to be more consistent with the rest of the animation system. ( Ib05ed , b/177457083 )
  • rememberSavedInstanceState() was renamed to rememberSaveable() and moved to androidx.compose.runtime.saveable package. ( I1366e , b/177338004 )
  • RestorableStateHolder was renamed to SaveableStateHolder and moved to androidx.compose.runtime.saveable package. Inner method RestorableStateProvider was renamed to SaveableStateProvider. Generic type was removed so you can just pass Any as a key. Experimental annotation is not needed anymore. ( I0902e , b/174598702 )
  • Updated Modifier.animateContentSize API to be consistent with the rest of the animation system. ( I0bf75 , b/177457083 )
  • AnimatedValue/Float is now deprecated. Please use Animatable instead. ( I71345 , b/177457083 )
  • tapGestureFilter, doubleTapGestureFilter, longPressGestureFilter and pressIndicaitonGestureFilter have been deprecated. Use Modifier.clickable or Modifier.pointerInput with detectTapGestures function instead. ( I6baf9 , b/175294473 )
  • Introduced an InfiniteAnimationPolicy coroutine context element that will be applied in infinite animations. By default no policy is installed, except when running tests with ComposeTestRule . ( I50ec4 , b/151940543 )
  • Destructuring and copy() methods have been removed from several classes where they were rarely used. ( I26702 , b/178659281 )
  • Playtime in animation is now unfiied to nanoseconds ( If776a )
  • The compose:runtime-dispatch artifact is now deprecated. MonotonicFrameClock can now be found in compose:runtime and AndroidUiDispatcher can be found in compose:ui. ( Ib5c36 )
  • Added Animation.isInfinite and VectorizedAnimationSpec.isInfinite that signal if an animation is infinite or not. This can be used in implementations of animations to have special handling of such animations. For example, a special "time remaining" message can be shown, or during tests the animation can be cancelled to prevent waiting for idleness indefinitely. ( Iebb05 , b/151940543 )
  • Use Long instead of Uptime as animation time type ( Ie3aa7 , b/177420019 )

Version 1.0.0-alpha11

28 ژانویه 2021

androidx.compose.animation:animation:1.0.0-alpha11 and androidx.compose.animation:animation-core:1.0.0-alpha11 are released. Version 1.0.0-alpha11 contains these commits.

API Changes

  • TransitionDefinition-based Transition has been deprecated ( I0ac57 )
  • A label field is added for Transition and child animations to be displayed in tools ( I619fb )
  • animateAsState is now animateFooAsState, where Foo is the type of the variable being animated. eg Float, Dp, Offset, etc ( Ie7e25 )
  • New InfiniteTransition that runs any number of child animations. ( I1da81 )
  • Changes Material stateful parameter interfaces to have @Composable functions that return State<T> . Adds Animatable.asState() to make it easier to convert an Animatable to a State. Also changes animateElevation to be a suspend extension on Animatable. ( If613c )

رفع اشکال

  • onCommit, onDispose, and onActive have been deprecated in favor of SideEffect and DisposableEffect APIs ( If760e )
  • Initial State in updateTransition is now supported ( Ifd51d )
  • Content description parameter has been added to the Image and Icon. It is used to provide description to the accessibility services ( I2ac4c )
  • invalidate and compositionReference() are now deprecated in favor of currentRecomposeScope and rememberCompositionReference respectively. ( I583a8 )
  • Duration and Uptime will be replace with Long milliseconds, and this step removes the dependency of pointer input on those classes. ( Ia33b2 , b/175142755 , b/177420019 )
  • clickable, toggleable and selectable can be created outside of composition now ( I0a130 , b/172938345 , b/175294473 )
  • Easing has been changed to a functional interface ( Ib14e5 )
  • New items(count: Int) factory method for scope of LazyColumn/LazyRow/LazyVerticalGrid. items(items: List) and itemsIndexed(items: List) are now extension functions so you have to manually import them when used. New extension overloads for Arrays: items(items: Array) and itemsIndexed(Array) ( I803fc , b/175562574 )
  • Leverage TestCoroutineDispatcher in testing ( I532b6 )
  • Removed PointerInputData and modified PointerInputChange to give it all of PointerInputData's fields. Made PointerInputEvent and PointerInputEventData internal because they aren't used in any public API. ( Ifff97 , b/175142755 )

Version 1.0.0-alpha10

13 ژانویه 2021

androidx.compose.animation:animation:1.0.0-alpha10 and androidx.compose.animation:animation-core:1.0.0-alpha10 are released. Version 1.0.0-alpha10 contains these commits.

API Changes

  • Modified Velocity to have component parts and mathematical operations. ( Ib0447 )
  • Renamed @ExperimentalTesting to @ExperimentalTestApi to be consistent with similar experimental api annotations ( Ia4502 , b/171464963 )
  • Renamed Position to DpOffset and removed getDistance() ( Ib2dfd )
  • Removed Any.identityHashCode() public api ( I025d7 )

رفع اشکال

  • New coroutine-based API Animatable that ensures mutual exclusiveness among its animations. New DecayAnimationSpec to support multi-dimensional decay animation ( I820f2 , b/168014930 )
  • animate() is now replaced with animateAsState() , which returns a State<T> instead of T . This allows better performance, as the invalidation scope can be narrowed down to where the State value is read. ( Ib179e )

Version 1.0.0-alpha09

16 دسامبر 2020

androidx.compose.animation:animation:1.0.0-alpha09 and androidx.compose.animation:animation-core:1.0.0-alpha09 are released. Version 1.0.0-alpha09 contains these commits.

API Changes

  • Moved Dp.VectorConverter, Position.VectorConverter, etc to animation-core, and deprecated the old VectorConveters ( If0c4b )
  • Introduced a whole new set of Transition APIs with improved ease of use, and support for dynamically added animations, and dynamically calculated animation targets. This APIs are marked experimental for easy differentiation from the TransitionDefinition-based API. ( Ia7fe3 )

رفع اشکال

  • Lambdas in offset modifiers now return IntOffset rather than Float. ( Ic9ee5 , b/174137212 , b/174146755 )
  • Deprecate LazyColumnFor, LazyRowFor, LazyColumnForIndexed and LazyRowForIndexed. Use LazyColumn and LazyRow instead ( I5b48c )
  • For suspending pointer input APIs, renamed HandlePointerInputScope to AwaitPointerEventScope and handlePointerInput() to awaitPointerEventScope(). ( Idf0a1 , b/175142755 )
  • New infiniteRepeatable function for creating an InfiniteRepeatableSpec ( I668e5 )
  • Removed ExperimentalPointerInput annotation ( Ia7a24 )

Version 1.0.0-alpha08

2 دسامبر 2020

androidx.compose.animation:animation:1.0.0-alpha08 and androidx.compose.animation:animation-core:1.0.0-alpha08 are released. Version 1.0.0-alpha08 contains these commits.

API Changes

  • Added lint check for composable lambda parameter naming and position, to check for consistency with Compose guidelines. Also migrated some APIs using children as the name for their trailing lambda to content , according to the lint check and guidance. ( Iec48e )
  • Previously Deprecated APIs were removed:
    • Modifier.onPositioned was removed, use Modifier.onGloballyPositioned .
    • Modifier.onDraw was removed, use Modifier.onDrawBehind .
    • Modifier.plus was removed, use Modifier.then .
    • Color.Unset was removed, use Color.Unspecified .
    • PxBounds class was removed, use Rect instead.
    • ( Ie9d02 , b/172562222 )
  • Temporarily added option to let the TestAnimationClock be driven by the MonotonicFrameClock ( I1403b , b/173402197 )

رفع اشکال

  • Renamed Modifier.drawLayer to Modifier.graphicsLayer Also updated related classes to GraphicsLayer as per API council feedback. ( I0bd29 , b/173834241 )
  • Added Modifier.scale/rotate APIs as conveniences for drawLayer.
    • Renamed Modifier.drawOpacity to Modifier.alpha
    • Renamed Modifier.drawShadow to Modifier.shadow ( I264ca , b/173208140 )
  • Made PointerInputData's uptime and position fields non-nullable. ( Id468a )
  • offsetPx modifiers were renamed to offset. They are now taking lambda parameters instead of State. ( Ic3021 , b/173594846 )
  • New APIs for running animations in coroutines ( Ied662 )
  • Deprecated Ambients named with Ambient as their suffix, and replaced them with new properties prefixed with Ambient, following other Ambients and Compose API guidelines. ( I33440 )
  • Time control in tests (TestAnimationClock and its usages) is now experimental ( I6ef86 , b/171378521 )
  • Remove old ui-test module and its stubs ( I3a7cb )
  • RestorableStateHolder.withRestorableState function was renamed to RestorableStateProvider ( I66640 )
  • The Alignment interface was updated and made functional. ( I46a07 , b/172311734 )

Version 1.0.0-alpha07

11 نوامبر 2020

androidx.compose.animation:animation:1.0.0-alpha07 and androidx.compose.animation:animation-core:1.0.0-alpha07 are released. Version 1.0.0-alpha07 contains these commits.

رفع اشکال

  • The foundation AmbientTextStyle, ProvideTextStyle, and AmbientContentColor have been deprecated. Instead use the new versions available in the Material library. For non-Material applications, you should instead create your own design system specific theming ambients that can be consumed in your own components. ( I74acc , b/172067770 )
  • foundation.Text has been deprecated and replaced with material.Text. For a basic, unopinionated text API that does not consume values from a theme, see androidx.compose.foundation.BasicText. ( If64cb )
  • MeasureResult was moved out of MeasureScope. ( Ibf96d , b/171184002 )
  • Several layout related symbols were moved from androidx.compose.ui to androidx.compose.layout.ui. ( I0fa98 , b/170475424 )

Version 1.0.0-alpha06

28 اکتبر 2020

androidx.compose.animation:animation:1.0.0-alpha06 and androidx.compose.animation:animation-core:1.0.0-alpha06 are released. Version 1.0.0-alpha06 contains these commits.

API Changes

  • Enable transitions in ComposeTestRule; remove option to enable the blinking cursor from ComposeTestRule. ( If0de3 )

Version 1.0.0-alpha05

14 اکتبر 2020

androidx.compose.animation:animation:1.0.0-alpha05 and androidx.compose.animation:animation-core:1.0.0-alpha05 are released. Version 1.0.0-alpha05 contains these commits.

API Changes

  • New Animation interface and subclasses: These classes store the start and end conditions for animations, and therefore allow value and velocity to be queried via only playtime ( Ie95bd , b/163329867 )

رفع اشکال

  • OnPositionedModifier is renamed to OnGloballyPositionedModifier and onPositioned() is renamed to onGloballyPositioned(). ( I587e8 , b/169083903 )
  • Deprecates contentColor() and currentTextStyle() APIs, and replaces them with AmbientContentColor and AmbientTextStyle ambients respectively. You can access the current value by using .current on the ambient property, as with any other ambient. This was change was made for consistency and to avoid having multiple ways to accomplish the same thing. Additionally renames some ambient properties to better describe their purpose as follows:

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

Version 1.0.0-alpha04

1 اکتبر 2020

androidx.compose.animation:animation:1.0.0-alpha04 and androidx.compose.animation:animation-core:1.0.0-alpha04 are released. Version 1.0.0-alpha04 contains these commits.

API Changes

  • Annotated rootAnimationClockFactory, transitionsEnabled, blinkingCursorEnabled and textInputServiceFactory with @VisibleForTesting, make them internal API and hide their kdoc ( I554eb , b/168308412 )

رفع اشکال

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

Version 1.0.0-alpha03

16 سپتامبر 2020

androidx.compose.animation:animation:1.0.0-alpha03 and androidx.compose.animation:animation-core:1.0.0-alpha03 are released. Version 1.0.0-alpha03 contains these commits.

رفع اشکال

  • Usages of gravity were consistently renamed to align or alignment in layout APIs. ( I2421a , b/164077038 )

Version 1.0.0-alpha02

2 سپتامبر 2020

androidx.compose.animation:animation:1.0.0-alpha02 and androidx.compose.animation:animation-core:1.0.0-alpha02 are released. Version 1.0.0-alpha02 contains these commits.

API Changes

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

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

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

    ( I0a85b , b/161247083 )

Bug Fixes

  • onPreCommit is deprecated; onCommit now has onPreCommit's behavior.

    onCommit and onActive now run in the same choreographer frame that the composition changes committed in rather than at the beginning of the next choreographer frame. ( I70403 )

Version 1.0.0-alpha01

26 آگوست 2020

androidx.compose.animation:animation:1.0.0-alpha01 and androidx.compose.animation:animation-core:1.0.0-alpha01 are released. Version 1.0.0-alpha01 contains these commits.

Version 0.1.0-dev

Version 0.1.0-dev17

August 19, 2020

androidx.compose.animation:animation:0.1.0-dev17 and androidx.compose.animation:animation-core:0.1.0-dev17 are released. Version 0.1.0-dev17 contains these commits.

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

API Changes

  • Offset has become an inline class ( Iaec70 )
  • IntOffset is now an inline class ( Iac0bf )
  • IntSize is now an inline class ( I2bf42 )
  • AnimatedVisibilty composable animates the appearance and disappearance of the child content.

    EnterTransition and ExitTransition are introduced to work with AnimatedVisibilty composable to provide 3 different typs of appearance and disappearance animation: fade, slide, and expand/shrink the content. The different types of animations can be combined to achieve more bespoke look and feel. ( Idda11 )

  • Deprecated PxBounds in favor of Rect. Updated all usages of PxBounds with rect and added proper deprecate/replace with annotations to assist with the migration. ( I37038 , b/162627058 )

Bug Fixes

  • PlacementScope.placeAbsolute() was renamed to PlacementScope.place() , and the previous PlacementScope.place() was renamed to PlacementScope.placeRelative() . As a result, the PlacementScope.place() method will not automatically mirror the position in right-to-left contexts anymore. If this is desired, use PlacementScope.placeRelative() instead. ( I873ac , b/162916675 )
  • The state { ... } composable is now deprecated in favor of explicit calls to remember { mutableStateOf(...) } for clarity. This reduces the overall API surface and number of concepts for state management, and matches the by mutableStateOf() pattern for class property delegation. ( Ia5727 )

Version 0.1.0-dev16

5 آگوست 2020

androidx.compose.animation:animation:0.1.0-dev16 and androidx.compose.animation:animation-core:0.1.0-dev16 are released. Version 0.1.0-dev16 contains these commits.

API Changes

  • Built-in vector converters to convert built-in units are now accessible via Foo.VectorConverter . eg Dp.VectorConverter , Color.VectorConverter , Float.VectorConverter , etc ( I3e273 )
  • Support end listener in Modifier.animateContentSize() such that when size change animation finishes, the listener will be notified, along with start/end size of the animation. ( I277b2 )
  • New animateContentSize modifier that animates the layout size change of its child modifier ( Ieffdc )
  • Added MonotonicFrameAnimationClock that enables you to use a MonotonicFrameClock as an AnimationClockObservable to bridge the gap between the new coroutines based clocks and APIs that still use the old callback based clocks.

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

Bug Fixes

  • The APIs for right-to-left support has been updated. LayoutDirectionAmbient has been added, which can be used to read and change the layout direction. Modifier.rtl and Modifier.ltr have been removed. ( I080b3 )
  • Require type T to be explicitly specified for transitionDefinition. ( I1aded )
  • foundation.shape.corner package were flatten to foundation.share ( I46491 , b/161887429 )
  • Modifier.plus has been deprecated, use Modifier.then instead. 'Then' has a stronger signal of ordering, while also prohibits to type Modifier.padding().background() + anotherModifier , which breaks the chain and harder to read ( Iedd58 , b/161529964 )
  • Modifier.drawBackground has been renamed to Modifier.background ( I13677 )

Version 0.1.0-dev15

22 جولای 2020

androidx.compose.animation:animation:0.1.0-dev15 and androidx.compose.animation:animation-core:0.1.0-dev15 are released. Version 0.1.0-dev15 contains these commits.

Dependencies Update

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

API Changes

  • Transition API has been changed to return a TransitionState instead of passing the TransitionState to children. This makes the API more consistent with animate() APIs. ( I24e38 )
  • Modifier parameter added for Crossfade ( I87cfe , b/159706180 )
  • Use AnimationSpec instead of AnimationBuilder in the top level APIs to clarify the concept of static animation specification
    • Improve the transition DSL by removing the lambda requirement for creating AnimationSpecs such as tween, spring. They instead take constructor params directly.
    • Improve the overall ease of use of AnimationSpec opening up constructors instead of relying on builders
    • Change the duration and delay for KeyFrames and Tween to Int. This eliminates unnecessary type casts and method overloading (for supporting both Long and Int). ( Ica0b4 )
  • Replaced usage of IntPx with Int. Replaced IntPxPosition with IntOffset. Replaced IntPxSize with IntSize. ( Ib7b44 )
  • In order to consolidate the number of classes used to represent sizing information, standardize on usage of the Size class instead of PxSize. This provides the benefits of an inline class to leverage a long to pack 2 float values to represent width and height represented as floats. ( Ic0191 )
  • In order to consolidate the number of classes used to represent positioning information, standardize on usage of the Offset class instead of PxPosition. This provides the benefits of an inline class to leverage a long to pack 2 float values to represent x and y offsets represented as floats. ( I3ad98 )
  • Replaced usage of Px class in various compose classes as part of the large refactoring effort to only rely on Dp and primitive types for pixel parameters ( I086f4 )
  • Added animate() support for Dp, Px, Size, Position, Bounds, PxPosition, PxSize, PxBounds, IntPx, IntPxSize, IntPxPosition, IntPxBounds, and AnimationVector ( Ib7518 )
  • Crossfade now accepts optional AnimationBuilder param to allow configuring the animation ( I6d6e0 )
  • Replaced all nullable Color uses in API with non-nullable and use Color.Unset instead of null ( Iabaa7 )
  • Removed ValueHolder class. Restructured AnimatedValue, AnimatedFloat classes to make the animation value field abstract so that subclasses can watch the value update.
    • Added model classes for AnimatedValue, AnimatedFloat, etc.
    • Added a new set of light-weight @Composable API for animating between values. ( I79530 )
  • Breaking changes to the ambients API. See log and Ambient<T> documentation for details ( I4c7ee , b/143769776 )
  • New repeat mode: Reverse. This mode reverses the previous iteration as the animation repeats in RepeatableSpec or VectorizedRepeatableSpec. ( Ibe0f5 )
  • API additions to ManualAnimationClock: hasObservers: Boolean and constructor parameter dispatchOnSubscribe: Boolean ( Iaa134 )
  • Added APIs for getting min/max bounds in AnimatedFloat ( Icd9cc )

Bug Fixes

  • runOnIdleCompose renamed to runOnIdle ( I83607 )
  • Several testing APIs were renamed to be more intuitive. All findXYZ APIs were renamed to onNodeXYZ. All doXYZ APIs were renamed to performXYZ. ( I7f164 )
  • Introduced low level stateless animation APIs. These APIs ( I63bf7 )
  • The Recompose composable is no longer a useful abstraction. Most recomposition should happen as a result of MutableState assignments. For anything beyond that, it is recommended that you use the invalidate function to trigger a recomposition of the current scope. ( Ifc992 )
  • Replaced usage of Px class in various compose classes as part of the large refactoring effort to only rely on Dp and primitive types for pixel parameters. Deleted Px class in its entirety ( I3ff33 )
  • Replaced usage of Px class in various compose classes as part of the large refactoring effort to only rely on Dp and primitive types for pixel parameters ( Id3434 )
  • Crossfade can now work with null as initial value ( Iad6a4 , b/155947711 )
  • Replaced usage of Px class in various compose classes as part of the large refactoring effort to only rely on Dp and primitive types for pixel parameters ( I19d02 )
  • Consolidated CanvasScope implementations so there is now just DrawScope and ContentDrawScope Renamed CanvasScope to DrawScope. Updated DrawScope to implement Density interface and provide LayoutDirection Deleted DrawScope subclass in ContentDrawScope Painter and PainterModifier have been updated to no longer maintain an RTL property themselves as DrawScope provides this already without manually providing it ( I1798e )
  • Updated higher level compose APIs that expose a Canvas to expose CanvasScope instead. This removes the need for consumers to maintain their own Paint objects. For consumers that still require access to a Canvas they can use the drawCanvas extension method which provides a callback to issue drawing commands with the underlying Canvas. ( I80afd )
  • Added verticalGravity and horizontalGravity parameters to Row and Column, respectively. ( I7dc5a )
  • ui-text module is renamed as ui-text-core ( I57dec )
  • Improve DrawModifier API:
    • Made the receiver scope for draw() ContentDrawScope
    • Removed all parameters on draw()
    • DrawScope has same interface as former CanvasScope
    • ContentDrawScope has drawContent() method ( Ibaced , b/152919067 )
  • runOnIdleCompose and runOnUiThread are now global functions instead of methods on ComposeTestRule. ( Icbe8f )
  • [Mutable]State property delegate operators moved to extensions to support Kotlin 1.4 property delegate optimizations. Callers must add imports to continue using by state { ... } or by mutableStateOf(...) . ( I5312c )
  • ColoredRect has been deprecated. Use Box(Modifier.preferredSize(width, height).drawBackground(color)) instead. ( I499fa , b/152753731 )
  • Replaced Modifier plus operator with factory extension functions ( I225e4 )
  • Deprecated Center composable. It should be replaced either with the LayoutSize.Fill + LayoutAlign.Center modifier, or with one of the Box or Stack composables with suitable modifiers applied ( Idf5e0 )
  • Renamed LayoutFlexible to LayoutWeight. Renamed tight parameter to fill. ( If4738 )
  • The Opacity composable function has been replaced with the drawOpacity modifier. ( I5fb62 )
  • Tests using AndroidComposeTestRule now provide an animation clock at the root of the composition that allows it to be paused, resumed and advanced manually. ( Id54c5 )
  • Support right-to-left direction in LayoutPadding modifier ( I9e8da )
  • Density and DensityScope were merged into one interface. Instead of ambientDensity() you can now use DensityAmbient.current. Instead of withDensity(density) just with(density) ( I11cb1 )
  • Added copy methods to various inline class types including:
    • افست
    • اندازه
    • شعاع
    • حرکت
    • TransformOrigin
    • Deprecated Size.copy companion object method favor of instance copy method ( Ife290 , b/159905651 )
  • androidx.compose.ViewComposer has been moved to androidx.ui.node.UiComposer androidx.compose.Emittable has been removed. It was redundant with ComponentNode. androidx.compose.ViewAdapters has been removed. They are no longer a supported use case. Compose.composeInto has been deprecated. Use setContent or setViewContent instead. Compose.disposeComposition has been deprecated. Use the dispose method on the Composition returned by setContent instead. androidx.compose.Compose.subcomposeInto has moved to androidx.ui.core.subcomposeInto ComponentNode#emitInsertAt has been renamed to ComponentNode#insertAt ComponentNode#emitRemoveAt has been renamed to ComponentNode#removeAt ComponentNode#emitMode has been renamed to ComponentNode#move ( Idef00 )
،

Compose Animation

Build animations in their Jetpack Compose applications to enrich the user experience.
آخرین به روز رسانی Stable Release کاندید را آزاد کنید Beta Release Alpha Release
4 سپتامبر 2024 1.7.0 - - 1.8.0-alpha01

ساختار

Compose is a combination of 7 Maven group IDs within androidx . Each group contains a targeted subset of functionality, each with its own set of release notes.

This table explains the groups and links to each set of release notes.

گروه توضیحات
compose.animation Build animations in their Jetpack Compose applications to enrich the user experience.
compose.compiler Transform @Composable functions and enable optimizations with a Kotlin compiler plugin.
compose.foundation Write Jetpack Compose applications with ready to use building blocks and extend foundation to build your own design system pieces.
compose.material Build Jetpack Compose UIs with ready to use Material Design Components. This is the higher level entry point of Compose, designed to provide components that match those described at www.material.io.
compose.material3 Build Jetpack Compose UIs with Material Design 3 Components, the next evolution of Material Design. Material 3 includes updated theming and components and Material You personalization features like dynamic color, and is designed to be cohesive with the new Android 12 visual style and system UI.
compose.runtime Fundamental building blocks of Compose's programming model and state management, and core runtime for the Compose Compiler Plugin to target.
compose.ui Fundamental components of compose UI needed to interact with the device, including layout, drawing, and input.

Declaring dependencies

To add a dependency on Compose, you must add the Google Maven repository to your project. Read Google's Maven repository for more information.

Add the dependencies for the artifacts you need in the build.gradle file for your app or module:

شیار

dependencies {
    implementation "androidx.compose.animation:animation:1.7.0"
}

android {
    buildFeatures {
        compose true
    }

    composeOptions {
        kotlinCompilerExtensionVersion = "1.5.15"
    }

    kotlinOptions {
        jvmTarget = "1.8"
    }
}

کاتلین

dependencies {
    implementation("androidx.compose.animation:animation:1.7.0")
}

android {
    buildFeatures {
        compose = true
    }

    composeOptions {
        kotlinCompilerExtensionVersion = "1.5.15"
    }

    kotlinOptions {
        jvmTarget = "1.8"
    }
}

For more information about dependencies, see Add build dependencies .

بازخورد

Your feedback helps make Jetpack better. Let us know if you discover new issues or have ideas for improving this library. Please take a look at the existing issues in this library before you create a new one. You can add your vote to an existing issue by clicking the star button.

Create a new issue

See the Issue Tracker documentation for more information.

Version 1.8

Version 1.8.0-alpha01

4 سپتامبر 2024

androidx.compose.animation:animation-*:1.8.0-alpha01 is released. Version 1.8.0-alpha01 contains these commits .

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

  • New Modifier.animateBounds API for animating size and position changes within a lookahead scope. 94b9394

API Changes

  • Remove experimental flags on Keyframes with Arcs and Splines ( 89e1199 )

رفع اشکال

  • Skip placeHolderSize logic when no match is found ( 77c0160 )
  • Clamp play time in AndroidFlingSpline to prevent crashes due to non-monotonically increasing play time( 9d47587 )
  • Fix SharedTransitionScope not drawing items in certain conditions ( b41077b6 )

External Contribution

  • Prevent setting seekable transition playTime when no transition is running by Steven Schoen. ( c2e6e7e6 )

Version 1.7

Version 1.7.0

4 سپتامبر 2024

androidx.compose.animation:animation-*:1.7.0 is released.

Important changes since 1.6.0

Important changes in version 1.7.0 are covered in this blogpost .

New Shared Element Transition APIs

  • New shared element transition APIs await your usage and feedback. These new experimental APIs enable tagging layouts as shared across layout tree using the provided modifiers, producing smoothly changing bounds when one set of shared content exits and the other set enters. ( Icb0b9 )
  • New scaleInSharedContentToBounds and scaleOutSharedContentToBounds to scale content in sharedBounds ( I731c1 )
  • Experimental SharedTransitionScope is now an interface rather than a class. ( Iaf856 )
  • New resizeModes ( ScaleToBounds and RemeasureToBounds ) for sharedBounds to choose between scaling and remeasure. The previous scaleIn/OutSharedContentToBounds APIs are now deprecated. ( I0d41a )

Improvements to existing APIs:

  • New Modifier.animateContentSize that takes an additional parameter for custom content alignment. ( I5623a , b/269803907 )
  • New Experimental DeferredTargetAnimation for animating size, position, or any other target that is unknown during instantiation. ( I60745 )
  • SeekableTransitionState replaces snapTo() with seekTo() , and adds a snapTo() that immediately changes the state to a destination state without any kind of animation.
  • You may now pass a periodicBias value (Float) to keyframesWithSpline , this will make it so that the initial and final velocity of the spline are equal. Useful for repeatable animations using splines. The bias indicates how much each velocity (initial and final) gets modified to achieve periodicity. ( Ic1e6c , b/292114811 )

The following APIs have become stable or been removed:

  • AnimatedVisibilityScope.transition is now a stable API. Modifier.animateEnterExit(..) has also been made stable. ( I6c1d1 )
  • ApproachLayoutModifierNode and Modifier.approachLayout are now stable, with new isMeasurementApproachInProgress() and isPlacementApproachInProgress() to replace the old isMeasurementApproachComplete() and isPlacementApproachComplete() respectively.
  • Removed deprecated intermediateLayout modifier. ( I3e91c )
  • LookaheadScope APIs have been made stable. ( I21507 )

Version 1.7.0-rc01

21 آگوست 2024

androidx.compose.animation:animation-*:1.7.0-rc01 is released. Version 1.7.0-rc01 contains these commits .

Version 1.7.0-beta07

7 آگوست 2024

androidx.compose.animation:animation-*:1.7.0-beta07 is released. Version 1.7.0-beta07 contains these commits .

رفع اشکال

  • Fixed SharedTransitionScope not drawing overlay items during transition in certain conditions, which would typically include usage with Navigation. ( Id65ab , b/347520198 )

Version 1.7.0-beta06

24 جولای 2024

androidx.compose.animation:animation-*:1.7.0-beta06 is released. Version 1.7.0-beta06 contains these commits .

رفع اشکال

  • Fixed SeekableTransition leaking transition states by properly cleaning up observations from SnapshotStateObserver when the transition is disposed. ( b9c7182 )
  • Fixed edge cases where child Transitions are not properly marked complete when the parent completes. ( dc42216 )

Version 1.7.0-beta05

10 جولای 2024

androidx.compose.animation:animation-*:1.7.0-beta05 is released. Version 1.7.0-beta05 contains these commits .

Bug Fixes

  • The Transition property totalDurationNanos now can be properly read within a snapshotFlow .

Version 1.7.0-beta04

26 ژوئن 2024

androidx.compose.animation:animation-*:1.7.0-beta04 is released. Version 1.7.0-beta04 contains these commits .

Version 1.7.0-beta03

12 ژوئن 2024

androidx.compose.animation:animation-*:1.7.0-beta03 is released. Version 1.7.0-beta03 contains these commits .

Version 1.7.0-beta02

May 29, 2024

androidx.compose.animation:animation-*:1.7.0-beta02 is released. Version 1.7.0-beta02 contains these commits .

Version 1.7.0-beta01

14 مه 2024

androidx.compose.animation:animation-*:1.7.0-beta01 is released. Version 1.7.0-beta01 contains these commits .

API Changes

  • New resizeModes ( ScaleToBounds and RemeasureToBounds ) for sharedBounds to choose between scaling and remeasure. The previous scaleIn/OutSharedContentToBounds APIs are now deprecated. ( I0d41a )

External Contribution

Version 1.7.0-alpha08

1 مه 2024

androidx.compose.animation:animation-*:1.7.0-alpha08 is released. Version 1.7.0-alpha08 contains these commits .

API Changes

  • LookaheadScope APIs have been made stable. ( I21507 )

External Contribution

  • Clear start animation time after SeekableTransitionState animates/snaps by Steven Schoen ( 1ca89529 )

Version 1.7.0-alpha07

April 17, 2024

androidx.compose.animation:animation-*:1.7.0-alpha07 is released. Version 1.7.0-alpha07 contains these commits .

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

  • New shared element transition APIs await your usage and feedback. These new experimental APIs enable tagging layouts as shared across layout tree using the provided modifiers, producing smoothly changing bounds when one set of shared content exits and the other set enters. ( Icb0b9 )
  • New scaleInSharedContentToBounds and scaleOutSharedContentToBounds to scale content in sharedBounds ( I731c1 )

API Changes

  • AnimatedVisibilityScope.transition is now a stable API. Modifier.animateEnterExit(..) has also been made stable. ( I6c1d1 )
  • ApproachLayoutModifierNode and Modifier.approachLayout are now stable, with new isMeasurementApproachInProgress() and isPlacementApproachInProgress() to replace the old isMeasurementApproachComplete() and isPlacementApproachComplete() respectively.
  • Removed deprecated intermediateLayout modifier. ( I3e91c )
  • You may now pass a periodicBias value (Float) to keyframesWithSpline , this will make it so that the initial and final velocity of the spline are equal. Useful for repeatable animations using splines. The bias indicates how much each velocity (initial and final) gets modified to achieve periodicity. ( Ic1e6c , b/292114811 )

Bug Fixes

  • Fixed over-shooting and under-shooting easing curves that would previously be clamped to 0..1 ( I38747 )

Version 1.7.0-alpha06

3 آوریل 2024

androidx.compose.animation:animation-*:1.7.0-alpha06 is released. Version 1.7.0-alpha06 contains these commits .

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

  • Item appearance and disappearance animation support was added into LazyColumn and LazyRow . Previously it was possible to add Modifier.animateItemPlacement() modifier in order to support placement (reordering) animations. We deprecated this modifier and introduced a new non-experimental modifier called Modifier.animateItem() which allows you to support all three animation types: appearance (fade in), disappearance (fade out) and reordering. ( I2d7f7 , b/330152398 , b/150812265 )

Bug Fixes

  • Improved performance of updateTransition API.

Version 1.7.0-alpha05

20 مارس 2024

androidx.compose.animation:animation-*:1.7.0-alpha05 is released. Version 1.7.0-alpha05 contains these commits .

API Changes

  • SeekableTransitionState replaces snapTo() with seekTo() , and adds a snapTo() that immediately changes the state to a destination state without any kind of animation.

Version 1.7.0-alpha04

6 مارس 2024

androidx.compose.animation:animation-*:1.7.0-alpha04 is released. Version 1.7.0-alpha04 contains these commits .

API Changes

  • New API Path.reverse() to reverse a path's direction ( I36348 )

Version 1.7.0-alpha03

February 21, 2024

androidx.compose.animation:animation-*:1.7.0-alpha03 is released. Version 1.7.0-alpha03 contains these commits.

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

  • New Modifier.animateContentSize that takes an additional parameter for custom content alignment. ( I5623a , b/269803907 )
  • New Experimental DeferredTargetAnimation for animating size, position, or any other target that is unknown during instantiation. ( I60745 )

Version 1.7.0-alpha02

February 7, 2024

androidx.compose.animation:animation-*:1.7.0-alpha02 is released. Version 1.7.0-alpha02 contains these commits.

Bug Fixes

  • Compatibility fix for KeyframesSpec . ( I2bdf3 , b/322214617 )
  • Fixed Modifier.animateContentSize not resetting properly when used in LazyList . ( I070512 , b/322525716 )
  • Fixed IllegalStateException on KeyframesSpec when using out of range timestamps. ( I341b8 , b/322839811 )

Version 1.7.0-alpha01

24 ژانویه 2024

androidx.compose.animation:animation-*:1.7.0-alpha01 is released. Version 1.7.0-alpha01 contains these commits.

Version 1.6

Version 1.6.8

12 ژوئن 2024

androidx.compose.animation:animation-*:1.6.8 is released. Version 1.6.8 contains these commits .

Version 1.6.7

1 مه 2024

androidx.compose.animation:animation-*:1.6.7 is released. Version 1.6.7 contains these commits .

Version 1.6.6

April 17, 2024

androidx.compose.animation:animation-*:1.6.6 is released. No changes since the previous release

Version 1.6.5

3 آوریل 2024

androidx.compose.animation:animation-*:1.6.5 is released. Version 1.6.5 contains these commits .

Version 1.6.4

20 مارس 2024

androidx.compose.animation:animation-*:1.6.4 is released. Version 1.6.4 contains these commits .

Version 1.6.3

6 مارس 2024

androidx.compose.animation:animation-*:1.6.3 is released. Version 1.6.3 contains these commits .

Version 1.6.2

February 21, 2024

androidx.compose.animation:animation-*:1.6.2 is released. Version 1.6.2 contains these commits.

نسخه 1.6.1

February 7, 2024

androidx.compose.animation:animation-*:1.6.1 is released. Version 1.6.1 contains these commits.

Bug Fixes

Version 1.6.0

24 ژانویه 2024

androidx.compose.animation:animation-*:1.6.0 is released. Version 1.6.0 contains these commits.

Version 1.6.0-rc01

10 ژانویه 2024

androidx.compose.animation:animation-*:1.6.0-rc01 is released. Version 1.6.0-rc01 contains these commits.

Version 1.6.0-beta03

13 دسامبر 2023

androidx.compose.animation:animation-*:1.6.0-beta03 is released. Version 1.6.0-beta03 contains these commits.

API Changes

  • Temporarily removed scaleInToFitContainer and scaleOutToFitContainer from AnimatedContentTransitionScope as they require lookahead. They will be available when lookahead is on by default or opted-in in future releases.

Version 1.6.0-beta02

29 نوامبر 2023

androidx.compose.animation:animation-*:1.6.0-beta02 is released. Version 1.6.0-beta02 contains these commits.

Version 1.6.0-beta01

15 نوامبر 2023

androidx.compose.animation:animation-*:1.6.0-beta01 is released. Version 1.6.0-beta01 contains these commits.

API Changes

  • ExitTransition.Hold has been renamed to ExitTransition.KeepUntilTransitionsFinished to be more explicit. ( I1c490 )
  • You may now use keyframesWithSpline to interpolate any N-dimensional value using monotonic splines. It's particularly useful to interpolate positional values such as Offset , IntOffset , DpOffset . Added as Experimental API.

Bug Fixes

  • Add renderer support for Sweep Gradient in ArcLine . ( I4d5bb )
  • Implement equals and hashcode for PageSize.Fixed . ( Ie3ede , b/300134276 )
  • Fix binary compatibility issue with Window Inset change. ( Iee695 )
  • Remove material core layer for Material3 Chip/Button as the microbenchmarks show better performance without it. ( I55555 )

Version 1.6.0-alpha08

18 اکتبر 2023

androidx.compose.animation:animation-*:1.6.0-alpha08 is released. Version 1.6.0-alpha08 contains these commits.

API Changes

  • Deprecated KeyframesSpecConfig#with in favor KeyframesSpecConfig#using which preserves the builder pattern. ( I1d769 )

Version 1.6.0-alpha07

4 اکتبر 2023

androidx.compose.animation:animation-*:1.6.0-alpha07 is released. Version 1.6.0-alpha07 contains these commits.

API Changes

  • Fixed and Scrollable Tabrows now have Primary and Secondary variants. These correctly map to the color and indicator behavior as defined in Material3.
  • PrimaryScrollableTabRow and SecondaryScrollableTabRow now expose scroll state. ( Iec8f5 , b/260572337 )

Version 1.6.0-alpha06

20 سپتامبر 2023

androidx.compose.animation:animation-*:1.6.0-alpha06 is released. Version 1.6.0-alpha06 contains these commits.

Version 1.6.0-alpha05

6 سپتامبر 2023

androidx.compose.animation:animation-*:1.6.0-alpha05 is released. Version 1.6.0-alpha05 contains these commits.

API Changes

  • Added PathEasing to enable an arbitrary path to be supplied to an easing curve. ( Idb4b9 )

Version 1.6.0-alpha04

23 آگوست 2023

androidx.compose.animation:animation-*:1.6.0-alpha04 is released. Version 1.6.0-alpha04 contains these commits.

API Changes

  • Add SeekableTransitionState to allow developers to control the progress of a transition. ( I8e69d )

Version 1.6.0-alpha03

9 آگوست 2023

androidx.compose.animation:animation-*:1.6.0-alpha03 is released. Version 1.6.0-alpha03 contains these commits.

API Changes

  • New type of enter/exit transition that scales the content based on the size of the animating container during enter & exit animation. LookaheadScope Composable fun and interface are now stable. ( Ifb2ce )

Version 1.6.0-alpha02

July 26, 2023

androidx.compose.animation:animation-*:1.6.0-alpha02 is released. Version 1.6.0-alpha02 contains these commits.

API Changes

  • New ExitTransition.Hold to display outgoing content in AnimatedContent until both enter & exit transition are finished. ( I5984f )
  • Additional annotations to specify allowed inputs to composables ( I51109 )

Version 1.6.0-alpha01

21 ژوئن 2023

androidx.compose.animation:animation-*:1.6.0-alpha01 is released. Version 1.6.0-alpha01 contains these commits.

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

  • Enable Modifier.animateContentSize and AnimatedVisibility to be fully integrated into the lookahead system by reporting the target size in the lookahead pass.

API Changes

  • New property in IntrinsincMeasureScope and its implementations (eg MeasureScope ) to indicate whether the current measure pass is a lookahead pass. ( I7a812 )

Bug Fixes

  • Removed allocations from spring animations. ( Ie9431 )
  • value parameter name for Enum.valueOf changed ( Ia9b89 )
  • more thrown exceptions from enum valueOf ( I818fe )

Version 1.5

Version 1.5.4

18 اکتبر 2023

androidx.compose.animation:animation-*:1.5.4 is released. Version 1.5.4 contains these commits.

Version 1.5.3

4 اکتبر 2023

androidx.compose.animation:animation-*:1.5.3 is released. This version has no changes

Version 1.5.2

27 سپتامبر 2023

androidx.compose.animation:animation-*:1.5.2 is released. Version 1.5.2 contains these commits.

Version 1.5.1

6 سپتامبر 2023

androidx.compose.foundation:foundation-*:1.5.1 is released. Version 1.5.1 contains these commits.

Bug Fixes

  • Fixed text fields showing keyboard and being editable when readOnly is true. Also fixed the keyboard not showing when readOnly is changed from true to false while focused. ( I34a19 , b/246909589 )

Version 1.5.1

6 سپتامبر 2023

androidx.compose.animation:animation-*:1.5.1 is released. Version 1.5.1 contains these commits.

Version 1.5.0

9 آگوست 2023

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

Version 1.5.0-rc01

July 26, 2023

androidx.compose.animation:animation-*:1.5.0-rc01 is released. Version 1.5.0-rc01 contains these commits.

رفع اشکال

  • Fixed an issue where calling .value on a primitive state type (like MutableIntState ) would report a lint warning with an invalid fix. The inspection will now recommend migrating to the correct property. ( Iba953 , b/287279257 )

  • An optional inspection to recommend migrating mutableStateOf() calls to their corresponding specialized types for primitives is available. Its lint ID is AutoboxingStateCreation . Previously, this inspection was enabled by default for all projects. To see this warning in Android Studio's editor and your project's lint outputs, change its severity from informational to warning (or higher) by declaring warning "AutoboxingStateCreation" inside your module's build.gradle or build.gradle.kts configuration as shown ( I34f7e ):

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

Version 1.5.0-beta03

28 ژوئن 2023

androidx.compose.animation:animation-*:1.5.0-beta03 is released. Version 1.5.0-beta03 contains these commits.

Version 1.5.0-beta02

7 ژوئن 2023

androidx.compose.animation:animation-*:1.5.0-beta02 is released. Version 1.5.0-beta02 contains these commits.

Version 1.5.0-beta01

24 مه 2023

androidx.compose.animation:animation-*:1.5.0-beta01 is released. Version 1.5.0-beta01 contains these commits.

API Changes

  • Removed allocations in recomposition, color animations, and AndroidComposeView ( Ib2bfa )

رفع اشکال

  • Removed allocations from spring animations ( Ie9431 )

Version 1.5.0-alpha04

10 مه 2023

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

API Changes

  • ContentKey is now supported in AnimatedContent to allow more control for when transition should happen. ( Ic069b )

Version 1.5.0-alpha03

19 آوریل 2023

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

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

  • New default behavior for SubcomposeLayout in LookaheadScope . It allows SubcomposeLayouts that don't have conditional slots (eg TabRow , Scaffold , BoxWithConstraints , etc) to work nicely with lookahead animations.

API Changes

  • New default intermediateMeasurePolicy that reuses measure policy from lookahead pass allows SubcomposeLayout subtypes without conditional slots such as Scaffold , TabRow , and BoxWithConstraints to work with lookahead by default. ( Id84c8 )
  • Rename infix fun with to togetherWith for combining enter and exit transitions. New AnimatedContentScope as receiver for the content lambda. ( Ic39ae )

Version 1.5.0-alpha02

5 آوریل 2023

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

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

  • New experimental API to support lookahead in SubcomposeLayout . This will allow SubcomposeLayout to function properly in a LookaheadScope . More out-of-the-box support for specific subtypes of SubcomposeLayout will come soon.

API Changes

  • New SubcomposeLayout API that takes an additional intermediate measure policy for handling measure/layout logic during lookahead-based animations. ( I017d3 )

Version 1.5.0-alpha01

22 مارس 2023

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

API Changes

  • AnimatedContent APIs are now stable AnimatedContentScope has been renamed to AnimatedContentTransitionScope . scaleIn and scaleOut are now stable APIs. ( Iaf54e )

Version 1.4

Version 1.4.3

3 مه 2023

androidx.compose.animation:animation:1.4.3 , androidx.compose.animation:animation-core:1.4.3 , and androidx.compose.animation:animation-graphics:1.4.3 are released with no changes (only a version bump ).

Version 1.4.2

19 آوریل 2023

androidx.compose.animation:animation:1.4.2 , androidx.compose.animation:animation-core:1.4.2 , and androidx.compose.animation:animation-graphics:1.4.2 are released with no changes. Version 1.4.2 contains these commits.

Version 1.4.1

5 آوریل 2023

androidx.compose.animation:animation:1.4.1 , androidx.compose.animation:animation-core:1.4.1 , and androidx.compose.animation:animation-graphics:1.4.1 are released with no changes. Version 1.4.1 contains these commits.

Version 1.4.0

22 مارس 2023

androidx.compose.animation:animation:1.4.0 , androidx.compose.animation:animation-core:1.4.0 , and androidx.compose.animation:animation-graphics:1.4.0 are released. Version 1.4.0 contains these commits.

Important changes since 1.3.0

  • Tooling label is supported in r ememberInfiniteTransition and all the extension functions on InfiniteTransition and Transition (eg InfiniteTransition#animateColor ) ( I56ef7 )

Version 1.4.0-rc01

8 مارس 2023

androidx.compose.animation:animation:1.4.0-rc01 , androidx.compose.animation:animation-core:1.4.0-rc01 , and androidx.compose.animation:animation-graphics:1.4.0-rc01 are released with no تغییر می کند. Version 1.4.0-rc01 contains these commits.

Version 1.4.0-beta02

22 فوریه 2023

androidx.compose.animation:animation:1.4.0-beta02 , androidx.compose.animation:animation-core:1.4.0-beta02 , and androidx.compose.animation:animation-graphics:1.4.0-beta02 are released with no تغییر می کند. Version 1.4.0-beta02 contains these commits.

Version 1.4.0-beta01

8 فوریه 2023

androidx.compose.animation:animation:1.4.0-beta01 , androidx.compose.animation:animation-core:1.4.0-beta01 , and androidx.compose.animation:animation-graphics:1.4.0-beta01 are released with no تغییر می کند. Version 1.4.0-beta01 contains these commits.

Version 1.4.0-alpha05

January 25, 2023

androidx.compose.animation:animation:1.4.0-alpha05 , androidx.compose.animation:animation-core:1.4.0-alpha05 , and androidx.compose.animation:animation-graphics:1.4.0-alpha05 are released. Version 1.4.0-alpha05 contains these commits.

تغییرات

  • No changes in animation libraries since the last alpha, version bump only

Version 1.4.0-alpha04

11 ژانویه 2023

androidx.compose.animation:animation:1.4.0-alpha04 , androidx.compose.animation:animation-core:1.4.0-alpha04 , and androidx.compose.animation:animation-graphics:1.4.0-alpha04 are released. Version 1.4.0-alpha04 contains these commits.

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

  • Tooling label is supported in rememberInfiniteTransition and all the extension functions on InfiniteTransition and Transition (eg InfiniteTransition#animateColor ) ( I56ef7 )

API Changes

  • InfiniteTransition#TransitionAnimationState and InfiniteTransition#animations APIs are now public. ( I36682 )

Version 1.4.0-alpha03

7 دسامبر 2022

androidx.compose.animation:animation:1.4.0-alpha03 , androidx.compose.animation:animation-core:1.4.0-alpha03 , and androidx.compose.animation:animation-graphics:1.4.0-alpha03 are released. Version 1.4.0-alpha03 contains these commits.

API Changes

  • In UI tests using a Compose rule, continuations resumed during withFrameNanos callbacks will not be dispatched until after all frame callbacks have finished running. This matches the behavior of compose when running normally. However, tests that rely on the old behavior may fail. This should only affect code that calls withFrameNanos or withFrameMillis directly, and has logic outside of callback passed to those functions that may need to be moved inside the callbacks. See the animation test changes in this CL for examples .
  • Added optional onPerformTraversals: (Long) -> Unit parameter to TestMonotonicFrameClock constructor and factory function to run code after withFrameNanos callbacks but before resuming callers' coroutines. ( Idb413 , b/254115946 , b/222093277 , b/255802670 )
  • New param in AnimatedContent for tooling label ( Iebe2d )

Version 1.4.0-alpha02

9 نوامبر 2022

androidx.compose.animation:animation:1.4.0-alpha02 , androidx.compose.animation:animation-core:1.4.0-alpha02 , and androidx.compose.animation:animation-graphics:1.4.0-alpha02 are released. Version 1.4.0-alpha02 contains these commits.

API Changes

  • Add ToolingState to allow tooling to change internal states of Composable ( Ie6614 )

Version 1.4.0-alpha01

24 اکتبر 2022

androidx.compose.animation:animation:1.4.0-alpha01 , androidx.compose.animation:animation-core:1.4.0-alpha01 , and androidx.compose.animation:animation-graphics:1.4.0-alpha01 are released. Version 1.4.0-alpha01 contains these commits.

Bug Fixes

  • Fix incorrect interruption animation in AnimatedContent ( b/238662479 )

نسخه 1.3

Version 1.3.3

11 ژانویه 2023

androidx.compose.animation:animation:1.3.3 , androidx.compose.animation:animation-core:1.3.3 , and androidx.compose.animation:animation-graphics:1.3.3 are released. Version 1.3.3 contains these commits.

  • No changes since the 1.3.2.

Version 1.3.2

7 دسامبر 2022

androidx.compose.animation:animation:1.3.2 , androidx.compose.animation:animation-core:1.3.2 , and androidx.compose.animation:animation-graphics:1.3.2 are released. Version 1.3.2 contains these commits.

Bug Fixes

  • Updated to support androidx.compose.ui 1.3.2

Version 1.3.1

9 نوامبر 2022

androidx.compose.animation:animation:1.3.1 , androidx.compose.animation:animation-core:1.3.1 , and androidx.compose.animation:animation-graphics:1.3.1 are released. Version 1.3.1 contains these commits.

Version 1.3.0

24 اکتبر 2022

androidx.compose.animation:animation:1.3.0 , androidx.compose.animation:animation-core:1.3.0 , and androidx.compose.animation:animation-graphics:1.3.0 are released. Version 1.3.0 contains these commits.

Important changes since 1.2.0

  • New set of easing functions are made stable

Version 1.3.0-rc01

5 اکتبر 2022

androidx.compose.animation:animation:1.3.0-rc01 , androidx.compose.animation:animation-core:1.3.0-rc01 , and androidx.compose.animation:animation-graphics:1.3.0-rc01 are released. Version 1.3.0-rc01 contains these commits.

Version 1.3.0-beta03

21 سپتامبر 2022

androidx.compose.animation:animation:1.3.0-beta03 , androidx.compose.animation:animation-core:1.3.0-beta03 , and androidx.compose.animation:animation-graphics:1.3.0-beta03 are released. Version 1.3.0-beta03 contains these commits.

  • No changes since 1.3.0-beta02.

Version 1.3.0-beta02

7 سپتامبر 2022

androidx.compose.animation:animation:1.3.0-beta02 , androidx.compose.animation:animation-core:1.3.0-beta02 , and androidx.compose.animation:animation-graphics:1.3.0-beta02 are released. Version 1.3.0-beta02 contains these commits.

  • Removed Kotlin.experimental from the compiler options since it is depricated

Version 1.3.0-beta01

24 آگوست 2022

androidx.compose.animation:animation:1.3.0-beta01 , androidx.compose.animation:animation-core:1.3.0-beta01 , and androidx.compose.animation:animation-graphics:1.3.0-beta01 are released. Version 1.3.0-beta01 contains these commits.

Version 1.3.0-alpha03

10 آگوست 2022

androidx.compose.animation:animation:1.3.0-alpha03 , androidx.compose.animation:animation-core:1.3.0-alpha03 , and androidx.compose.animation:animation-graphics:1.3.0-alpha03 are released. Version 1.3.0-alpha03 contains these commits.

API Changes

  • New param in Crossfade , animateAsState and Animatable for tooling label ( Iac08a )
  • Added atFraction function for defining keyframes at a fraction instead of at a specific duration. ( I20c76 , b/232059455 )

Version 1.3.0-alpha02

27 جولای 2022

androidx.compose.animation:animation:1.3.0-alpha02 , androidx.compose.animation:animation-core:1.3.0-alpha02 , and androidx.compose.animation:animation-graphics:1.3.0-alpha02 are released. Version 1.3.0-alpha02 contains these commits.

Version 1.3.0-alpha01

29 ژوئن 2022

androidx.compose.animation:animation:1.3.0-alpha01 , androidx.compose.animation:animation-core:1.3.0-alpha01 , and androidx.compose.animation:animation-graphics:1.3.0-alpha01 are released. Version 1.3.0-alpha01 contains these commits.

API Changes

  • New LookaheadLayout that supports a lookahead pass before the actual measure/layout. This allows a pre-calculation of the layout when it changes, while permitting the post-lookahead measure/layout to use the pre-calculated size/position to animate the size and positions towards the target. SubcomposeLayouts are not yet supported, but will be in an upcoming release. ( I477f5 )

نسخه 1.2

Version 1.2.1

10 آگوست 2022

androidx.compose.animation:animation:1.2.1 , androidx.compose.animation:animation-core:1.2.1 , and androidx.compose.animation:animation-graphics:1.2.1 are released. Version 1.2.1 contains these commits.

Version 1.2.0

27 جولای 2022

androidx.compose.animation:animation:1.2.0 , androidx.compose.animation:animation-core:1.2.0 , and androidx.compose.animation:animation-graphics:1.2.0 are released. Version 1.2.0 contains these commits.

Important changes since 1.1.0

  • Compose animation now supports 'Animator duration scale' setting from Developer Options.
  • A large selection of new experimental easing curves.
  • AnimatedImageVector now supports repeatCount and repeatMode

Version 1.2.0-rc03

29 ژوئن 2022

androidx.compose.animation:animation:1.2.0-rc03 , androidx.compose.animation:animation-core:1.2.0-rc03 , and androidx.compose.animation:animation-graphics:1.2.0-rc03 are released. Version 1.2.0-rc03 contains these commits.

  • No changes since 1.2.0-rc02.

Version 1.2.0-rc02

22 ژوئن 2022

androidx.compose.animation:animation:1.2.0-rc02 , androidx.compose.animation:animation-core:1.2.0-rc02 , and androidx.compose.animation:animation-graphics:1.2.0-rc02 are released. Version 1.2.0-rc02 contains these commits.

Bug Fixes

  • Removed ExperimentalEasingApi annotation on Easing functions ( Ied441 )

Version 1.2.0-rc01

15 ژوئن 2022

androidx.compose.animation:animation:1.2.0-rc01 , androidx.compose.animation:animation-core:1.2.0-rc01 , and androidx.compose.animation:animation-graphics:1.2.0-rc01 are released. Version 1.2.0-rc01 contains these commits.

API Changes

  • Interfaces in compose libraries are now built using jdk8 default interface methods ( I5bcf1 )

Version 1.2.0-beta03

1 ژوئن 2022

androidx.compose.animation:animation:1.2.0-beta03 , androidx.compose.animation:animation-core:1.2.0-beta03 , and androidx.compose.animation:animation-graphics:1.2.0-beta03 are released. Version 1.2.0-beta03 contains these commits.

API Changes

  • Added Experimental Easing Curves for Animations ( I64a38 )

Version 1.2.0-beta02

18 مه 2022

androidx.compose.animation:animation:1.2.0-beta02 , androidx.compose.animation:animation-core:1.2.0-beta02 , and androidx.compose.animation:animation-graphics:1.2.0-beta02 are released. Version 1.2.0-beta02 contains these commits.

Version 1.2.0-beta01

11 مه 2022

androidx.compose.animation:animation:1.2.0-beta01 , androidx.compose.animation:animation-core:1.2.0-beta01 , and androidx.compose.animation:animation-graphics:1.2.0-beta01 are released. Version 1.2.0-beta01 contains these commits.

  • This is the first beta release of 1.2! There are no changes since the last alpha.

Version 1.2.0-alpha08

20 آوریل 2022

androidx.compose.animation:animation:1.2.0-alpha08 , androidx.compose.animation:animation-core:1.2.0-alpha08 , and androidx.compose.animation:animation-graphics:1.2.0-alpha08 are released. Version 1.2.0-alpha08 contains these commits.

Version 1.2.0-alpha07

6 آوریل 2022

androidx.compose.animation:animation:1.2.0-alpha07 , androidx.compose.animation:animation-core:1.2.0-alpha07 , and androidx.compose.animation:animation-graphics:1.2.0-alpha07 are released. Version 1.2.0-alpha07 contains these commits.

API Changes

  • AnimatedImageVector now supports repeatCount and repeatMode ( Ia3e75 , b/199304067 )

Version 1.2.0-alpha06

23 مارس 2022

androidx.compose.animation:animation:1.2.0-alpha06 , androidx.compose.animation:animation-core:1.2.0-alpha06 , and androidx.compose.animation:animation-graphics:1.2.0-alpha06 are released. Version 1.2.0-alpha06 contains these commits.

API Changes

  • Updated parsing of vector drawables to support auto mirroring to flip the content of a VectorPainter if the current layout direction is RTL. ( I79cd9 , b/185760237 )

Bug Fixes

  • Updated Vector graphics APIs to use the proper composable annotation @VectorComposable instead of @UiComposable ( I942bc )

Version 1.2.0-alpha05

9 مارس 2022

androidx.compose.animation:animation:1.2.0-alpha05 , androidx.compose.animation:animation-core:1.2.0-alpha05 , and androidx.compose.animation:animation-graphics:1.2.0-alpha05 are released. Version 1.2.0-alpha05 contains these commits.

API Changes

  • هورا! Compose animation now supports 'Animator duration scale' setting from Developer Options. ( I5a4fc , b/161675988 )

Version 1.2.0-alpha04

23 فوریه 2022

androidx.compose.animation:animation:1.2.0-alpha04 , androidx.compose.animation:animation-core:1.2.0-alpha04 , and androidx.compose.animation:animation-graphics:1.2.0-alpha04 are released. Version 1.2.0-alpha04 contains these commits.

Version 1.2.0-alpha03

9 فوریه 2022

androidx.compose.animation:animation:1.2.0-alpha03 , androidx.compose.animation:animation-core:1.2.0-alpha03 , and androidx.compose.animation:animation-graphics:1.2.0-alpha03 are released. Version 1.2.0-alpha03 contains these commits.

Version 1.2.0-alpha02

26 ژانویه 2022

androidx.compose.animation:animation:1.2.0-alpha02 , androidx.compose.animation:animation-core:1.2.0-alpha02 , and androidx.compose.animation:animation-graphics:1.2.0-alpha02 are released. Version 1.2.0-alpha02 contains these commits.

Version 1.2.0-alpha01

12 ژانویه 2022

androidx.compose.animation:animation:1.2.0-alpha01 , androidx.compose.animation:animation-core:1.2.0-alpha01 , and androidx.compose.animation:animation-graphics:1.2.0-alpha01 are released. Version 1.2.0-alpha01 contains these commits.

API Changes

  • Use AnimatedImageVector.animatedVectorResource instead of animatedVectorResource to load an <animated-vector> resource file.
    • Use rememberAnimatedVectorResource instead of AnimatedImageVector#painterFor to render an AnimatedImageVector . ( I9c300 )

Bug Fixes

  • Add toString methods to Animatable and AnimationResult. ( Icd3a6 )

Dependency Updates

  • Now depends on Kotlin 1.6.10 .

نسخه 1.1

نسخه 1.1.1

23 فوریه 2022

androidx.compose.animation:animation:1.1.1 , androidx.compose.animation:animation-core:1.1.1 , and androidx.compose.animation:animation-graphics:1.1.1 are released. Version 1.1.1 contains these commits.

Bug Fixes

Version 1.1.0

9 فوریه 2022

androidx.compose.animation:animation:1.1.0 , androidx.compose.animation:animation-core:1.1.0 , and androidx.compose.animation:animation-graphics:1.1.0 are released. Version 1.1.0 contains these commits.

Important changes since 1.0.0

  • Stable support for the Android 12 Overscroll effect
  • Improvements to touch target sizing
  • Note that, with respect to Compose 1.0, Material components will expand their layout space to meet Material accessibility guidelines for touch target size . For instance, Button touch target will expand to a minimum size of 48x48dp, even if you set the Button's size to be smaller. This aligns Compose Material to the same behavior of Material Design Components, providing consistent behavior if you mix Views and Compose. This change also ensures that when you create your UI using Compose Material components, minimum requirements for touch target accessibility will be met.
  • Stable support for Navigation Rail
  • Graduates a number of previously experimental APIs to stable
  • Support for newer versions of Kotlin

Version 1.1.0-rc03

26 ژانویه 2022

androidx.compose.animation:animation:1.1.0-rc03 , androidx.compose.animation:animation-core:1.1.0-rc03 , and androidx.compose.animation:animation-graphics:1.1.0-rc03 are released. Version 1.1.0-rc03 contains these commits.

Bug Fixes

  • Updated to support Compose Material 1.1.0-rc03

Version 1.1.0-rc01

15 دسامبر 2021

androidx.compose.animation:animation:1.1.0-rc01 and androidx.compose.animation:animation-core:1.1.0-rc01 are released. Version 1.1.0-rc01 contains these commits.

API Changes

  • Use AnimatedImageVector.animatedVectorResource instead of animatedVectorResource to load an <animated-vector> resource file.
    • Use rememberAnimatedVectorResource instead of AnimatedImageVector#painterFor to render an AnimatedImageVector . ( I9c300 )

Version 1.1.0-beta04

1 دسامبر 2021

androidx.compose.animation:animation:1.1.0-beta04 , androidx.compose.animation:animation-core:1.1.0-beta04 , and androidx.compose.animation:animation-graphics:1.1.0-beta04 are released. Version 1.1.0-beta04 contains these commits.

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

  • Updated to be compatible with Kotlin 1.6.0

Version 1.1.0-beta03

17 نوامبر 2021

androidx.compose.animation:animation:1.1.0-beta03 , androidx.compose.animation:animation-core:1.1.0-beta03 , and androidx.compose.animation:animation-graphics:1.1.0-beta03 are released. Version 1.1.0-beta03 contains these commits.

API Changes

  • Added new modifier Modifier.onPlaced to allow placement change to be observed. Additional changes to child modifier's offset can therefore be made based on the observed placement change. ( I558fd )
  • New support for contentKey in Crossfade. ContentKey will be used for equality check by animation system. Therefore custom diffing on states can be achieved via specifying appropriate contentKey for different states.

    ContentKey will also be used as the key for save & restore content. ( I2e055 , b/197907070 )

Version 1.1.0-beta02

3 نوامبر 2021

androidx.compose.animation:animation:1.1.0-beta02 , androidx.compose.animation:animation-core:1.1.0-beta02 , and androidx.compose.animation:animation-graphics:1.1.0-beta02 are released. Version 1.1.0-beta02 contains these commits.

Bug Fixes

  • New animation APIs for supporting tooling. Specifically, they allow tooling to inspect the animations & their configurations in a Transitions. ( I4116e )

Version 1.1.0-beta01

27 اکتبر 2021

androidx.compose.animation:animation:1.1.0-beta01 , androidx.compose.animation:animation-core:1.1.0-beta01 , and androidx.compose.animation:animation-graphics:1.1.0-beta01 are released. Version 1.1.0-beta01 contains these commits.

API Changes

  • New animation APIs for supporting tooling. Specifically, they allow tooling to inspect the animations & their configurations in a Transitions. ( I4116e )

Version 1.1.0-alpha06

13 اکتبر 2021

androidx.compose.animation:animation:1.1.0-alpha06 , androidx.compose.animation:animation-core:1.1.0-alpha06 , and androidx.compose.animation:animation-graphics:1.1.0-alpha06 are released. Version 1.1.0-alpha06 contains these commits.

Version 1.1.0-alpha05

29 سپتامبر 2021

androidx.compose.animation:animation:1.1.0-alpha05 , androidx.compose.animation:animation-core:1.1.0-alpha05 , and androidx.compose.animation:animation-graphics:1.1.0-alpha05 are released. Version 1.1.0-alpha05 contains these commits.

API Changes

  • EnterTransition , ExitTransition , and some of the AnimatedVisibility APIs have been made stable. MutableTransitionState.isIdle is also no longer experimental. ( I5072d )

  • Breaking change : lambdas in Enter/ExitTransition factories have been moved to the last position in the param list. ( I5072d )

Version 1.1.0-alpha04

15 سپتامبر 2021

androidx.compose.animation:animation:1.1.0-alpha04 , androidx.compose.animation:animation-core:1.1.0-alpha04 , and androidx.compose.animation:animation-graphics:1.1.0-alpha04 are released. Version 1.1.0-alpha04 contains these commits.

Version 1.1.0-alpha03

1 سپتامبر 2021

androidx.compose.animation:animation:1.1.0-alpha03 , androidx.compose.animation:animation-core:1.1.0-alpha03 , and androidx.compose.animation:animation-graphics:1.1.0-alpha03 are released. Version 1.1.0-alpha03 contains these commits.

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

  • Updated Compose 1.1.0-alpha03 to depend on Kotlin 1.5.30 . ( I74545 )

Version 1.1.0-alpha02

18 آگوست 2021

androidx.compose.animation:animation:1.1.0-alpha02 , androidx.compose.animation:animation-core:1.1.0-alpha02 , and androidx.compose.animation:animation-graphics:1.1.0-alpha02 are released. Version 1.1.0-alpha02 contains these commits.

API Changes

  • StartOffset is now supported in repeatable and infiniteRepeatable, as a way to delay the start time or fast forward the animation before the animation starts. This start offset will not be repeated ( Ic679f , b/195079908 )
  • New Enter/Exit transition for scale. It can be used in combination with other types of Enter/ExitTransitions. ( I372da , b/191325593 )

Version 1.1.0-alpha01

4 آگوست 2021

androidx.compose.animation:animation:1.1.0-alpha01 , androidx.compose.animation:animation-core:1.1.0-alpha01 , and androidx.compose.animation:animation-graphics:1.1.0-alpha01 are released. Version 1.1.0-alpha01 contains these commits.

API Changes

  • AnimatedImageVector and the related APIs are now in the new androidx.compose.animation:animation-graphics module. ( I60873 )

رفع اشکال

نسخه 1.0

Version 1.0.5

3 نوامبر 2021

androidx.compose.animation:animation:1.0.5 and androidx.compose.animation:animation-core:1.0.5 are released. Version 1.0.5 contains these commits.

Bug Fixes

  • Fixed a crash tracking derivedStateOf instances. ( aosp/1792247 )

Version 1.0.4

October 13, 2021

androidx.compose.animation:animation:1.0.4 and androidx.compose.animation:animation-core:1.0.4 are released. Version 1.0.4 contains these commits.

Dependency Updates

  • Updated to depend on Kotlin 1.5.31

Version 1.0.3

29 سپتامبر 2021

androidx.compose.animation:animation:1.0.3 and androidx.compose.animation:animation-core:1.0.3 are released. Version 1.0.3 contains these commits.

Dependency Updates

  • Updated to depend on Kotlin 1.5.30

نسخه 1.0.2

1 سپتامبر 2021

androidx.compose.animation:animation:1.0.2 and androidx.compose.animation:animation-core:1.0.2 are released. Version 1.0.2 contains these commits.

Updated to support the Compose 1.0.2 release. Compose 1.0.2 is still compatible with Kotlin 1.5.21 .

Version 1.0.1

4 آگوست 2021

androidx.compose.animation:animation:1.0.1 and androidx.compose.animation:animation-core:1.0.1 are released. Version 1.0.1 contains these commits.

Dependency Updates

  • Updated to depend on Kotlin 1.5.21 .

Version 1.0.0

28 ژوئیه 2021

androidx.compose.animation:animation:1.0.0 and androidx.compose.animation:animation-core:1.0.0 are released. Version 1.0.0 contains these commits.

Major features of 1.0.0

This is the first stable release of Compose. Please see the official Compose Release blog for more details!

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

  • If you are using Android Studio Bumblebee Canary 4 or AGP 7.1.0-alpha04 / 7.1.0-alpha05 , you may hit the following crash:

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

    To fix, temporarily increase your minSdkVersion to 24+ in your build.gradle file. This issue will be fixed in the next version of Android Studio Bumblebee and AGP 7.1 . ( b/194289155 )

Version 1.0.0-rc02

14 جولای 2021

androidx.compose.animation:animation:1.0.0-rc02 and androidx.compose.animation:animation-core:1.0.0-rc02 are released. Version 1.0.0-rc02 contains these commits.

Version 1.0.0-rc01

1 ژوئیه 2021

androidx.compose.animation:animation:1.0.0-rc01 and androidx.compose.animation:animation-core:1.0.0-rc01 are released. Version 1.0.0-rc01 contains these commits.

Bug Fixes

Version 1.0.0-beta09

June 16, 2021

androidx.compose.animation:animation:1.0.0-beta09 and androidx.compose.animation:animation-core:1.0.0-beta09 are released. Version 1.0.0-beta09 contains these commits.

API Changes

  • New AnimatedContent Composable. It manages its content change using customizable ContentTransform as new target content enters and initial content leaves. Different combination of enter and exit transitions can be used to produce a customized look and feel. As a part of the content transform, AnimatedContent automatically animates its size to match the incoming content. ( I2c3df )
  • Removed ManualFrameClock . If you need to control animations, use composeTestRule.mainClock instead. ( I3c3e8 , b/189951065 )

Added Profile Rules

This release adds profile rules to the following compose modules ( 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

What are profile rules?

  • Profile rules for a library are specified in a text file baseline-prof.txt located in the src/main or equivalent directory. The file specifies a rule per line, where a rule in this case is a pattern for matching to methods or classes in the library. The syntax for these rules is a superset of the human-readable ART profile format that is used when using adb shell profman --dump-classes-and-methods ... . These rules take one of two forms to target either methods or classes.

  • A method rule will have the following pattern:

    <FLAGS><CLASS_DESCRIPTOR>-><METHOD_SIGNATURE>
    
  • And a class rule will have the following pattern:

    <CLASS_DESCRIPTOR>
    
  • Here <FLAGS> is one or more of the characters H , S , and P to indicate whether or not this method should be flagged as "Hot", "Startup", or "Post Startup".

  • The <CLASS_DESCRIPTOR> is the descriptor for the class that the targeted method belongs to. For example, the class androidx.compose.runtime.SlotTable would have a descriptor of Landroidx/compose/runtime/SlotTable; .

  • The <METHOD_SIGNATURE> is the signature of the method, and includes the name, parameter types, and return types of the method. For example, the method fun isPlaced(): Boolean on LayoutNode has the signature isPlaced()Z .

  • These patterns can have wildcards ( ** , * , and ? ) in order to have a single rule encompass multiple methods or classes.

What do the rules do?

  • A method that has the flag H indicates that this method is a "hot" method, and should be compiled ahead of time.

  • A method that has the flag S indicates that it is a method which is called at startup, and should be compiled ahead of time to avoid the cost of compilation and interpreting the method at startup time.

  • A method that has the flag P indicates that it is a method which is called after startup.

  • A class that is present in this file indicates that it is used during startup and should be pre-allocated in the heap to avoid the cost of class loading.

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

  • Libraries can define these rules which will be packaged in AAR artifacts. When an app is then built which includes these artifacts, these rules are merged together and the merged rules are used to build a compact binary ART profile that is specific to the app. ART can then leverage this profile when the app is installed on devices in order to ahead-of-time compile a specific subset of the application to improve the performance of the application, especially the first run. Note that this will have no effect on debuggable applications.

Version 1.0.0-beta08

2 ژوئن 2021

androidx.compose.animation:animation:1.0.0-beta08 and androidx.compose.animation:animation-core:1.0.0-beta08 are released. Version 1.0.0-beta08 contains these commits.

Bug Fixes

  • Now detectDragGesures , detectVerticalGestures , and detectHorizontalGestures will consume the position change automatically, no need to call change.consumePositionChange in the onDrag callbacks ( I42fc4 , b/185096350 , b/187320697 )
  • Modifier.onGloballyPositioned() was changed to report the coordinates of this modifier in the modifier chain, not the layout coordinates after applying all the modifiers. This means that now the ordering of modifiers is affecting what coordinates would be reported. ( Ieb67d , b/177926591 )

Version 1.0.0-beta07

18 مه 2021

androidx.compose.animation:animation:1.0.0-beta07 and androidx.compose.animation:animation-core:1.0.0-beta07 are released. Version 1.0.0-beta07 contains these commits.

API Changes

  • New AnimatedVisibility API that support visibility to be specified in a MutableTransitionState . This also allows the animation states to be observed external to AnimatedVisibility via currentState and isIdle .
    • New child transition support in Transition
    • Support custom exit/enter transition animation in AnimatedVisibility using AnimationScope.transition
    • New animateEnterExit modifier accessible for all children of AnimatedVisibility
    • Deprecated the AnimatedVisibility APIs that take an initiallyVisible parameter ( I702f3 )

Version 1.0.0-beta06

5 مه 2021

androidx.compose.animation:animation:1.0.0-beta06 and androidx.compose.animation:animation-core:1.0.0-beta06 are released. Version 1.0.0-beta06 contains these commits.

Version 1.0.0-beta05

21 آوریل 2021

androidx.compose.animation:animation:1.0.0-beta05 and androidx.compose.animation:animation-core:1.0.0-beta05 are released. Version 1.0.0-beta05 contains these commits.

Bug Fixes

  • The AndroidManifest files from ui-test-manifest and ui-tooling-data are now compatible with Android 12 ( I6f9de , b/184718994 )

Version 1.0.0-beta04

7 آوریل 2021

androidx.compose.animation:animation:1.0.0-beta04 and androidx.compose.animation:animation-core:1.0.0-beta04 are released. Version 1.0.0-beta04 contains these commits.

API Changes

  • Public instances of RowScope , ColumnScope , BoxScope , BoxWithConstraintsScope were removed. ( I4e83e , b/181869067 )

Version 1.0.0-beta03

24 مارس 2021

androidx.compose.animation:animation:1.0.0-beta03 and androidx.compose.animation:animation-core:1.0.0-beta03 are released. Version 1.0.0-beta03 contains these commits.

Version 1.0.0-beta02

March 10, 2021

androidx.compose.animation:animation:1.0.0-beta02 and androidx.compose.animation:animation-core:1.0.0-beta02 are released. Version 1.0.0-beta02 contains these commits.

Bug Fixes

Version 1.0.0-beta01

24 فوریه 2021

androidx.compose.animation:animation:1.0.0-beta01 and androidx.compose.animation:animation-core:1.0.0-beta01 are released. Version 1.0.0-beta01 contains these commits.

This is the first release of Compose 1.0.0 Beta.

API Changes

  • InteractionState has been replaced with [Mutable]InteractionSource
    • Interfaces are responsible for emitting / collecting Interaction events.
    • Instead of passing interactionState = remember { InteractionState() } to components such as Button and Modifier.clickable() , use interactionSource = remember { MutableInteractionSource() } .
    • Instead of: Interaction.Pressed in interactionState you should instead use the extension functions on InteractionSource, such as InteractionSource.collectIsPressedAsState().
    • For complex use cases you can use InteractionSource.interactions to observe the stream of Interactions. See the InteractionSource documentation and samples for more information.
    • ( I85965 , b/152525426 , b/171913923 , b/171710801 , b/174852378 )
  • smoothScrollBy and scrollBy methods' packages changed to androidx.compose.foundation.gestures.* ( I3f7c1 , b/175294473 )
  • Size modifiers were renamed. Modifier.width/height/size were renamed to requiredWidth/requiredHeight/requiredSize. Modifier.preferredWidth/preferredHeight/preferredSize were renamed to width/height/size. ( I5b414 )
  • Orientation has been moved to foundation package. VelocirtTracker moved from ui.gesture to ui.input.pointer. ( Iff4a8 , b/175294473 )
  • AnimationClockObservable and subclasses have been removed. AnimatedFloat has been removed. ( Icde52 , b/177457083 )
  • Modifier.draggable now accepts DraggableState instead of a simple lambda. you can create state via rememberDraggableState { delta -> } to get the same behaviour as before ( Ica70f , b/175294473 )
  • animate, animatedValue, AnimatedValue APIs have been removed ( If27bc , b/177457083 )
  • AnimationEndReason.Interrupted is removed. CancellationException will be throws if animation is interrupted. ( I2cbbc , b/179695417 )
  • TargetAnimation API has been removed. ( If47d1 , b/177457083 )

Version 1.0.0-alpha12

10 فوریه 2021

androidx.compose.animation:animation:1.0.0-alpha12 and androidx.compose.animation:animation-core:1.0.0-alpha12 are released. Version 1.0.0-alpha12 contains these commits.

API Changes

  • Modifier.pointerInput now requires remember keys to indicate when the pointer input detection coroutine should restart for new dependencies. ( I849cd )
  • Bounds has been renamed to DpRect ( I4b32a )
  • Unified the param name for AnimationSpec to animationSpec across the animation system. Also constrain the Enter/ExitTransition to accept FiniteAnimationSpec. ( Ie47c5 , b/177457083 )
  • Animatable.snapTo and Animatable.stop are now suspend functions ( If4288 )
  • Similarly to how we previously removed state { 0 } composable and now promote usage like remember { mutableStateOf(0) } we are going to remove savedInstanceState { 0 } composable. You should use rememberSaveable { mutableStateOf(0) } instead and it will save and restore automatically if the type used inside the MutableState can be stored in the Bundle. If previously you were passing a custom saver object now you need to use a new overload of rememberSaveable which has stateSaver parameter. The usage will look like this: val holder = rememberSaveable(stateSaver = HolderSaver) { mutableStateOf(Holder(0)) } ( Ib4c26 , b/177338004 )
  • Updated Crossfade's method signature to be more consistent with the rest of the animation system. ( Ib05ed , b/177457083 )
  • rememberSavedInstanceState() was renamed to rememberSaveable() and moved to androidx.compose.runtime.saveable package. ( I1366e , b/177338004 )
  • RestorableStateHolder was renamed to SaveableStateHolder and moved to androidx.compose.runtime.saveable package. Inner method RestorableStateProvider was renamed to SaveableStateProvider. Generic type was removed so you can just pass Any as a key. Experimental annotation is not needed anymore. ( I0902e , b/174598702 )
  • Updated Modifier.animateContentSize API to be consistent with the rest of the animation system. ( I0bf75 , b/177457083 )
  • AnimatedValue/Float is now deprecated. Please use Animatable instead. ( I71345 , b/177457083 )
  • tapGestureFilter, doubleTapGestureFilter, longPressGestureFilter and pressIndicaitonGestureFilter have been deprecated. Use Modifier.clickable or Modifier.pointerInput with detectTapGestures function instead. ( I6baf9 , b/175294473 )
  • Introduced an InfiniteAnimationPolicy coroutine context element that will be applied in infinite animations. By default no policy is installed, except when running tests with ComposeTestRule . ( I50ec4 , b/151940543 )
  • Destructuring and copy() methods have been removed from several classes where they were rarely used. ( I26702 , b/178659281 )
  • Playtime in animation is now unfiied to nanoseconds ( If776a )
  • The compose:runtime-dispatch artifact is now deprecated. MonotonicFrameClock can now be found in compose:runtime and AndroidUiDispatcher can be found in compose:ui. ( Ib5c36 )
  • Added Animation.isInfinite and VectorizedAnimationSpec.isInfinite that signal if an animation is infinite or not. This can be used in implementations of animations to have special handling of such animations. For example, a special "time remaining" message can be shown, or during tests the animation can be cancelled to prevent waiting for idleness indefinitely. ( Iebb05 , b/151940543 )
  • Use Long instead of Uptime as animation time type ( Ie3aa7 , b/177420019 )

Version 1.0.0-alpha11

28 ژانویه 2021

androidx.compose.animation:animation:1.0.0-alpha11 and androidx.compose.animation:animation-core:1.0.0-alpha11 are released. Version 1.0.0-alpha11 contains these commits.

API Changes

  • TransitionDefinition-based Transition has been deprecated ( I0ac57 )
  • A label field is added for Transition and child animations to be displayed in tools ( I619fb )
  • animateAsState is now animateFooAsState, where Foo is the type of the variable being animated. eg Float, Dp, Offset, etc ( Ie7e25 )
  • New InfiniteTransition that runs any number of child animations. ( I1da81 )
  • Changes Material stateful parameter interfaces to have @Composable functions that return State<T> . Adds Animatable.asState() to make it easier to convert an Animatable to a State. Also changes animateElevation to be a suspend extension on Animatable. ( If613c )

Bug Fixes

  • onCommit, onDispose, and onActive have been deprecated in favor of SideEffect and DisposableEffect APIs ( If760e )
  • Initial State in updateTransition is now supported ( Ifd51d )
  • Content description parameter has been added to the Image and Icon. It is used to provide description to the accessibility services ( I2ac4c )
  • invalidate and compositionReference() are now deprecated in favor of currentRecomposeScope and rememberCompositionReference respectively. ( I583a8 )
  • Duration and Uptime will be replace with Long milliseconds, and this step removes the dependency of pointer input on those classes. ( Ia33b2 , b/175142755 , b/177420019 )
  • clickable, toggleable and selectable can be created outside of composition now ( I0a130 , b/172938345 , b/175294473 )
  • Easing has been changed to a functional interface ( Ib14e5 )
  • New items(count: Int) factory method for scope of LazyColumn/LazyRow/LazyVerticalGrid. items(items: List) and itemsIndexed(items: List) are now extension functions so you have to manually import them when used. New extension overloads for Arrays: items(items: Array) and itemsIndexed(Array) ( I803fc , b/175562574 )
  • Leverage TestCoroutineDispatcher in testing ( I532b6 )
  • Removed PointerInputData and modified PointerInputChange to give it all of PointerInputData's fields. Made PointerInputEvent and PointerInputEventData internal because they aren't used in any public API. ( Ifff97 , b/175142755 )

Version 1.0.0-alpha10

13 ژانویه 2021

androidx.compose.animation:animation:1.0.0-alpha10 and androidx.compose.animation:animation-core:1.0.0-alpha10 are released. Version 1.0.0-alpha10 contains these commits.

API Changes

  • Modified Velocity to have component parts and mathematical operations. ( Ib0447 )
  • Renamed @ExperimentalTesting to @ExperimentalTestApi to be consistent with similar experimental api annotations ( Ia4502 , b/171464963 )
  • Renamed Position to DpOffset and removed getDistance() ( Ib2dfd )
  • Removed Any.identityHashCode() public api ( I025d7 )

Bug Fixes

  • New coroutine-based API Animatable that ensures mutual exclusiveness among its animations. New DecayAnimationSpec to support multi-dimensional decay animation ( I820f2 , b/168014930 )
  • animate() is now replaced with animateAsState() , which returns a State<T> instead of T . This allows better performance, as the invalidation scope can be narrowed down to where the State value is read. ( Ib179e )

Version 1.0.0-alpha09

16 دسامبر 2020

androidx.compose.animation:animation:1.0.0-alpha09 and androidx.compose.animation:animation-core:1.0.0-alpha09 are released. Version 1.0.0-alpha09 contains these commits.

API Changes

  • Moved Dp.VectorConverter, Position.VectorConverter, etc to animation-core, and deprecated the old VectorConveters ( If0c4b )
  • Introduced a whole new set of Transition APIs with improved ease of use, and support for dynamically added animations, and dynamically calculated animation targets. This APIs are marked experimental for easy differentiation from the TransitionDefinition-based API. ( Ia7fe3 )

Bug Fixes

  • Lambdas in offset modifiers now return IntOffset rather than Float. ( Ic9ee5 , b/174137212 , b/174146755 )
  • Deprecate LazyColumnFor, LazyRowFor, LazyColumnForIndexed and LazyRowForIndexed. Use LazyColumn and LazyRow instead ( I5b48c )
  • For suspending pointer input APIs, renamed HandlePointerInputScope to AwaitPointerEventScope and handlePointerInput() to awaitPointerEventScope(). ( Idf0a1 , b/175142755 )
  • New infiniteRepeatable function for creating an InfiniteRepeatableSpec ( I668e5 )
  • Removed ExperimentalPointerInput annotation ( Ia7a24 )

Version 1.0.0-alpha08

2 دسامبر 2020

androidx.compose.animation:animation:1.0.0-alpha08 and androidx.compose.animation:animation-core:1.0.0-alpha08 are released. Version 1.0.0-alpha08 contains these commits.

API Changes

  • Added lint check for composable lambda parameter naming and position, to check for consistency with Compose guidelines. Also migrated some APIs using children as the name for their trailing lambda to content , according to the lint check and guidance. ( Iec48e )
  • Previously Deprecated APIs were removed:
    • Modifier.onPositioned was removed, use Modifier.onGloballyPositioned .
    • Modifier.onDraw was removed, use Modifier.onDrawBehind .
    • Modifier.plus was removed, use Modifier.then .
    • Color.Unset was removed, use Color.Unspecified .
    • PxBounds class was removed, use Rect instead.
    • ( Ie9d02 , b/172562222 )
  • Temporarily added option to let the TestAnimationClock be driven by the MonotonicFrameClock ( I1403b , b/173402197 )

Bug Fixes

  • Renamed Modifier.drawLayer to Modifier.graphicsLayer Also updated related classes to GraphicsLayer as per API council feedback. ( I0bd29 , b/173834241 )
  • Added Modifier.scale/rotate APIs as conveniences for drawLayer.
    • Renamed Modifier.drawOpacity to Modifier.alpha
    • Renamed Modifier.drawShadow to Modifier.shadow ( I264ca , b/173208140 )
  • Made PointerInputData's uptime and position fields non-nullable. ( Id468a )
  • offsetPx modifiers were renamed to offset. They are now taking lambda parameters instead of State. ( Ic3021 , b/173594846 )
  • New APIs for running animations in coroutines ( Ied662 )
  • Deprecated Ambients named with Ambient as their suffix, and replaced them with new properties prefixed with Ambient, following other Ambients and Compose API guidelines. ( I33440 )
  • Time control in tests (TestAnimationClock and its usages) is now experimental ( I6ef86 , b/171378521 )
  • Remove old ui-test module and its stubs ( I3a7cb )
  • RestorableStateHolder.withRestorableState function was renamed to RestorableStateProvider ( I66640 )
  • The Alignment interface was updated and made functional. ( I46a07 , b/172311734 )

Version 1.0.0-alpha07

11 نوامبر 2020

androidx.compose.animation:animation:1.0.0-alpha07 and androidx.compose.animation:animation-core:1.0.0-alpha07 are released. Version 1.0.0-alpha07 contains these commits.

Bug Fixes

  • The foundation AmbientTextStyle, ProvideTextStyle, and AmbientContentColor have been deprecated. Instead use the new versions available in the Material library. For non-Material applications, you should instead create your own design system specific theming ambients that can be consumed in your own components. ( I74acc , b/172067770 )
  • foundation.Text has been deprecated and replaced with material.Text. For a basic, unopinionated text API that does not consume values from a theme, see androidx.compose.foundation.BasicText. ( If64cb )
  • MeasureResult was moved out of MeasureScope. ( Ibf96d , b/171184002 )
  • Several layout related symbols were moved from androidx.compose.ui to androidx.compose.layout.ui. ( I0fa98 , b/170475424 )

Version 1.0.0-alpha06

28 اکتبر 2020

androidx.compose.animation:animation:1.0.0-alpha06 and androidx.compose.animation:animation-core:1.0.0-alpha06 are released. Version 1.0.0-alpha06 contains these commits.

API Changes

  • Enable transitions in ComposeTestRule; remove option to enable the blinking cursor from ComposeTestRule. ( If0de3 )

Version 1.0.0-alpha05

14 اکتبر 2020

androidx.compose.animation:animation:1.0.0-alpha05 and androidx.compose.animation:animation-core:1.0.0-alpha05 are released. Version 1.0.0-alpha05 contains these commits.

API Changes

  • New Animation interface and subclasses: These classes store the start and end conditions for animations, and therefore allow value and velocity to be queried via only playtime ( Ie95bd , b/163329867 )

Bug Fixes

  • OnPositionedModifier is renamed to OnGloballyPositionedModifier and onPositioned() is renamed to onGloballyPositioned(). ( I587e8 , b/169083903 )
  • Deprecates contentColor() and currentTextStyle() APIs, and replaces them with AmbientContentColor and AmbientTextStyle ambients respectively. You can access the current value by using .current on the ambient property, as with any other ambient. This was change was made for consistency and to avoid having multiple ways to accomplish the same thing. Additionally renames some ambient properties to better describe their purpose as follows:

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

Version 1.0.0-alpha04

1 اکتبر 2020

androidx.compose.animation:animation:1.0.0-alpha04 and androidx.compose.animation:animation-core:1.0.0-alpha04 are released. Version 1.0.0-alpha04 contains these commits.

API Changes

  • Annotated rootAnimationClockFactory, transitionsEnabled, blinkingCursorEnabled and textInputServiceFactory with @VisibleForTesting, make them internal API and hide their kdoc ( I554eb , b/168308412 )

رفع اشکال

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

Version 1.0.0-alpha03

16 سپتامبر 2020

androidx.compose.animation:animation:1.0.0-alpha03 and androidx.compose.animation:animation-core:1.0.0-alpha03 are released. Version 1.0.0-alpha03 contains these commits.

Bug Fixes

  • Usages of gravity were consistently renamed to align or alignment in layout APIs. ( I2421a , b/164077038 )

Version 1.0.0-alpha02

2 سپتامبر 2020

androidx.compose.animation:animation:1.0.0-alpha02 and androidx.compose.animation:animation-core:1.0.0-alpha02 are released. Version 1.0.0-alpha02 contains these commits.

API Changes

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

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

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

    ( I0a85b , b/161247083 )

Bug Fixes

  • onPreCommit is deprecated; onCommit now has onPreCommit's behavior.

    onCommit and onActive now run in the same choreographer frame that the composition changes committed in rather than at the beginning of the next choreographer frame. ( I70403 )

Version 1.0.0-alpha01

26 آگوست 2020

androidx.compose.animation:animation:1.0.0-alpha01 and androidx.compose.animation:animation-core:1.0.0-alpha01 are released. Version 1.0.0-alpha01 contains these commits.

Version 0.1.0-dev

Version 0.1.0-dev17

August 19, 2020

androidx.compose.animation:animation:0.1.0-dev17 and androidx.compose.animation:animation-core:0.1.0-dev17 are released. Version 0.1.0-dev17 contains these commits.

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

API Changes

  • Offset has become an inline class ( Iaec70 )
  • IntOffset is now an inline class ( Iac0bf )
  • IntSize is now an inline class ( I2bf42 )
  • AnimatedVisibilty composable animates the appearance and disappearance of the child content.

    EnterTransition and ExitTransition are introduced to work with AnimatedVisibilty composable to provide 3 different typs of appearance and disappearance animation: fade, slide, and expand/shrink the content. The different types of animations can be combined to achieve more bespoke look and feel. ( Idda11 )

  • Deprecated PxBounds in favor of Rect. Updated all usages of PxBounds with rect and added proper deprecate/replace with annotations to assist with the migration. ( I37038 , b/162627058 )

Bug Fixes

  • PlacementScope.placeAbsolute() was renamed to PlacementScope.place() , and the previous PlacementScope.place() was renamed to PlacementScope.placeRelative() . As a result, the PlacementScope.place() method will not automatically mirror the position in right-to-left contexts anymore. If this is desired, use PlacementScope.placeRelative() instead. ( I873ac , b/162916675 )
  • The state { ... } composable is now deprecated in favor of explicit calls to remember { mutableStateOf(...) } for clarity. This reduces the overall API surface and number of concepts for state management, and matches the by mutableStateOf() pattern for class property delegation. ( Ia5727 )

Version 0.1.0-dev16

5 آگوست 2020

androidx.compose.animation:animation:0.1.0-dev16 and androidx.compose.animation:animation-core:0.1.0-dev16 are released. Version 0.1.0-dev16 contains these commits.

API Changes

  • Built-in vector converters to convert built-in units are now accessible via Foo.VectorConverter . eg Dp.VectorConverter , Color.VectorConverter , Float.VectorConverter , etc ( I3e273 )
  • Support end listener in Modifier.animateContentSize() such that when size change animation finishes, the listener will be notified, along with start/end size of the animation. ( I277b2 )
  • New animateContentSize modifier that animates the layout size change of its child modifier ( Ieffdc )
  • Added MonotonicFrameAnimationClock that enables you to use a MonotonicFrameClock as an AnimationClockObservable to bridge the gap between the new coroutines based clocks and APIs that still use the old callback based clocks.

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

Bug Fixes

  • The APIs for right-to-left support has been updated. LayoutDirectionAmbient has been added, which can be used to read and change the layout direction. Modifier.rtl and Modifier.ltr have been removed. ( I080b3 )
  • Require type T to be explicitly specified for transitionDefinition. ( I1aded )
  • foundation.shape.corner package were flatten to foundation.share ( I46491 , b/161887429 )
  • Modifier.plus has been deprecated, use Modifier.then instead. 'Then' has a stronger signal of ordering, while also prohibits to type Modifier.padding().background() + anotherModifier , which breaks the chain and harder to read ( Iedd58 , b/161529964 )
  • Modifier.drawBackground has been renamed to Modifier.background ( I13677 )

Version 0.1.0-dev15

22 جولای 2020

androidx.compose.animation:animation:0.1.0-dev15 and androidx.compose.animation:animation-core:0.1.0-dev15 are released. Version 0.1.0-dev15 contains these commits.

Dependencies Update

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

API Changes

  • Transition API has been changed to return a TransitionState instead of passing the TransitionState to children. This makes the API more consistent with animate() APIs. ( I24e38 )
  • Modifier parameter added for Crossfade ( I87cfe , b/159706180 )
  • Use AnimationSpec instead of AnimationBuilder in the top level APIs to clarify the concept of static animation specification
    • Improve the transition DSL by removing the lambda requirement for creating AnimationSpecs such as tween, spring. They instead take constructor params directly.
    • Improve the overall ease of use of AnimationSpec opening up constructors instead of relying on builders
    • Change the duration and delay for KeyFrames and Tween to Int. This eliminates unnecessary type casts and method overloading (for supporting both Long and Int). ( Ica0b4 )
  • Replaced usage of IntPx with Int. Replaced IntPxPosition with IntOffset. Replaced IntPxSize with IntSize. ( Ib7b44 )
  • In order to consolidate the number of classes used to represent sizing information, standardize on usage of the Size class instead of PxSize. This provides the benefits of an inline class to leverage a long to pack 2 float values to represent width and height represented as floats. ( Ic0191 )
  • In order to consolidate the number of classes used to represent positioning information, standardize on usage of the Offset class instead of PxPosition. This provides the benefits of an inline class to leverage a long to pack 2 float values to represent x and y offsets represented as floats. ( I3ad98 )
  • Replaced usage of Px class in various compose classes as part of the large refactoring effort to only rely on Dp and primitive types for pixel parameters ( I086f4 )
  • Added animate() support for Dp, Px, Size, Position, Bounds, PxPosition, PxSize, PxBounds, IntPx, IntPxSize, IntPxPosition, IntPxBounds, and AnimationVector ( Ib7518 )
  • Crossfade now accepts optional AnimationBuilder param to allow configuring the animation ( I6d6e0 )
  • Replaced all nullable Color uses in API with non-nullable and use Color.Unset instead of null ( Iabaa7 )
  • Removed ValueHolder class. Restructured AnimatedValue, AnimatedFloat classes to make the animation value field abstract so that subclasses can watch the value update.
    • Added model classes for AnimatedValue, AnimatedFloat, etc.
    • Added a new set of light-weight @Composable API for animating between values. ( I79530 )
  • Breaking changes to the ambients API. See log and Ambient<T> documentation for details ( I4c7ee , b/143769776 )
  • New repeat mode: Reverse. This mode reverses the previous iteration as the animation repeats in RepeatableSpec or VectorizedRepeatableSpec. ( Ibe0f5 )
  • API additions to ManualAnimationClock: hasObservers: Boolean and constructor parameter dispatchOnSubscribe: Boolean ( Iaa134 )
  • Added APIs for getting min/max bounds in AnimatedFloat ( Icd9cc )

Bug Fixes

  • runOnIdleCompose renamed to runOnIdle ( I83607 )
  • Several testing APIs were renamed to be more intuitive. All findXYZ APIs were renamed to onNodeXYZ. All doXYZ APIs were renamed to performXYZ. ( I7f164 )
  • Introduced low level stateless animation APIs. These APIs ( I63bf7 )
  • The Recompose composable is no longer a useful abstraction. Most recomposition should happen as a result of MutableState assignments. For anything beyond that, it is recommended that you use the invalidate function to trigger a recomposition of the current scope. ( Ifc992 )
  • Replaced usage of Px class in various compose classes as part of the large refactoring effort to only rely on Dp and primitive types for pixel parameters. Deleted Px class in its entirety ( I3ff33 )
  • Replaced usage of Px class in various compose classes as part of the large refactoring effort to only rely on Dp and primitive types for pixel parameters ( Id3434 )
  • Crossfade can now work with null as initial value ( Iad6a4 , b/155947711 )
  • Replaced usage of Px class in various compose classes as part of the large refactoring effort to only rely on Dp and primitive types for pixel parameters ( I19d02 )
  • Consolidated CanvasScope implementations so there is now just DrawScope and ContentDrawScope Renamed CanvasScope to DrawScope. Updated DrawScope to implement Density interface and provide LayoutDirection Deleted DrawScope subclass in ContentDrawScope Painter and PainterModifier have been updated to no longer maintain an RTL property themselves as DrawScope provides this already without manually providing it ( I1798e )
  • Updated higher level compose APIs that expose a Canvas to expose CanvasScope instead. This removes the need for consumers to maintain their own Paint objects. For consumers that still require access to a Canvas they can use the drawCanvas extension method which provides a callback to issue drawing commands with the underlying Canvas. ( I80afd )
  • Added verticalGravity and horizontalGravity parameters to Row and Column, respectively. ( I7dc5a )
  • ui-text module is renamed as ui-text-core ( I57dec )
  • Improve DrawModifier API:
    • Made the receiver scope for draw() ContentDrawScope
    • Removed all parameters on draw()
    • DrawScope has same interface as former CanvasScope
    • ContentDrawScope has drawContent() method ( Ibaced , b/152919067 )
  • runOnIdleCompose and runOnUiThread are now global functions instead of methods on ComposeTestRule. ( Icbe8f )
  • [Mutable]State property delegate operators moved to extensions to support Kotlin 1.4 property delegate optimizations. Callers must add imports to continue using by state { ... } or by mutableStateOf(...) . ( I5312c )
  • ColoredRect has been deprecated. Use Box(Modifier.preferredSize(width, height).drawBackground(color)) instead. ( I499fa , b/152753731 )
  • Replaced Modifier plus operator with factory extension functions ( I225e4 )
  • Deprecated Center composable. It should be replaced either with the LayoutSize.Fill + LayoutAlign.Center modifier, or with one of the Box or Stack composables with suitable modifiers applied ( Idf5e0 )
  • Renamed LayoutFlexible to LayoutWeight. Renamed tight parameter to fill. ( If4738 )
  • The Opacity composable function has been replaced with the drawOpacity modifier. ( I5fb62 )
  • Tests using AndroidComposeTestRule now provide an animation clock at the root of the composition that allows it to be paused, resumed and advanced manually. ( Id54c5 )
  • Support right-to-left direction in LayoutPadding modifier ( I9e8da )
  • Density and DensityScope were merged into one interface. Instead of ambientDensity() you can now use DensityAmbient.current. Instead of withDensity(density) just with(density) ( I11cb1 )
  • Added copy methods to various inline class types including:
    • افست
    • اندازه
    • شعاع
    • حرکت
    • TransformOrigin
    • Deprecated Size.copy companion object method favor of instance copy method ( Ife290 , b/159905651 )
  • androidx.compose.ViewComposer has been moved to androidx.ui.node.UiComposer androidx.compose.Emittable has been removed. It was redundant with ComponentNode. androidx.compose.ViewAdapters has been removed. They are no longer a supported use case. Compose.composeInto has been deprecated. Use setContent or setViewContent instead. Compose.disposeComposition has been deprecated. Use the dispose method on the Composition returned by setContent instead. androidx.compose.Compose.subcomposeInto has moved to androidx.ui.core.subcomposeInto ComponentNode#emitInsertAt has been renamed to ComponentNode#insertAt ComponentNode#emitRemoveAt has been renamed to ComponentNode#removeAt ComponentNode#emitMode has been renamed to ComponentNode#move ( Idef00 )