Создание анимации

Создавайте анимации в их приложениях Jetpack Compose, чтобы улучшить пользовательский опыт.
Последнее обновление Стабильный релиз Предварительная версия для выпуска Бета-версия Альфа-версия
17 декабря 2025 г. 1.10.0 - - 1.11.0-alpha02

Структура

Compose представляет собой комбинацию из 7 идентификаторов групп Maven в рамках androidx . Каждая группа содержит целевой набор функций, каждый со своим набором примечаний к выпуску.

В этой таблице поясняются группы и приводятся ссылки на каждый набор примечаний к выпуску.

Группа Описание
compose.animation Создавайте анимации в их приложениях Jetpack Compose, чтобы улучшить пользовательский опыт.
compose.compiler Преобразуйте функции с аннотацией @Composable и включите оптимизацию с помощью плагина компилятора Kotlin.
compose.foundation Создавайте приложения Jetpack Compose, используя готовые к применению строительные блоки, и расширяйте их функциональность для создания собственных элементов дизайн-системы.
compose.material Создавайте пользовательские интерфейсы Jetpack Compose с помощью готовых компонентов Material Design. Это более продвинутый уровень Compose, предназначенный для предоставления компонентов, соответствующих описанию на сайте www.material.io.
compose.material3 Создавайте пользовательские интерфейсы Jetpack Compose с помощью компонентов Material Design 3 — следующей эволюции Material Design. Material 3 включает в себя обновленные темы оформления и компоненты, а также функции персонализации Material You, такие как динамический цвет, и разработан таким образом, чтобы гармонично сочетаться с новым визуальным стилем Android 12 и системным интерфейсом.
compose.runtime Основные компоненты программной модели Compose и системы управления состоянием, а также основная среда выполнения, на которую ориентирован плагин компилятора Compose.
compose.ui Основные компоненты Compose UI, необходимые для взаимодействия с устройством, включают в себя компоновку, отрисовку и ввод данных.

Объявление зависимостей

Чтобы добавить зависимость от Compose, необходимо добавить репозиторий Google Maven в ваш проект. Для получения дополнительной информации ознакомьтесь с информацией в репозитории Google Maven .

Добавьте зависимости для необходимых артефактов в файл build.gradle вашего приложения или модуля:

классный

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

android {
    buildFeatures {
        compose true
    }

    composeOptions {
        kotlinCompilerExtensionVersion = "1.5.15"
    }

    kotlinOptions {
        jvmTarget = "1.8"
    }
}

Котлин

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

android {
    buildFeatures {
        compose = true
    }

    composeOptions {
        kotlinCompilerExtensionVersion = "1.5.15"
    }

    kotlinOptions {
        jvmTarget = "1.8"
    }
}

Для получения дополнительной информации о зависимостях см. раздел «Добавление зависимостей сборки» .

Обратная связь

Ваши отзывы помогают улучшить Jetpack. Сообщите нам, если вы обнаружите новые проблемы или у вас есть идеи по улучшению этой библиотеки. Пожалуйста, ознакомьтесь с существующими проблемами в этой библиотеке, прежде чем создавать новую. Вы можете проголосовать за существующую проблему, нажав кнопку со звездочкой.

Создать новую задачу

Для получения более подробной информации см. документацию по системе отслеживания ошибок .

Версия 1.11

Версия 1.11.0-alpha02

17 декабря 2025 г.

Выпущена версия androidx.compose.animation:animation-*:1.11.0-alpha02 . Версия 1.11.0-alpha02 содержит следующие коммиты .

Версия 1.11.0-alpha01

3 декабря 2025 г.

Выпущена версия androidx.compose.animation:animation-*:1.11.0-alpha01 . Версия 1.11.0-alpha01 содержит следующие коммиты .

Исправлены ошибки

  • Получайте позицию для sharedElements только в том случае, если к ним прикреплен SharedTransitionLayout ( I2a035 ).

Версия 1.10

Версия 1.10.0

3 декабря 2025 г.

Выпущена версия androidx.compose.animation:animation-*:1.10.0 . Версия 1.10.0 содержит следующие изменения . Важные изменения по сравнению с версией 1.9.0:

  • В версии 1.10 API для общих переходов остаются стабильными.
  • Новый API Modifier.skipToLookaheadPosition для макетов в SharedTransitionScope , позволяющий переходить к целевой позиции вместо анимации изменения позиции ( 9a88f4 )
  • Поддержка динамического включения/отключения общих элементов ( 07680e )
  • Новый API для поддержки начальной скорости при инициировании перехода между общими элементами с помощью fling ( b0afe2 )
  • Новые EnterTransition и ExitTransition для анимации слоя-вуали для AnimatedVisibility и AnimatedContent ( 0f6e7c )

Версия 1.10.0-rc01

19 ноября 2025 г.

Выпущена версия androidx.compose.animation:animation-*:1.10.0-rc01 . Версия 1.10.0-rc01 содержит следующие коммиты .

Изменения в API

  • Теперь для EnterExitTransitions доступны параметры unveilIn и veilOut . Это позволяет анимировать наложение слоя перед входящим или выходящим контентом. ( If26fe )

Исправлены ошибки

  • Поддержка отслеживания границ путем отсоединения и повторного присоединения sharedElement ( be0e9e )
  • Сделайте карту общих элементов наблюдаемой для отслеживания активности переходов. ( 1fc2ec )

Версия 1.10.0-beta02

5 ноября 2025 г.

Выпущена версия androidx.compose.animation:animation-*:1.10.0-beta02 . Версия 1.10.0-beta02 содержит следующие коммиты .

Версия 1.10.0-beta01

22 октября 2025 г.

Выпущена версия androidx.compose.animation:animation-*:1.10.0-beta01 . Версия 1.10.0-beta01 содержит следующие коммиты .

Изменения в API

  • Фабричный метод SharedContentConfig , принимающий лямбда-функцию, указывающую, следует ли включать общий элемент, был удален. API lookheadScopeCoordinates был обновлен: областью действия получателя является LookaheadScope , а параметром — координаты источника. ( Id1fc2 , b/452416806 )
  • Интерфейс BoundsTransform был обновлен для обеспечения согласованности с SizeTransform . ( Ia46f2 , b/343696350 )
  • Устаревший API ScaleToBounds удален. Пожалуйста, используйте вместо него scaleToBounds . ( I17296 )

Версия 1.10.0-alpha05

8 октября 2025 г.

Выпущена версия androidx.compose.animation:animation-*:1.10.0-alpha05 . Версия 1.10.0-alpha05 содержит следующие коммиты .

Изменения в API

Версия 1.10.0-alpha04

24 сентября 2025 г.

Выпущена версия androidx.compose.animation:animation-*:1.10.0-alpha04 . Версия 1.10.0-alpha04 содержит следующие коммиты .

Изменения в API

  • Обновлено именование API, связанных с PlaceHolderSize . ( I037d8 , b/343696350 )
  • Новый API для перехода между общими элементами, поддерживающий начальную скорость для продолжения скорости жеста в общих элементах. ( I91be9 )

Версия 1.10.0-alpha03

10 сентября 2025 г.

Выпущена версия androidx.compose.animation:animation-*:1.10.0-alpha03 . Версия 1.10.0-alpha03 содержит следующие коммиты .

Изменения в API

  • Modifier.skipToLookaheadSize теперь использует лямбда-функцию с включенным по умолчанию параметром, которая активирует пропуск размера только при активном общем переходе, аналогично Modifier.skipToLookaheadPosition . ( Ibe0f5 , b/432485585 )

Версия 1.10.0-alpha02

27 августа 2025 г.

Выпущена версия androidx.compose.animation:animation-*:1.10.0-alpha02 . Версия 1.10.0-alpha02 содержит следующие коммиты .

Версия 1.10.0-alpha01

13 августа 2025 г.

Выпущена версия androidx.compose.animation:animation-*:1.10.0-alpha01 . Версия 1.10.0-alpha01 содержит следующие коммиты .

Новые функции

  • Новый API позволяет динамически включать и отключать общие элементы, а также учитывать, происходит ли уже переход между общими элементами.
  • Новый API для установки альтернативных целевых границ при удалении целевого общего элемента во время перехода.
  • Новый API для получения LayoutCoordinates объекта LookaheadScope . ( I18dd4 , b/409819304 , b/395670637 )
  • Новый модификатор Modifier.skipToLookaheadPosition в SharedTransitionScope для привязки макета к целевой позиции во время общего перехода. ( I88734 )

Изменения в API

  • Упрощен renderInSharedTransitionOverlay путем удаления лямбда-функции clipInOverlayDuringTransition , поскольку она использовалась редко. Введен новый фабричный метод для SharedContentConfig ( Id01b2 ).
  • Добавлен набор значений по умолчанию для конфигураций shared element, shared bounds и renderInSharedTransitionOverlay . Эти значения по умолчанию теперь доступны через общедоступные API. ( Id23cc )
  • ScaleToBounds ResizeMode был переименован в scaleToBounds ( I5ac50 ).

Исправлены ошибки

Версия 1.9

Версия 1.9.5

19 ноября 2025 г.

Выпущена версия androidx.compose.animation:animation-*:1.9.5 . Версия 1.9.5 содержит следующие коммиты .

Версия 1.9.4

22 октября 2025 г.

Выпущена версия androidx.compose.animation:animation-*:1.9.4 . Версия 1.9.4 содержит следующие коммиты .

Версия 1.9.3

8 октября 2025 г.

Выпущена версия androidx.compose.animation:animation-*:1.9.3 . Версия 1.9.3 содержит следующие коммиты .

Версия 1.9.2

24 сентября 2025 г.

Выпущена версия androidx.compose.animation:animation-*:1.9.2 . Версия 1.9.2 содержит следующие коммиты .

Версия 1.9.1

10 сентября 2025 г.

Выпущена версия androidx.compose.animation:animation-*:1.9.1 . Версия 1.9.1 содержит следующие коммиты .

Исправлены ошибки

  • Исправлена ​​ошибка инициализации анимации для sharedElementWithCallerManagedVisibility . ( fa29de )

Версия 1.9.0

13 августа 2025 г.

Выпущена версия androidx.compose.animation:animation-*:1.9.0 . Версия 1.9.0 содержит следующие коммиты .

Версия 1.9.0-rc01

30 июля 2025 г.

Выпущена версия androidx.compose.animation:animation-*:1.9.0-rc01 . Версия 1.9.0-rc01 содержит следующие коммиты .

Версия 1.9.0-beta03

16 июля 2025 г.

Выпущена версия androidx.compose.animation:animation-*:1.9.0-beta03 . Версия 1.9.0-beta03 содержит следующие коммиты .

Версия 1.9.0-beta02

2 июля 2025 г.

Выпущена версия androidx.compose.animation:animation-*:1.9.0-beta02 . Версия 1.9.0-beta02 содержит следующие коммиты .

Версия 1.9.0-beta01

18 июня 2025 г.

Выпущена версия androidx.compose.animation:animation-*:1.9.0-beta01 . Версия 1.9.0-beta01 содержит следующие коммиты .

Версия 1.9.0-alpha04

4 июня 2025 г.

Выпущена версия androidx.compose.animation:animation-*:1.9.0-alpha04 . Версия 1.9.0-alpha04 содержит следующие коммиты .

Версия 1.9.0-alpha03

20 мая 2025 г.

Выпущена версия androidx.compose.animation:animation-*:1.9.0-alpha03 . Версия 1.9.0-alpha03 содержит следующие коммиты .

Версия 1.9.0-alpha02

7 мая 2025 г.

Выпущена версия androidx.compose.animation:animation-*:1.9.0-alpha02 . Версия 1.9.0-alpha02 содержит следующие коммиты .

Новые функции

  • Значительно улучшена поддержка прокрутки или перетаскивания общих элементов. В частности, при прокрутке переходящегося общего элемента дельта прокрутки будет применяться непосредственно к общему элементу, а не заставлять общие элементы следовать за новой целью. ( cacf7b )

Версия 1.9.0-alpha01

23 апреля 2025 г.

Выпущена версия androidx.compose.animation:animation-*:1.9.0-alpha01 . Версия 1.9.0-alpha01 содержит следующие коммиты .

Изменения в поведении

  • Для корректной проверки синтаксиса, поставляемой с Compose, теперь требуется минимальная версия AGP 8.8.2. Если вы не можете обновить AGP, вы можете обновить Lint самостоятельно, используя android.experimental.lint.version=8.8.2 (или более новую версию) в файле gradle.properties . Для запуска проверок синтаксиса Compose внутри IDE требуется Android Studio Ladybug или более поздняя версия.

Новые функции

  • Улучшена производительность прокрутки для общих элементов ( ea4f1f )

Изменения в API

  • Для использования проектов, выпущенных с Kotlin 2.0, требуется KGP 2.0.0 или более поздняя версия. ( Idb6b5 )
  • TabRow и ScrollableTabRow устарели, вместо них используются варианты Primary и Secondary. Вкладки Primary и Secondary более производительны и соответствуют спецификации. ( I918e2 )
  • Добавлена ​​локальная композиция LocalResources для запроса ресурсов. Вызов LocalResources.current приведет к перекомпозиции при изменении конфигурации, поэтому вызовы API, таких как stringResource() будут возвращать обновленные значения ( I50c13 , b/274786917 ).

Исправлены ошибки

  • Убедитесь, что общие элементы удалены из наложения после завершения перехода ( 35f359 )
  • Устранить лишнюю рекомпозицию в переходе ( 988923 )
  • Исправлена ​​обработка прерывания перехода дочернего процесса ( 8aed52 )
  • Убедитесь, что переход сбрасывается при предоставлении нового TransitionState ( 57820a )

Внешний вклад

  • Начиная с Compose 1.8.1 : Завершение анимации в SeekableTransitionState , если она уже прошла за пределы новой продолжительности, согласно Стивену Шёну. ( 0c832c )

Версия 1.8

Версия 1.8.3

18 июня 2025 г.

Выпущена версия androidx.compose.animation:animation-*:1.8.3 . Версия 1.8.3 содержит следующие коммиты .

Версия 1.8.2

20 мая 2025 г.

Выпущена версия androidx.compose.animation:animation-*:1.8.2 . Версия 1.8.2 содержит следующие коммиты .

Версия 1.8.1

7 мая 2025 г.

Выпущена версия androidx.compose.animation:animation-*:1.8.1 . Версия 1.8.1 содержит следующие коммиты .

Внешний вклад

  • Завершение анимации в SeekableTransitionState , если она уже прошла за пределы новой продолжительности. Спасибо Стивену Шёну! ( fbcdf7 )

Версия 1.8.0

23 апреля 2025 г.

Выпущена версия androidx.compose.animation:animation-*:1.8.0 . Версия 1.8.0 содержит следующие коммиты .

Важные изменения по сравнению с версией 1.7.0

  • Важные изменения в версии 1.8.0 описаны в этой статье блога.
  • Новый API Modifier.animateBounds для анимации изменений размера и положения в пределах области видимости. ( 94b939 )
  • Завершены API для ключевых кадров с дугами и сплайнами ( 89e119 )
  • Поддерживается опережающий просмотр в LazyGrid и Pager. Это включает в себя разграничение этапов опережающего просмотра и подготовительного просмотра при прокрутке, композиции/удалении элементов и анимации элементов, а также использование этапа опережающего просмотра в качестве источника достоверной информации для прокрутки и целевого объекта анимации элементов.
  • Обновлено именование параметра sharedElement с state на sharedContentState для обеспечения согласованности между API общих элементов. ( 9e7df5 )
  • Набор API-интерфейсов AnimatedImageVector теперь стабилен.( 69d7e0 )

Версия 1.8.0-rc03

9 апреля 2025 г.

Выпущена версия androidx.compose.animation:animation-*:1.8.0-rc03 . Версия 1.8.0-rc03 содержит следующие коммиты .

Версия 1.8.0-rc02

26 марта 2025 г.

Выпущена версия androidx.compose.animation:animation-*:1.8.0-rc02 . Версия 1.8.0-rc02 содержит следующие коммиты .

Версия 1.8.0-rc01

12 марта 2025 г.

Выпущена версия androidx.compose.animation:animation-*:1.8.0-rc01 . Версия 1.8.0-rc01 содержит следующие коммиты .

Исправлены ошибки

  • Исправлена ​​ошибка, из-за которой дочерний переход некорректно помечался как прерванный. ( 3fa2ce )

Версия 1.8.0-beta03

26 февраля 2025 г.

Выпущена версия androidx.compose.animation:animation-*:1.8.0-beta03 . Версия 1.8.0-beta03 содержит следующие коммиты .

Версия 1.8.0-beta02

12 февраля 2025 г.

Выпущена версия androidx.compose.animation:animation-*:1.8.0-beta02 . Версия 1.8.0-beta02 содержит следующие коммиты .

Версия 1.8.0-beta01

29 января 2025 г.

Выпущена версия androidx.compose.animation:animation-*:1.8.0-beta01 . Версия 1.8.0-beta01 содержит следующие коммиты .

Версия 1.8.0-alpha08

15 января 2025 г.

Выпущена версия androidx.compose.animation:animation-*:1.8.0-alpha08 . Версия 1.8.0-alpha08 содержит следующие коммиты .

Исправлены ошибки

  • Исправлена ​​некорректная анимация размещения из animateBounds в LazyGrid из-за сброса MotionFrameOfReferencePlacement . ( 16193b )
  • Исправлен встроенный запрос в SharedTransitionLayout путем перенаправления встроенного запроса на опережающий проход из корневого элемента опережающего просмотра верхнего уровня. ( a07d12 )
  • Добавлены отсутствующие теги @param в документации. ( e5cf67 )

Версия 1.8.0-alpha07

11 декабря 2024 г.

Выпущена версия androidx.compose.animation:animation-*:1.8.0-alpha07 . Версия 1.8.0-alpha07 содержит следующие коммиты .

Новые функции

  • Поддерживает функцию предварительного просмотра в Pager, различая этап предварительного просмотра и этап приближения для сохранения элементов и обработки прокрутки. ( b/371802474 )

Исправлены ошибки

  • Исправлена ​​редкая ошибка, приводящая к сбою, когда общий элемент компонуется, но никогда не измеряется/не размещается, путем требования, чтобы общий элемент был отрисован на месте хотя бы один раз, прежде чем отобразить его в режиме наложения. ( b/371802474 )

Версия 1.8.0-alpha06

13 ноября 2024 г.

Выпущена версия androidx.compose.animation:animation-*:1.8.0-alpha06 . Версия 1.8.0-alpha06 содержит следующие коммиты .

Изменения в API

  • Обновлено именование параметра sharedElement с state на sharedContentState для обеспечения согласованности между API общих элементов. ( I5694c , b/375351468 )
  • Набор API-интерфейсов AnimatedImageVector теперь стабилен. ( I7174b , b/261436267 )

Версия 1.8.0-alpha05

30 октября 2024 г.

Выпущена версия androidx.compose.animation:animation-*:1.8.0-alpha05 . Версия 1.8.0-alpha05 содержит следующие коммиты .

Новые функции

  • В LazyGrid теперь поддерживается опережающий просмотр. Это включает в себя разграничение этапов опережающего просмотра и предварительного просмотра при прокрутке, композиции/удалении элементов и анимации элементов, а также использование этапа опережающего просмотра в качестве источника достоверной информации для прокрутки и целевого объекта анимации элементов.

Исправлены ошибки

  • При повторном создании перехода обновляйте внутренние состояния преобразования размера AnimatedContent . Это гарантирует, что информация о целевом размере всегда будет актуальной. ( b/372512085 )

Версия 1.8.0-alpha04

16 октября 2024 г.

Выпущена версия androidx.compose.animation:animation-*:1.8.0-alpha04 . Версия 1.8.0-alpha04 содержит следующие коммиты .

Исправлены ошибки

  • Исправлена ​​ошибка, из-за которой некоторые кривые сглаживания зависали на определенных временных интервалах.
  • Исправлена ​​ошибка, вызывавшая неправильное выравнивание Modifier.animateContentSize при RTL (направление текста справа налево). ( Idae6b , b/372055503 )

Версия 1.8.0-alpha03

2 октября 2024 г.

Выпущена версия androidx.compose.animation:animation-*:1.8.0-alpha03 . Версия 1.8.0-alpha03 содержит следующие коммиты .

Изменения в API

  • Обновление версии Kotlin до 1.9 ( I1a14c )

Исправлены ошибки

  • Исправлена ​​ошибка в анимации изменения размера AnimatedContent теперь анимация всегда начинается с текущего размера, что обеспечивает непрерывность процесса.

Версия 1.8.0-alpha02

18 сентября 2024 г.

Выпущена версия androidx.compose.animation:animation-*:1.8.0-alpha02 . Версия 1.8.0-alpha02 содержит следующие коммиты .

Версия 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 )

Внешний вклад

  • Предотвращение установки параметра `seekable transition playTime когда переход не выполняется. Автор: Стивен Шен. ( c2e6e7e6 )

Версия 1.7

Версия 1.7.8

12 февраля 2025 г.

Выпущена версия androidx.compose.animation:animation-*:1.7.8 . Версия 1.7.8 содержит следующие коммиты .

Версия 1.7.7

29 января 2025 г.

Выпущена версия androidx.compose.animation:animation-*:1.7.7 . Без изменений по сравнению с версией 1.7.6. 11 декабря 2024 г.

Выпущена версия androidx.compose.animation:animation-*:1.7.6 . Версия 1.7.6 содержит следующие коммиты .

Версия 1.7.5

30 октября 2024 г.

Выпущена версия androidx.compose.animation:animation-*:1.7.5 . Версия 1.7.5 содержит следующие коммиты .

Исправлены ошибки

  • Исправлена ​​ошибка, вызывавшая неправильное выравнивание Modifier.animateContentSize при RTL (направление текста справа налево). ( Idae6b , b/372055503 )

Версия 1.7.4

16 октября 2024 г.

Выпущена версия androidx.compose.animation:animation-*:1.7.4 . Версия 1.7.4 содержит следующие коммиты .

Версия 1.7.3

2 октября 2024 г.

Выпущена версия androidx.compose.animation:animation-*:1.7.3 . Версия 1.7.3 содержит следующие коммиты .

Версия 1.7.2

18 сентября 2024 г.

Выпущена версия androidx.compose.animation:animation-*:1.7.2 . Версия 1.7.2 содержит следующие коммиты .

Внешний вклад

  • Предотвратить установку параметра `seekable transition playTime когда переход не запущен. Спасибо Стивену Шёну! ( c2e6e7e6 )

Версия 1.7.1

10 сентября 2024 г.

  • Изменений в артефактах Android не обнаружено. Артефакты -desktop были удалены, а артефакты -jvmStubs и -linuxx64Stubs были добавлены. Ни одна из этих целей не предназначена для использования, они являются заполнителями, призванными помочь в работе Jetbrains Compose.

Версия 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 )
  • Экспериментальный класс SharedTransitionScope теперь является интерфейсом, а не классом. ( Iaf856 )
  • Для sharedBounds добавлены новые resizeModes ( ScaleToBounds и RemeasureToBounds ), позволяющие выбирать между масштабированием и переизмерением. Предыдущие API-интерфейсы scaleIn/OutSharedContentToBounds устарели. ( I0d41a )

Улучшения существующих API:

  • Новый Modifier.animateContentSize , принимающий дополнительный параметр для пользовательского выравнивания контента. ( I5623a , b/269803907 )
  • Новая экспериментальная DeferredTargetAnimation для анимации размера, положения или любой другой цели, неизвестной во время создания экземпляра. ( I60745 )
  • SeekableTransitionState заменяет snapTo() на seekTo() и добавляет функцию snapTo() , которая немедленно изменяет состояние на целевое без какой-либо анимации.
  • Теперь вы можете передать значение periodicBias (Float) в keyframesWithSpline , это обеспечит равенство начальной и конечной скорости сплайна. Полезно для повторяющихся анимаций с использованием сплайнов. Смещение указывает, насколько изменяется каждая скорость (начальная и конечная) для достижения периодичности. ( 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 содержит следующие коммиты .

Версия 1.7.0-beta07

7 августа 2024 г.

Выпущена версия androidx.compose.animation:animation-*:1.7.0-beta07 . Версия 1.7.0-beta07 содержит следующие коммиты .

Исправлены ошибки

  • Исправлена ​​ошибка, из-за которой SharedTransitionScope не отображал элементы наложения во время перехода в определенных условиях, которые обычно включали использование с навигацией. ( Id65ab , b/347520198 )

Версия 1.7.0-beta06

24 июля 2024 г.

Выпущена версия androidx.compose.animation:animation-*:1.7.0-beta06 . Версия 1.7.0-beta06 содержит следующие коммиты .

Исправлены ошибки

  • Исправлена ​​ошибка утечки состояний перехода SeekableTransition путем корректной очистки наблюдений из SnapshotStateObserver при завершении перехода. ( b9c7182 )
  • Исправлены крайние случаи, когда дочерние переходы некорректно помечались как завершенные после завершения родительского перехода. ( 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

  • Для sharedBounds добавлены новые resizeModes ( ScaleToBounds и RemeasureToBounds ), позволяющие выбирать между масштабированием и переизмерением. Предыдущие API-интерфейсы scaleIn/OutSharedContentToBounds устарели. ( I0d41a )

Внешний вклад

  • Экспериментальный класс SharedTransitionScope теперь является интерфейсом, а не классом, разработанным Стивеном Шоеном. ( Iaf856 , b/338415048 , b/338414702 )

Версия 1.7.0-alpha08

1 мая 2024 г.

Выпущена версия androidx.compose.animation:animation-*:1.7.0-alpha08 . Версия 1.7.0-alpha08 содержит следующие коммиты .

Изменения в 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 , это обеспечит равенство начальной и конечной скорости сплайна. Полезно для повторяющихся анимаций с использованием сплайнов. Смещение указывает, насколько изменяется каждая скорость (начальная и конечная) для достижения периодичности. ( 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() , который позволяет поддерживать все три типа анимации: появление (плавное появление), исчезновение (плавное исчезновение) и изменение порядка. ( I2d7f7 , b/330152398 , b/150812265 )

Исправлены ошибки

  • Улучшена производительность API updateTransition .

Версия 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 содержит следующие коммиты.

Новые функции

  • Новый Modifier.animateContentSize , принимающий дополнительный параметр для пользовательского выравнивания контента. ( I5623a , b/269803907 )
  • Новая экспериментальная DeferredTargetAnimation для анимации размера, положения или любой другой цели, неизвестной во время создания экземпляра. ( I60745 )

Версия 1.7.0-alpha02

7 февраля 2024 г.

Выпущена версия androidx.compose.animation:animation-*:1.7.0-alpha02 . Версия 1.7.0-alpha02 содержит следующие коммиты.

Исправлены ошибки

  • Исправлена ​​ошибка совместимости для KeyframesSpec . ( I2bdf3 , b/322214617 )
  • Исправлена ​​ошибка, из-за которой Modifier.animateContentSize некорректно сбрасывался при использовании в LazyList . ( 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 содержит следующие коммиты.

Версия 1.6

Версия 1.6.8

12 июня 2024 г.

Выпущена версия androidx.compose.animation:animation-*:1.6.8 . Версия 1.6.8 содержит следующие коммиты .

Версия 1.6.7

1 мая 2024 г.

Выпущена версия androidx.compose.animation:animation-*:1.6.7 . Версия 1.6.7 содержит следующие коммиты .

Версия 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 содержит следующие коммиты .

Версия 1.6.4

20 марта 2024 г.

Выпущена версия androidx.compose.animation:animation-*:1.6.4 . Версия 1.6.4 содержит следующие коммиты .

Версия 1.6.3

6 марта 2024 г.

Выпущена версия androidx.compose.animation:animation-*:1.6.3 . Версия 1.6.3 содержит следующие коммиты .

Версия 1.6.2

21 февраля 2024 г.

Выпущена версия androidx.compose.animation:animation-*:1.6.2 . Версия 1.6.2 содержит следующие коммиты.

Версия 1.6.1

7 февраля 2024 г.

Выпущена версия androidx.compose.animation:animation-*:1.6.1 . Версия 1.6.1 содержит следующие коммиты.

Исправлены ошибки

  • Исправлена ​​ошибка совместимости для KeyframesSpec . ( I2bdf3 , b/322214617 )

Версия 1.6.0

24 января 2024 г.

Выпущена версия androidx.compose.animation:animation-*:1.6.0 . Версия 1.6.0 содержит следующие коммиты.

Версия 1.6.0-rc01

10 января 2024 г.

Выпущена версия androidx.compose.animation:animation-*:1.6.0-rc01 . Версия 1.6.0-rc01 содержит следующие коммиты.

Версия 1.6.0-beta03

13 декабря 2023 г.

Выпущена версия androidx.compose.animation:animation-*:1.6.0-beta03 . Версия 1.6.0-beta03 содержит следующие коммиты.

Изменения в API

  • Временно удалены scaleInToFitContainer и scaleOutToFitContainer из AnimatedContentTransitionScope , поскольку они требуют предварительного просмотра. В будущих версиях они будут доступны, если предварительный просмотр включен по умолчанию или если его включить отдельно.

Версия 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.

Исправлены ошибки

  • Добавить поддержку градиентного сглаживания в ArcLine . ( I4d5bb )
  • Реализуйте операторы equals и hashcode для 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 содержит следующие коммиты.

Изменения в API

  • Устаревшая KeyframesSpecConfig#with заменена на KeyframesSpecConfig#using , которая сохраняет шаблон построителя. ( I1d769 )

Версия 1.6.0-alpha07

4 октября 2023 г.

Выпущена версия androidx.compose.animation:animation-*:1.6.0-alpha07 . Версия 1.6.0-alpha07 содержит следующие коммиты.

Изменения в 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 содержит следующие коммиты.

Версия 1.6.0-alpha05

6 сентября 2023 г.

Выпущена версия androidx.compose.animation:animation-*:1.6.0-alpha05 . Версия 1.6.0-alpha05 содержит следующие коммиты.

Изменения в API

  • Добавлена PathEasing , позволяющая задавать произвольный путь для кривой сглаживания. ( Idb4b9 )

Версия 1.6.0-alpha04

23 августа 2023 г.

Выпущена версия androidx.compose.animation:animation-*:1.6.0-alpha04 . Версия 1.6.0-alpha04 содержит следующие коммиты.

Изменения в API

  • Добавьте SeekableTransitionState , чтобы разработчики могли контролировать ход перехода. ( I8e69d )

Версия 1.6.0-alpha03

9 августа 2023 г.

Выпущена версия androidx.compose.animation:animation-*:1.6.0-alpha03 . Версия 1.6.0-alpha03 содержит следующие коммиты.

Изменения в API

  • Новый тип перехода при входе/выходе, масштабирующий контент в зависимости от размера анимируемого контейнера во время анимации входа и выхода. Функция LookaheadScope Composable и интерфейс теперь стабильны. ( Ifb2ce )

Версия 1.6.0-alpha02

26 июля 2023 г.

Выпущена версия androidx.compose.animation:animation-*:1.6.0-alpha02 . Версия 1.6.0-alpha02 содержит следующие коммиты.

Изменения в API

  • Новый ExitTransition.Hold позволяет отображать исходящий контент в AnimatedContent до завершения переходов входа и выхода. ( I5984f )
  • Дополнительные аннотации для указания допустимых входных данных для компонуемых объектов ( I51109 )

Версия 1.6.0-alpha01

21 июня 2023 г.

Выпущена версия androidx.compose.animation:animation-*:1.6.0-alpha01 . Версия 1.6.0-alpha01 содержит следующие коммиты.

Новые функции

  • Включите возможность полной интеграции Modifier.animateContentSize и AnimatedVisibility в систему предварительного просмотра, передавая целевой размер в проходе предварительного просмотра.

Изменения в 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 содержит следующие коммиты.

Версия 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 содержит следующие коммиты.

Версия 1.5.1

6 сентября 2023 г.

Выпущена версия androidx.compose.foundation:foundation-*:1.5.1 . Версия 1.5.1 содержит следующие коммиты.

Исправлены ошибки

  • Исправлена ​​ошибка, из-за которой текстовые поля отображали клавиатуру и были доступны для редактирования, когда readOnly имел значение true. Также исправлена ​​ошибка, из-за которой клавиатура не отображалась, когда readOnly менялся с true на false во время фокусировки. ( I34a19 , b/246909589 )

Версия 1.5.1

6 сентября 2023 г.

Выпущена версия androidx.compose.animation:animation-*:1.5.1 . Версия 1.5.1 содержит следующие коммиты.

Версия 1.5.0

9 августа 2023 г.

Выпущена версия androidx.compose.animation:animation-*:1.5.0 . Версия 1.5.0 содержит следующие коммиты.

Версия 1.5.0-rc01

26 июля 2023 г.

Выпущена версия androidx.compose.animation:animation-*:1.5.0-rc01 . Версия 1.5.0-rc01 содержит следующие коммиты.

Исправлены ошибки

  • Исправлена ​​ошибка, из-за которой вызов метода .value для примитивного типа состояния (например, MutableIntState ) приводил к предупреждению линтера с некорректным исправлением. Теперь проверка будет рекомендовать переход к правильному свойству. ( Iba953 , b/287279257 )

  • Доступна дополнительная проверка, рекомендующая перенести вызовы mutableStateOf() в соответствующие специализированные типы для примитивных типов. Ее идентификатор проверки — 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 содержит следующие коммиты.

Изменения в API

  • В AnimatedContent теперь поддерживается ContentKey , что позволяет более точно контролировать момент перехода. ( Ic069b )

Версия 1.5.0-alpha03

19 апреля 2023 г.

Выпущена версия androidx.compose.animation:animation-*:1.5.0-alpha03 . Версия 1.5.0-alpha03 содержит следующие коммиты.

Новые функции

  • Новое поведение по умолчанию для SubcomposeLayout в LookaheadScope . Оно позволяет SubcomposeLayouts , не имеющим условных слотов (например, TabRow , Scaffold , BoxWithConstraints и т. д.), корректно работать с анимацией предварительного просмотра.

Изменения в API

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

Версия 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

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

Версия 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

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

Версия 1.4

Версия 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).

Версия 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.

Версия 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.

Версия 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.

Важные изменения по сравнению с версией 1.3.0

  • Tooling label is supported in r ememberInfiniteTransition and all the extension functions on InfiniteTransition and Transition (eg 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 , and androidx.compose.animation:animation-graphics:1.4.0-rc01 are released with no changes. Version 1.4.0-rc01 contains these commits.

Версия 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 changes. Version 1.4.0-beta02 contains these commits.

Версия 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 changes. Version 1.4.0-beta01 contains these commits.

Версия 1.4.0-alpha05

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

Версия 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

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

Версия 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

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

Версия 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

  • Add ToolingState to allow tooling to change internal states of 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 , 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

Версия 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.

Версия 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

Версия 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.

Версия 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.

Важные изменения по сравнению с версией 1.2.0

  • New set of easing functions are made stable

Версия 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.

Версия 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

Версия 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.

Версия 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

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

Версия 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.

Версия 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

  • 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

Версия 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.

Версия 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.

Важные изменения по сравнению с версией 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 )

Версия 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

  • 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

  • Added Experimental Easing Curves for Animations ( I64a38 )

Версия 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.

Версия 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.

Версия 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

  • AnimatedImageVector now supports repeatCount and 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 , and androidx.compose.animation:animation-graphics:1.2.0-alpha06 are released. Version 1.2.0-alpha06 contains these commits.

Изменения в API

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

Версия 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

  • Hooray! Compose animation now supports 'Animator duration scale' setting from Developer Options. ( 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 , and androidx.compose.animation:animation-graphics:1.2.0-alpha04 are released. Version 1.2.0-alpha04 contains these commits.

Версия 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.

Версия 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.

Версия 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

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

Обновления зависимостей

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

Исправлены ошибки

Версия 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.

Важные изменения с версии 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

Версия 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

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

Версия 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

Версия 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

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

Версия 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 )

Версия 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

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

Версия 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.

Версия 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

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

Версия 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.

Версия 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 )

Версия 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

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

Версия 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

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

Исправлены ошибки

Версия 1.0

Версия 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 )

Версия 1.0.4

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.

Обновления зависимостей

  • Updated to depend on Kotlin 1.5.31

Версия 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.

Обновления зависимостей

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

Версия 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.

Обновления зависимостей

  • Updated to depend on Kotlin 1.5.21 .

Версия 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.

Основные особенности версии 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.

Версия 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

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

  • 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

  • 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

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

Версия 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.

Исправлены ошибки

Версия 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

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

Версия 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

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

Версия 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

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

Версия 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

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

Версия 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

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

Версия 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

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

Версия 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 )

Версия 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

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

Версия 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

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

Версия 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

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

Версия 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 )

Версия 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

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

Версия 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

  • 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

  • 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

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