Создать фонд

Создавайте приложения Jetpack Compose с готовыми к использованию стандартными блоками и расширяйте основу для создания собственных элементов системы проектирования.
Последнее обновление Стабильный выпуск Релиз-кандидат Бета-версия Альфа-релиз
24 июля 2024 г. 1.6.8 - 1.7.0-бета06 -

Состав

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

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

Группа Описание
сочинить.анимацию Создавайте анимацию в своих приложениях Jetpack Compose, чтобы улучшить взаимодействие с пользователем.
compose.compiler Преобразуйте функции @Composable и включите оптимизацию с помощью плагина компилятора Kotlin.
compose.foundation Создавайте приложения Jetpack Compose с готовыми к использованию стандартными блоками и расширяйте основу для создания собственных элементов системы проектирования.
составить.материал Создавайте пользовательские интерфейсы 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 Compiler.
Compose.ui Фундаментальные компоненты пользовательского интерфейса, необходимые для взаимодействия с устройством, включая макет, рисование и ввод.

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

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

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

классный

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

android {
    buildFeatures {
        compose true
    }

    composeOptions {
        kotlinCompilerExtensionVersion = "1.5.14"
    }

    kotlinOptions {
        jvmTarget = "1.8"
    }
}

Котлин

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

android {
    buildFeatures {
        compose = true
    }

    composeOptions {
        kotlinCompilerExtensionVersion = "1.5.14"
    }

    kotlinOptions {
        jvmTarget = "1.8"
    }
}

Дополнительные сведения о зависимостях см. в разделе Добавление зависимостей сборки .

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

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

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

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

Версия 1.7

Версия 1.7.0-beta06

24 июля 2024 г.

Выпущен androidx.compose.foundation:foundation-*:1.7.0-beta06 . Версия 1.7.0-beta06 содержит эти коммиты .

Версия 1.7.0-бета05

10 июля 2024 г.

Выпущен androidx.compose.foundation:foundation-*:1.7.0-beta05 . Версия 1.7.0-beta05 содержит эти коммиты .

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

  • Исправлена ​​обработка значений Nan в SnapFlingBehavior и Pager.

Версия 1.7.0-beta04

26 июня 2024 г.

Выпущен androidx.compose.foundation:foundation-*:1.7.0-beta04 . Версия 1.7.0-beta04 содержит эти коммиты .

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

  • Избегайте сбоев при измерении очень больших текстовых строк (например, 10 тыс. символов) ( 8157ab ).
  • Исправлено измерение очень большого текста, вызывающее сбой в новом BasicTextField ( 6b7575 ).
  • Отменяет изменение поведения при измерении строк/столбцов, которое нарушает использование текста в определенных сценариях ( 69e8ba ).

Версия 1.7.0-бета03

12 июня 2024 г.

Выпущен androidx.compose.foundation:foundation-*:1.7.0-beta03 . Версия 1.7.0-beta03 содержит эти коммиты .

Версия 1.7.0-бета02

29 мая 2024 г.

Выпущен androidx.compose.foundation:foundation-*:1.7.0-beta02 . Версия 1.7.0-beta02 содержит эти коммиты .

Изменения API

  • Добавляет экспериментальный API для настройки поведения предварительной выборки LazyGrids аналогичный существующему экспериментальному API для LazyLists . Сюда входит поддержка предварительной выборки элементов во вложенных LazyGrids . Как и в случае с LazyListPrefetchStrategy , реализация по умолчанию предполагает предварительную выборку первых двух вложенных элементов каждой сетки, но это можно настроить с помощью новых API LazyGridPrefetchStrategy(nestedPrefetchItemCount) и LazyListPrefetchStrategy#onNestedPrefetch . ( I591c4 )
  • SemanticsProperties.Editable переименован в IsEditable и заменен SemanticsPropertyReceiver.editable на значение isEditable . Свойство теперь является логическим и всегда указывается в текстовых полях. ( I8acd8 )
  • Значения по умолчанию basicMarquee перемещены в объект MarqueeDefaults . ( I12ff6 )
  • Параметр basicMarquee delayMillis переименован в repeatDelayMillis . ( I12ff6 )
  • Обновите API для стилизации ссылок: TextLinkStyles перемещены в TextStyle и удалены TextDefaults из материала ( I5477b ).

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

  • LayoutCoordinates.introducesFrameOfReference переименован в LayoutCoordinates.introducesMotionFrameOfReference , чтобы лучше отражать его назначение. Связанная функция переименована для расчета координат на основе этого флага. ( I3a330 )
  • Из свойств MarqueeDefaults удалено значение «По умолчанию». ( I1d8a0 )
  • Удалена надпись «Marquee» из свойств MarqueeDefaults . ( Iad4f4 )
  • Удалены TextLinkStyles из класса TextStyle . Вместо этого TextLinkStyles является частью конструктора LinkAnntation и метода AnnotatedString.fromHtml ( I90b2b ).
  • Исправлена ​​ошибка, из-за которой Пейджер щелкал при броске к границе, уже находясь на ней. ( I9f373 , б/339171222 )
  • BTF2 теперь имеет правильные жесты выбора мыши. ( Ibe8c6 )

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

  • Повторно отправьте «Создать тип контента для расчета времени компоновки/измерения на основе предварительной выборки для повышения точности» ( Iea622 ).
  • Сделайте тип контента расчета времени составления/измерения на основе предварительной выборки для повышения точности ( Ibccb1 ).
  • Сделать модификаторы WindowInsetsPadding доступными из общего исходного набора ( I070b2 ).

Версия 1.7.0-бета01

14 мая 2024 г.

Выпущен androidx.compose.foundation:foundation-*:1.7.0-beta01 . Версия 1.7.0-beta01 содержит эти коммиты .

Изменения API

  • Добавлено свойство KeyboardOptions.shouldShowKeyboardOnFocus обратно как устаревшее скрытое для двоичной совместимости. ( I15cfe )
  • Modifier.anchoredDraggable теперь по умолчанию меняет дельту перетаскивания для компонентов с горизонтальной ориентацией при использовании в макете RTL. ( I3c6d9 )
  • AnnotatedString.hasEqualsAnnotations теперь имеет hasEqualAnnotations . ( I685c0 )
  • Обновлен API для получения тематических ссылок Material в тексте. В частности, из TextDefaults удалены методы для создания тематических LinkAnnotations и анализа HTML с тематическими ссылками. Вместо этого добавлен класс TextLinkStyles , который позволяет стилизовать ссылки в качестве параметра составного текста. ( I31b93 )
  • Заменены onDragStarted и onDragStopped обратными вызовами без приостановки. ( I59de8 )

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

  • Исправлена ​​ошибка, из-за которой Pager аварийно завершал работу, если contentPadding превышал входящие ограничения. Пейджер теперь приводит отрицательные значения, возвращаемые из PageSize , к 0. ( Iba5d8 , b/314008560 )

Версия 1.7.0-альфа08

1 мая 2024 г.

Выпущен androidx.compose.foundation:foundation-*:1.7.0-alpha08 . Версия 1.7.0-alpha08 содержит эти коммиты .

Новые возможности

  • В BasicTextField и SelectionContainer добавлено контекстное меню, вызываемое правой кнопкой мыши, с элементами для действий вырезания, копирования, вставки и выбора всех. ( If8c93 , Ia2b49 , I6f268 )

Изменения API

  • Запросы предварительной выборки LazyLayout теперь могут быть помечены как срочные. Это означает, что мы ожидаем, что этот элемент понадобится в следующем кадре, и хотим игнорировать бюджет кадра, чтобы заранее выполнить дополнительную работу ( Id513f ).
  • Переименован isPositionedByParentWithDirectManipulation , чтобы introducesFrameOfReference . Обратите внимание, что теперь это имеет обратный эффект: по умолчанию большинство LayoutCoordinates вводят систему отсчета, и только при прямом манипулировании свойство будет ложным. Чтобы запросить позицию только тех, которые вводят систему отсчета, используйте positionInLocalFrameOfReference(...) . Или positionInLocalLookaheadFrameOfReference из LookaheadScope . ( Ifc5f7 )
  • Переименован onClicked в onClick внутри LinkInteractionListener ( Iaa35c ).
  • Измените лямбду действия для getScrollViewportLength в соответствии с отзывами совета API. ( Ibc74a )
  • Переименованы API-интерфейсы делегирования рукописного ввода стилуса. ( Ica45f , б/327271923 )
  • Переименуйте TextInclusionStrategy.isInside в isIncluded . Сделайте тип возвращаемого значения Paragraph/MultiParagraph#getRangeForRect() не допускающим значения NULL. ( I51f26 )

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

  • Добавлен параметр «Выбрать все» во все текстовые контекстные меню в SelectionContainer . ( Ib750e , б/240143283 )
  • Исправлен длинный снимок экрана для прокручиваемых контейнеров с reverseScrolling=true . ( I7c59c )
  • Исправлена ​​проблема, из-за которой currentValue AnchoredDraggableState менялся при приближении к границам состояния. ( Iea30b , б/333846848 )

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

  • PrefetchExecutor переименован в PrefetchScheduler , чтобы лучше отражать его обязанности. ( Ib9154 )
  • Добавлена ​​поддержка предварительной выборки элементов во вложенных LazyLists (например, LazyColumn , который отображает вложенные LazyRows ). Ожидается, что это изменение уменьшит выпадение кадров во время прокрутки для этих LazyLists . По умолчанию реализация выполняет предварительную выборку первых двух вложенных элементов, однако этим поведением можно управлять с помощью новых API LazyLayoutPrefetchStrategy(nestedPrefetchItemCount) и LazyListPrefetchStrategy#onNestedPrefetch . ( I51952 )

Версия 1.7.0-альфа07

17 апреля 2024 г.

Выпущен androidx.compose.foundation:foundation-*:1.7.0-alpha07 . Версия 1.7.0-alpha07 содержит эти коммиты .

Новые возможности

  • Добавлен объект TextDefaults , содержащий методы для создания LinkAnnotation и анализа строки с HTML-тегом, которая применяет MaterialTheme к ссылкам. ( I98532 , б / 139312671 )
  • Поддержка анимации появления и исчезновения элементов была добавлена ​​в LazyVerticalGrid и LazyHorizontalGrid . Ранее можно было добавить модификатор Modifier.animateItemPlacement() для поддержки анимации размещения (переупорядочения). Мы упразднили этот модификатор и представили новый неэкспериментальный модификатор под названием Modifier.animateItem() , который позволяет поддерживать все три типа анимации: появление (появление), исчезновение (появление) и изменение порядка. ( Ib7d12 , б/330510929 )
  • Поддержка анимации появления и исчезновения элементов была добавлена ​​в LazyVerticalStaggeredGrid и LazyHorizontalStaggeredGrid . Ранее можно было добавить модификатор Modifier.animateItemPlacement() для поддержки анимации размещения (переупорядочения). Мы упразднили этот модификатор и представили новый неэкспериментальный модификатор под названием Modifier.animateItem() , который позволяет поддерживать все три типа анимации: появление (появление), исчезновение (появление) и изменение порядка. ( I69bc9 , б/330511290 )

Изменения API

  • Добавляет ContextMenuColors и связанный с ним LocalContextMenuTheme ProvidableCompositionLocal . Цвета контекстного меню текстовых полей и выбираемого текста можно изменить, предоставив локальную композицию. ( Ифа154 )
  • Текстовые ссылки получили опцию стилизации нажатого состояния в дополнение к обычному стилю, наведению курсора и фокусу. ( I5f864 , б / 139312671 )
  • Представьте ViewConfiguration.HandwritingGestureLineMargin для жестов рукописного ввода. Поддержка жестов рукописного ввода для BasicTextField . ( Ie6e13 , б/325660505 )
  • Удален DelegatableNode.scrollIntoView для версии 1.7, поскольку у нас не было времени завершить стабилизацию остальной части связанной поверхности API. Эта функция будет вновь представлена ​​в версии 1.8 ( I6cf61 , b/333421581 , b/332900232 ).
  • При запросе координат макета теперь вы можете использовать аргумент excludeDirectManipulationOffset , чтобы исключить смещение, установленное родительскими макетами, которые разместили своих дочерних элементов с помощью Placeable.PlacementScope.withDirectManipulationPlacement . Аналогично, макет, который часто меняет положение своих дочерних элементов, теперь может размещать их с помощью withDirectManipulationPlacement (например, Scroll, реализованного по умолчанию). Это помогает анимации, основанной approachLayout стать более интуитивно понятными, поскольку теперь у вас есть возможность различать, какое смещение нужно анимировать, а что применять непосредственно при принятии решения о анимации их подхода. ( I60ec7 )
  • Представьте requestScrollToItem для LazyStaggeredGrid . Для каждого прохода измерения клиент теперь может отказаться от поддержки индекса на основе ключа, вызвав requestScrollToItem . Это никак не меняет существующее поведение, если не вызывается requestScrollToItem . ( I63983 )
  • Введите requestScrollToPage в Pager. Для каждого прохода измерения клиент теперь может отказаться от поддержки индекса на основе ключа, вызвав requestScrollToPage . Это никак не меняет существующее поведение, если не вызывается requestScrollToPage . ( Ic4213 )
  • Представлен requestScrollToItem для LazyGrids . Для каждого прохода измерения клиент теперь может отказаться от поддержки индекса на основе ключа, вызвав requestScrollToItem . Это никак не меняет существующее поведение, если не вызывается requestScrollToItem . ( I0a7a0 )
  • ClickableText помечен как устаревший. Чтобы добавить ссылки в текст, создайте AnnotatedString с LinkAnnotation , соответствующим вашей ссылке, и передайте эту AnnotatedString в компонуемый Text ( I34d4b , b/323346994 ).
  • UrlAnnotation устарел, используйте вместо него LinkAnnotation.Url . Если вы используете тему Material, используйте объект TextDefaults для создания аннотации с примененной к ней темой Material ( I8d180 , b/323346545 ).
  • String.parseAsHtml переименован в AnnotatedString.Companion.fromHtml ( I43dcd )
  • В метод parseAsHtml добавлены аргументы стиля ( linkStyle , focusedLinkStyle , hoveredLinkStyle ) и прослушиватель взаимодействия ссылок. При анализе строки с HTML-тегом с помощью тегов <a> метод создает LinkAnnotation.Url для каждого такого тега и передает объекты стиля и прослушиватель взаимодействия ссылок в каждую аннотацию. ( I7c977 )
  • LinkAnnotation теперь принимает аргументы стиля на основе состояния и LinkInteractionListener . Добавьте эту аннотацию в AnnotatedString , чтобы получить гиперссылку. Передавая focusedState и/или hoveredState вы можете определить визуальную конфигурацию ссылок, когда они находятся в фокусе и/или наведены. ( I81ce4 , б/139312671 )
  • Флаг функции для длинных снимков экрана был удален. ( I28648 , б/329128246 )
  • LazyColumn теперь правильно отображает прикрепленные заголовки на длинных скриншотах. ( I8d239 , б/329296635 )
  • Стабилизировано большинство оставшихся экспериментальных API, которые были представлены с новым BasicTextField . ( I714e2 )
  • В BasicSecureTextField добавлен параметр textObfuscationCharacter , который определяет, какой символ использовать при запутывании содержимого. ( I0588b )
  • Источники NestedScroll Drag и Fling заменяются UserInput и SideEffect , чтобы учесть расширенное определение этих источников, которые теперь включают анимацию (Side Effect) и колесо мыши и клавиатуру ( UserInput ). ( I40579 )
  • Представьте LocalBringIntoViewSpec — поведение прокрутки фокуса, зависящее от платформы, которое применяется на слое модификатора Scrollable. ( I27aa5 , б/317453911 )
  • Удален TextFieldCharSequence . TextFieldBuffer.originalValues ​​заменяется на TextFieldBuffer.originalText и TextFieldBuffer.originalSelection . ( I2c7d6 )
  • ImeOptions.hintLocales больше не имеет значения NULL. Если вы хотите передать пустой список локалей, используйте LocaleList.Empty . ( Ic5bc4 )
  • getOffsetFractionForPage переименован в getOffsetDistanceInPages . ( Ia05e2 )

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

  • Когда InputTransformations соединяются с next , их KeyboardOptions теперь правильно объединяются по отдельным параметрам с помощью нового метода KeyboardOptions.merge . ( Ie5304 , б/295951492 )
  • targetValue AnchoredDraggableState теперь больше не учитывает позиционные пороги. Теперь он имеет неявный порог 50 %, что означает, что targetValue изменяется в средней точке между двумя привязками. ( I82c2c )

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

  • Переименованы 2 API прокрутки ( I56a75 ).

Версия 1.7.0-альфа06

3 апреля 2024 г.

Выпущен androidx.compose.foundation:foundation-*:1.7.0-alpha06 . Версия 1.7.0-alpha06 содержит эти коммиты .

Новые возможности

  • Поддержка анимации появления и исчезновения элементов была добавлена ​​в LazyColumn и LazyRow . Ранее можно было добавить модификатор Modifier.animateItemPlacement() для поддержки анимации размещения (переупорядочения). Мы упразднили этот модификатор и представили новый неэкспериментальный модификатор под названием Modifier.animateItem() , который позволяет поддерживать все три типа анимации: появление (появление), исчезновение (появление) и изменение порядка. ( I2d7f7 , б/150812265 )
  • Клиенты LazyColumn/LazyRow теперь могут отказаться от поддержки индекса на основе ключа для предстоящего прохода измерения, вызвав не приостанавливаемый LazyListState.requestToScroll . ( I98036 , б/209652366 )
  • Добавлен метод parseAsHtml для стилизованных строк: он позволяет конвертировать строку, помеченную HTML-тегами, в AnnotatedString . Обратите внимание, что не все теги поддерживаются, например, вы пока не сможете отображать маркированные списки. ( I84d3d )
  • Реализована экспериментальная поддержка длинных снимков экрана в контейнерах прокрутки Compose с использованием официального API Android ( ScrollCaptureCallback ). Эта функция является экспериментальной и в настоящее время может обрабатывать не все случаи правильно. По этой причине в настоящее время по умолчанию он отключен. Чтобы принять участие, установите для флага ComposeFeatureFlag_LongScreenshotsEnabled значение true. Этот флаг будет удален перед бета-версией 1.7. ( I2b055 , б/329296471 )
  • Внедрите новый API GraphicsLayer , чтобы обеспечить большую гибкость при размещении и рендеринге экземпляров GraphicsLayer и поддерживать встроенные функции рендеринга без необходимости координации с реализациями Composable для указания экземпляров модификатора GraphicsLayer .

Изменения API

  • Все параметры KeyboardOptions теперь по умолчанию имеют неопределенное значение. Добавлен метод KeyboardOptions.merge .
  • KeyboardOptions.autoCorrect переименован в autoCorrectEnabled и сделал его допускающим значение NULL, где значение NULL означает, что значение не было указано. ( Ia8ba0 , б/295951492 )
  • outOfBoundsPageCount переименован в beyondViewportPageCount . ( I129c6 )
  • fun ClipEntry.getMetadata() заменено на val ClipEntry.clipMetadata . ( I50155 )
  • Удален TextFieldState.valueAsFlow() . Предпочитайте использовать snapshotFlow { state.text } или snapshotFlow { TextFieldCharSequence(state.text, state.selection) } ( I7d629 )
  • Реорганизованы параметры InputTransformation.transformInput . Удален originalValue: TextFieldCharSequence . Вместо этого TextFieldBuffer теперь содержит это значение с тем же именем. Также удален параметр valueWithChanges: TextFieldBuffer . TextFieldBuffer теперь является областью получателя функции. ( I919cc )
  • Вариант BasicTextField(state) и BasicSecureTextField теперь используют KeyboardActionHandler вместо KeyboardActions для обработки действий, выполняемых программной клавиатурой. ( I58dda )
  • API-интерфейсы делегирования рукописного ввода стилусом для поддержки рукописного ввода стилусом в «поддельных» полях ввода текста. ( I9c09c , б/327271923 )
  • Переименован KeyboardOptions.shouldShowKeyboardOnFocus в showKeyboardOnFocus . ( Ib4b7a , б/295951492 )
  • Удален hintMediaTypes из Modifier.contentReceiver . Разработчикам уже было предложено проверить тип носителя полученного TransferableContent , поскольку он может быть несовместим с hintMediaTypes . ( I82f99 )
  • Изменен порядок параметров BasicSecureTextField . Удалены параметры keyboardType и imeAction в пользу полного класса KeyboardOptions , при этом сохранены те же значения по умолчанию, которые подходят для BasicSecureTextField . Также удален параметр scrollState . ( Иббфа9 )
  • Тип TextFieldState.text изменен с TextFieldCharSequence на просто CharSequence . Поэтому добавлены TextFieldState.selection: TextRange и TextFieldState.composition: TextRange? для чтения текущих значений выделения и композиции непосредственно из объекта состояния.
  • Удален TextFieldState.forEachTextValue . ( Idb2a2 )
  • Удалены функции ClipboardManager.getClipMetadata и ClipboardManager.hasClip . Используйте clipEntry.getMetadata() для чтения метаданных текущей записи клипа. Также проверьте результат ClipboardManager.getClip , если он равен нулю или нет, чтобы понять, есть ли в буфере обмена текущий клип. ( I50498 )
  • ClipboardManager.setClip теперь принимает значение null, чтобы иметь возможность очистить буфер обмена. ( I7d2e9 )
  • ReceiveContentListener преобразуется в интерфейс функции. Также удалена перегрузка Modifier.receiveContent , которая принимает лямбда-выражение, поскольку ReceiveContentListener теперь является функциональным интерфейсом.
  • Modifier.receiveContent переименован в Modifier.contentReceiver . ( I1e6af )
  • TransferableContent.consumeEach переименован в TransferableContent.consume . ( I1e462 )
  • rememberTextFieldState перешел на стабильный API. ( I37999 )

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

  • Исправлена ​​ошибка, из-за которой вариант BasicTextField(state) не работал с клавиатурами CJK (на основе композиции). ( I54425 )
  • Исправлена ​​ошибка, из-за которой Modifier.dragAndDropTarget() мог ссылаться на устаревшие данные в определенных сценариях с повторным использованием Modifier.Node . ( I05bb1 )
  • Отменено недавнее изменение контракта, при котором вызовы AnchoredDraggableState#anchoredDrag фиксировались в конце операции anchoredDrag . ( I95715 )

Версия 1.7.0-альфа05

20 марта 2024 г.

Выпущен androidx.compose.foundation:foundation-*:1.7.0-alpha05 . Версия 1.7.0-alpha05 содержит эти коммиты .

Изменения API

  • Удалена экспериментальная локальная композиция LocalTextLinkStyle для стилизации гиперссылок. ( Иебфа7 )
  • Удалено экспериментальное переопределение BasicText с аргументом onLinkClicked . В будущем появится замена API для поддержки гиперссылок. ( I107d5 )
  • Удалены методы и свойства, связанные с Codepoints, в TextFieldState и TextFieldBuffer . Также удалены суффиксы inChars из остальных API, связанных с выделением и композицией. ( Ief7ce )
  • currentValue AnchoredDraggable теперь будет обновляться при прохождении через точку привязки. Используйте settledValue чтобы получить предыдущую семантику currentValue , обновляясь только при установке привязки. Прогресс теперь отображается как функция (требующая начальной и конечной точки), а не как свойство. ( Ibe6e8 , б/318707189 , б/298271489 , б/294991954 )
  • BasicTextField(state) , TextFieldState , InputTransformation , OutputTransformation , TextFieldLineLimits , TextFieldDecorator переведены в стабильную версию. ( I9582b )
  • Представлен InterceptPlatformTextInput для помощи в написании низкоуровневых тестов, связанных с IME, и других низкоуровневых вариантов использования IME. PlatformTextInputTestOverride устарел. ( I862ed , б/322680547 )
  • Разделите restrictedConstraints() на два метода: fitPrioritizingWidth() и fitPrioritizingHeight() ( I6d7fd ).

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

  • Добавлено 2 новых API isLastScrollForward / isLastScrollBackward для проверки направления прокрутки для последнего действия прокрутки, возвращает false, если действия прокрутки еще нет. ( I63a0e )

Версия 1.7.0-альфа04

6 марта 2024 г.

Выпущен androidx.compose.foundation:foundation-*:1.7.0-alpha04 . Версия 1.7.0-alpha04 содержит эти коммиты .

Изменения API

  • Поддержка функции рукописного ввода стилусом на устройствах после Android U. ( I002e4 )
  • В KeyboardOptions добавлены hintLocales , чтобы предоставить TextFields возможность указывать IME с определенными языковыми стандартами для установки предпочтительного языка. ( Id18c2 )
  • Удалены экспериментальные перегрузки BasicTextField2 и BasicSecureTextField , которые принимали value: String и onValueChange: () -> String . ( I568b4 )
  • Добавьте необязательную функцию applySemantics к InputTransformation чтобы влиять на семантику BasicTextField2 , к которому она применяется. ( I74a2f , б / 170648072 )
  • В этом CL мы добавляем семантическое действие GetScrollViewportLength , чтобы мы могли передавать информацию о компонентах, прокручиваемых в композиции, в систему a11y. Этот CL также применяет использование указанного свойства в прокручиваемых списках Foundation. ( Ic5fa2 )
  • BasicTextField2 переименован в BasicTextField . ( Ie5713 )
  • FocusRequester.createRefs теперь стабилен ( I4d92c , b/261436820 )
  • Введен DelegatableNode.scrollIntoView() , позволяющий узлам-модификаторам напрямую выполнять запросы scrollIntoView . ( I2b3b7 , б/299939840 )
  • Введен DelegatableNode.requireView() , позволяющий узлам-модификаторам получать текущее View Android без чтения локальной композиции. ( I40768 )
  • Представляем информацию о контекстном макете в области строк контекстного потока и области столбца контекстного потока, включая индекс строки, положение и ограничения на максимальную ширину и высоту, чтобы оставаться в указанном положении. Элементы, превышающие максимальную ширину/высоту, могут перейти на следующую строку или быть опущены в зависимости от настроек переполнения. ( Id13f8 , б/292114798 )

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

  • Исправлена ​​ошибка, из-за которой в определенных условиях переключение атрибутов « enabled или readOnly TextField приводило к сбою. ( Iae17b )

Версия 1.7.0-альфа03

21 февраля 2024 г.

Выпущен androidx.compose.foundation:foundation-*:1.7.0-alpha03 . Версия 1.7.0-alpha03 содержит эти коммиты.

Изменения API

  • Представлен DelegatableNode.requireLayoutCoordinates() как способ получить текущие LayoutCoordinates Modifier.Node без необходимости переопределять onPlaced и самостоятельно сохранять координаты в свойстве. ( Ia8657 )
  • Представлен DelegatableNode.currentLayoutCoordinates как способ получить текущие LayoutCoordinates Modifier.Node без необходимости переопределять onPlaced и самостоятельно сохранять координаты в свойстве. ( Иаэбаа )
  • Оптимизация производительности в DraggableAnchors , используемом AnchoredDraggable . ( I89cff )
  • BasicTextField2 и связанные API из пакета androidx.compose.foundation.text2 перемещены в androidx.compose.foundation.text . ( I9f635 )
  • BasicTextField2 больше не принимает параметр CodepointTransformation . Используйте BasicSecureTextField или OutputTransformation . ( Id34ff )
  • Добавлен метод для сравнения только аннотаций двух AnnotatedStrings . ( I32659 )
  • Представляем ContextualFlowRow и расширенный FlowRow / Column с MaxLines и Overflow . Мы рады объявить об улучшениях экспериментальных FlowRow и FlowColumn , которые теперь включают поддержку maxLines и переполнения, а также дебют ContextualFlowRow и ContextualFlowColumn . Это обновление предназначено для обеспечения компонентов с оптимальной производительностью, где ContextualFlow* идеально подходит для большого количества элементов, используя небольшую конфигурацию maxLines и динамические кнопки +N, чтобы увидеть больше, а FlowRow и FlowColumn идеально подходят для небольшого количества элементов, меньше более 100 предметов. Важно: Чтобы сохранить существующее поведение в FlowRow или FlowColumn , где все элементы составлены независимо от того, соответствуют ли они максимальному значению поперечной оси, задайте для overflow значение FlowRowOverflow.Visible или FlowColumnOverflow.Visible во время инициализации. Изучите ContextualFlowRowSample и FlowRowSample , чтобы увидеть примеры этих новых функций в действии. ( Ib9135 , б / 293577082 )

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

  • Анимация курсора больше не запрашивает кадры между состояниями включения и выключения. ( Я2253 )
  • Устаревшие конструкторы копирования KeyboardOptions теперь корректно копируют все свойства. ( Если12де )

Версия 1.7.0-альфа02

7 февраля 2024 г.

Выпущен androidx.compose.foundation:foundation-*:1.7.0-alpha02 . Версия 1.7.0-alpha02 содержит эти коммиты.

Изменения API

  • HorizontalPager , VerticalPager и PagerState повышены до стабильных. ( I67660 , б/316966909 )
  • Добавлена ​​локальная композиция LocalTextLinkStyle , которая позволяет изменять стиль ссылок в тексте во всем приложении. Если вы используете свою собственную тему в приложении, вам следует настроить эту композицию локально в соответствии с вашей темой. При использовании темы «Материал» цвет ссылки по умолчанию будет установлен на основной цвет Материала. ( I7eb10 )
  • Представлен модификатор receiveContent , который предоставляет разработчикам возможность получать богатый контент в Jetpack Compose.
  • receiveContent интегрируется с BasicTextField2 для приема расширенного контента, предоставляемого с помощью программной клавиатуры или с помощью действия вставки в буфер обмена. ( I81b72 )
  • В этом изменении мы заменяем SnapFlingBehavior на TargetedFlingBehavior в пейджере, чтобы разблокировать другие варианты использования и обеспечить большую гибкость. ( I762ea )
  • Этим изменением мы делаем Snapping API стабильными. Мы также очищаем часть тестового кода и добавляем больше примеров в Snapping. ( Id8da9 )
  • Представьте TargetedFlingBehaviorFlingBehavior , который позволяет распространять информацию о состоянии текущей анимации и ее целевом смещении прокрутки. ( I6a207 )

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

  • BasicTextField2 теперь удерживает курсор в поле зрения во время ввода, когда он прокручивается из поля зрения или перемещается из поля зрения из-за ввода. ( Ieb856 , б / 237190748 )

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

  • Добавляет экспериментальный API для настройки поведения предварительной выборки LazyLists. ( I022a4 )

Версия 1.7.0-альфа01

24 января 2024 г.

Выпущен androidx.compose.foundation:foundation-*:1.7.0-alpha01 . Версия 1.7.0-alpha01 содержит эти коммиты.

Новые возможности

  • Добавлен новый Indication API , IndicationNodeFactory . Это приводит к более производительным реализациям Indication по сравнению с предыдущим (теперь устаревшим) API rememberUpdatedInstance . Информацию о миграции см. на сайте Developer.android.com .
  • clickable / combinedClickable / selectable / toggleable теперь принимает параметр MutableInteractionSource , допускающий значение NULL. Если значение равно null и предоставленное Indication является IndicationNodeFactory , Indication может быть лениво создано только при необходимости, что повышает производительность. Если вы не поднимаете и не используете MutableInteractionSource , рекомендуется передать значение null.

Изменения API

  • Ввести DecayAnimation в AnchoredDraggable . Это изменение добавляет параметр decayAnimationSpec в AnchoredDraggable позволяющий использовать анимацию затухания при установке на один из якорей. Это изменение также включает переименование существующей animationSpec в snapAnimationSpec , чтобы помочь понять вариант использования каждой спецификации.
  • BasicTextField2 доступен для экспериментального использования. Он должен примерно соответствовать функциям BasicTextField , а поведение должно быть готово к использованию. Однако API пока остается экспериментальным. Перед стабилизацией оно будет переименовано в BasicTextField и перемещено в тот же пакет.
  • Представлен первый проект API OutputTransformation для BasicTextField2 . Этот API заменяет большинство вариантов использования VisualTransformation в старом BasicTextField . Однако он еще не завершен, и некоторые вещи не будут работать правильно, но мы будем признательны за любые отзывы об удобстве использования API для ваших сценариев использования. ( аосп/2708848 )
  • Представлена LinkAnnotation , позволяющая добавлять в текст ссылки и кликабельные элементы. Функция ссылок еще не завершена, и грядут новые изменения API.
  • Представлен модификатор receiveContent , который предоставляет разработчикам возможность получать богатый контент в Jetpack Compose.
  • receiveContent интегрируется с BasicTextField2 для приема расширенного контента, предоставляемого с помощью программной клавиатуры или путем вставки из буфера обмена.
  • KeyboardOptions.shouldShowKeyboardOnFocus позволяет отключить поведение BasicTextField по умолчанию, запрашивающее программную клавиатуру при фокусе.
  • TextInputService и LocalTextInputService устарели. Вместо этого используйте PlatformTextInputModifierNode для прямой интеграции с API-интерфейсами IME платформы. ( аосп/2862698 )
  • Indication#rememberUpdatedInstance устарела. Он имеет высокий неизбежный недостаток производительности и препятствует другим оптимизациям. Вместо этого вам следует использовать новый API IndicationNodeFactory .

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

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

Версия 1.6

Версия 1.6.8

12 июня 2024 г.

Выпущен androidx.compose.foundation:foundation-*:1.6.8 . Версия 1.6.8 содержит эти коммиты .

Версия 1.6.7

1 мая 2024 г.

Выпущен androidx.compose.foundation:foundation-*:1.6.7 . Версия 1.6.7 содержит эти коммиты .

Версия 1.6.6

17 апреля 2024 г.

Выпущен androidx.compose.foundation:foundation-*:1.6.6 . Версия 1.6.6 содержит эти коммиты .

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

  • Исправлена ​​ошибка, из-за которой в определенных условиях переключение атрибутов « enabled или readOnly TextField приводило к сбою. ( Iae17b )

Версия 1.6.5

3 апреля 2024 г.

Выпущен androidx.compose.foundation:foundation-*:1.6.5 . Версия 1.6.5 содержит эти коммиты .

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

  • Добавляет журналы отладки к трудновоспроизводимым ошибкам в строке/столбце: ( b/300280216 и b/297974033 )

Версия 1.6.4

20 марта 2024 г.

Выпущен androidx.compose.foundation:foundation-*:1.6.4 . Версия 1.6.4 содержит эти коммиты .

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

  • Жест выделения с длительным нажатием и перетаскиванием, который выходит за пределы макета текста в первом кадре перетаскивания, больше не приводит к сбою. ( Icdf90 , б/325307463 )

Версия 1.6.3

6 марта 2024 г.

Выпущен androidx.compose.foundation:foundation-*:1.6.3 . Версия 1.6.3 содержит эти коммиты .

Версия 1.6.2

21 февраля 2024 г.

Выпущен androidx.compose.foundation:foundation-*:1.6.2 . Версия 1.6.2 содержит эти коммиты.

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

  • Исправлена ​​ошибка, из-за которой AnimateContentSize не сбрасывался должным образом. ( I07051 )
  • Устранена проблема, из-за которой в некоторых случаях intrinsicHeight текста перекэшировался. ( 3cd398 , б/217910352 )

Версия 1.6.1

7 февраля 2024 г.

Выпущен androidx.compose.foundation:foundation-*:1.6.1 . Версия 1.6.1 содержит эти коммиты.

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

  • Исправлено смещение размера сетки при прокрутке сверх предела. ( bffc39 )
  • Добавьте проверку макета с большими размерами. ( е74af5 )
  • Исправлено размещение элементов нулевого размера в начале шахматной сетки. ( 785f94 )
  • Вызовите обратный вызов onRelease в том же порядке, что и onForgotten. ( 31ce3b )

Версия 1.6.0

24 января 2024 г.

androidx.compose.foundation:foundation-*:1.6.0 выпускается. Версия 1.6.0 содержит эти коммиты.

Важные изменения с 1.5.0

  • Новый модификатор модификатора Modifier.anchoredDraggable , который разблокирует способность перетаскивать и оживить между предопределенным набором якорей. Этот модификатор предназначен для замены для Modifier.swipeable . Узнайте , как его использовать и мигрировать из Modifier.swipeable .
  • Была добавлена ​​функциональность перетаскивания между приложениями и компонентами. Обратитесь к DragAndDropTarget , Modifier.dragAndDropSource и другим API, чтобы начать
  • Modifier.draggable2D - это новый модификатор, который обеспечивает легкую поддержку 2D -перетаскивания. См. Образец .
  • AndroidExternalSurface и AndroidEmbeddedExternalSurface были добавлены, чтобы облегчить добавление поверхностных компонентов в Compose
  • Различные изменения и улучшения API в Pager и snapFlingBehaviour
  • Различные фокусы, текст и вставки API были продвинуты на стабильные APIS

Версия 1.6.0-RC01

10 января 2024 г.

androidx.compose.foundation:foundation-*:1.6.0-rc01 выпускается. Версия 1.6.0-RC01 содержит эти коммиты.

Изменения API

  • Расширение DragAndDropTarget() удлинители был удален. Создайте новый экземпляр с помощью object: DragAndDropTarget {} . ( I32318 )

Версия 1.6.0-бета03

13 декабря 2023 г.

androidx.compose.foundation:foundation-*:1.6.0-beta03 выпускается. Версия 1.6.0-BETA03 содержит эти коммиты.

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

  • Исправить сбой, который повлиял на очень большой текст, измеренный с помощью бесконечных ограничений. ( I1a7df , b/312294386 )
  • PlatformImeOptions теперь является конкретным классом, а не интерфейсом. ( IF40A4 )

Версия 1.6.0-бета02

29 ноября 2023 г.

androidx.compose.foundation:foundation-*:1.6.0-beta02 выпускается. Версия 1.6.0-BETA02 содержит эти коммиты.

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

  • Исправление для canScroll не обновляется после прокрутки только для реле. ( I60a86 )
  • Исправлено для Modifier.animateItemPlacement() и LookaheadScope после небольших свитков. ( I3a2b7 )

Версия 1.6.0-бета01

15 ноября 2023 г.

androidx.compose.foundation:foundation-*:1.6.0-beta01 выпускается. Версия 1.6.0-BETA01 содержит эти коммиты.

Изменения API

  • Модификатор DragAndDropTarget теперь явно принимает приема DragAndDropTarget и имеет лямбду, чтобы выбрать сеанс перетаскивания. Сейчас есть две заводские функции для DragAndDropModifierNode . Один для получения переводов и один для передачи данных ( i69481 )
  • Обновленная maximumFlingVelocity которая будет представлена ​​как Float. Обновленная документация, чтобы быть более ясной в отношении единства maximumFlingVelocity . ( I8Adc7 )
  • onDragAndDropStart на фабрике DragAndDropModifierNode был переименован в acceptDragAndDropTransfer .

    acceptsDragAndDropTransfer был добавлен в Modifier dragAndDropTarget , чтобы принять с сеанса перетаскивания. Эта Lambda возвращает жизнеспособную DragAndDropTarget если заинтересован в сессии перетаскивания. Другие Lambdas для обработки событий сопротивления были заменены на это.

    Функция заводской фабрики DragAndDropTarget была добавлена ​​для получения с сеансов перетаскивания ( IEBF3A )

  • Открытие startDragImmediately в AnchoredDraggable дает контроль для обнаружения жестов перетаскивания при его использовании. Полезно установить его, когда виджет анимирует целевой якорь. См. Образец . ( IE6D13 , B/285139987 )

  • API Foundation Tooltip теперь @ExperimentalFoundationApi ( i30b0b )

  • Удален DragAndDropInfo как тип DragAndDropModifierNode.drag теперь принимает параметры для transferData , размер украшения и украшения DrawScope Lambda

    DragAndDropTarget имеет методы для определенных событий перетаскивания и выпадения вместо того, чтобы быть единственным абстрактным методом

    onDragAndDropEvent в заводской функции для DragAndDropModifierNode был переименован в onDragAndDropStart чтобы лучше сообщить, что предоставленная DragAndDropTarget действителен только для данного перетаскивания и сброса.

    DragAndDropEventType был удален ( i645b1 )

  • Переименованная PlatformTextInputModifierNode.runTextInputSession establishTextInputSession ( I03CD0 )

  • Замените OriginalText TextSubstitution . ( IFA5A8 )

  • Переименованная PlatformTextInputModifierNode.textInputSession для runTextInputSession . ( IE9C6B )

  • Дети SubcomposeLayout (и такие макеты, как LazyColumn основанные на нем), которые сохраняются для повторного использования в будущем, считаются деактивированными. Новый assertIsDeactivated() тестовый API был введен для проверки таких узлов. Остальная часть испытательных API будет отфильтровывать деактивированные узлы по умолчанию. ( I2ef84 , b/187188981 )

  • Параметр clippingEnabled clip Modifier.magnifier

  • Параметр magnifierCenter Modifier.magnifier сделан нулевым сохранением того же поведения по умолчанию. ( I6aa66 )

  • Материальные API SwipeToReveal (для карт и чипов) теперь полагаются на API на основе слотов (как рекомендовано Compose) вместо экземпляров на основе класса данных для создания этих слотов. Это нарушающее изменение, см. Демо и примеры кода для примеров, как использовать новый API. ( IA8943 )

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

  • Реализация equals и hashcode для PageSize.Fixed . ( IE3EDE , B/300134276 )
  • Исправлена ​​ошибка, которая приведет к тому, что макет BasicText не сокращается, когда minWidth изменилась, а minWidth меньше, чем ограничения начальной меры, maxWidth ( IDB19C )
  • Добавьте поддержку рендеринга для градиента развертки в ArcLine . ( I4d5bb )
  • Исправьте проблему бинарной совместимости с изменением вставки в окне ( IEE695 )
  • Удалите слой ядра материала для чипа/кнопки Material3, так как Microbenchmarks показывают лучшую производительность без него. ( I55555 )

Версия 1.6.0-Alpha08

18 октября 2023 г.

androidx.compose.foundation:foundation-*:1.6.0-alpha08 выпускается. Версия 1.6.0-Alpha08 содержит эти коммиты.

Новые возможности

  • Modifier.draggable2D - это новый модификатор, который обеспечивает легкую поддержку 2D -перетаскивания. См. Пример ( ID95F5 , B/214412658 )

Изменения API

  • Modifier.dragAndDrawSource имел лямбда onDrawDragShadow , переименованную в drawDragDecoration , и DragAndDropInfo имел параметр размера, переименованный в dragDecorationSize . ( Id0e30 , b/303904810 )
  • Параметр decorationBox BasicTextField2 переименован в decorator . Его тип также изменяется на эквивалентный забавный интерфейс TextFieldDecorator . ( I23c1c )

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

  • Улучшенная документация по BasicTextField в отношении требований onValueChange . ( I90fc9 , b/160257648 )

Версия 1.6.0-Alpha07

4 октября 2023 г.

androidx.compose.foundation:foundation-*:1.6.0-alpha07 выпущен. Версия 1.6.0-Alpha07 содержит эти коммиты.

Изменения API

  • Представлен PlatformTextInputMethodTestOverride для написания тестов для пользовательских текстовых редакторов. ( ID159b )
  • Переименованная GraphicsSurface в AndroidExternalSurface ( i11680 )
  • Добавлен DisableNonLinearFontScalingInCompose линейный флаг, чтобы отключить нелинейное масштабирование шрифтов. Установите DisableNonLinearFontScalingInCompose = true в ваших тестах, если вам нужно время для их очистки. Этот флаг будет удален в Compose 1.6.0-BETA01. ( IC9486 )
  • Добавлены ColorList и ColorSet Collections, которые избегают распределений. ( I744bd )
  • Это изменение устраняет shortSnapVelocityThreshold , которая была превращена в детали реализации реализаций SnapLayoutInfoProvider . ( I65f6d )
  • Добавляет модификатор dragAndDropSource для начальных сеансов перетаскивания и модификатора dragAndDropTarget для получения с сеансов перетаскивания ( IB7828 , B/286038936 )
  • Обновите SnapPositionInLayout документацию и метод положения. Введите контент -пачки в метод положения в SnapPositionInLayout . ( ID7938 , B/300116110 )
  • UndoState что в TextFieldState предоставлена ​​возможность отменить/переделать изменения, внесенные пользователем. ( ICC024 )

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

  • Исправлен basicMarquee , не анимируя после изменения скорости. ( Id2e77 , b/297974036 )

Версия 1.6.0-Alpha06

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

androidx.compose.foundation:foundation-*:1.6.0-alpha06 выпускается. Версия 1.6.0-Alpha06 содержит эти коммиты.

Новые возможности

  • Новые композиционные обертки для SurfaceView и TextureView: GraphicsSurface() и EmbeddedGraphicsSurface() . Это экспериментальный API и подвержен изменениям и модификациям. ( I9ddb2 )
  • Modifier.magnifier() теперь стабильный API. Это включает в себя удаление MagnifierStyle в пользу встроенных параметров в самом модификаторе. ( I83BEC , B/298381260 , B/262367109 , B/261438887 )

Изменения API

  • Введенная updateCurrentPage и updateTargetPage В ScrollScope , это последние части, необходимые для обеспечения настройки анимированного прокрутки через PagerState.scroll . ( I9cad5 , b/2677444105 , b/243786897 )
  • Удалить плотность из SnapFlingBehavior . Все реализации SnapLayoutInfoProvider уже имеют способ получить доступ к плотности, прицел приемника может быть удален, что приведет к менее сложной реализации как SnapFlingBehavior , так и SnapLayoutInfoProviders . ( I153C3 )
  • Больше модификаторов отмечены как стабильные. ( I56af1 , b/298046462 )
  • Удален SnapStepSize из SnapLayoutInfoProvider . Расчет должен быть выполнен с использованием информации о макете и предоставлена ​​с помощью подхода или схватывания. ( If320c )

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

  • Compose теперь использует нелинейное масштабирование шрифтов для лучшей читаемости и доступности. Когда шрифт шрифт> 100% в настройках системы, небольшой текст будет нормально увеличиваться, но уже более широкий текст только немного увеличится. Кроме того, высота линии, определенные в SP, автоматически приспосабливаются к тому, чтобы оставаться пропорциональными 100% -ную масштабную высоту. Смотрите лучшие практики масштабирования шрифта для получения дополнительной информации. ( I11518 )

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

  • Удалите использование rememberSaveable для подсказки инструментов. ( ICC131 , B/299500338 )

Версия 1.6.0-Alpha05

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

androidx.compose.foundation:foundation-*:1.6.0-alpha05 выпускается. Версия 1.6.0-Alpha05 содержит эти коммиты.

Изменения API

  • Добавьте перегрузки для BasicSecureTextField , которые принимают неизменное значение и обратный вызов, чтобы изменить это значение, как и текущий API BasicTextField . ( IA4882 )
  • Добавить Modifier.preferKeepClear() , чтобы отметить так же, как предпочтение, чтобы не допустить плавающих окон на API 33 и выше. ( IB51D5 , B/297260115 )
  • Скорости броска в виде компонентов, таких как ScrollView и RecyclerView ограничены на ViewConfiguration.ScaledMaximumFlingVelocity . Compose теперь содержит свою собственную версию maximumFlingVelocity , которая теперь относится к Draggable . ( IBF974 )
  • Удаленное устаревшее Pager и перегрузки PagerState . ( IEA07E )
  • Добавлен BasicTooltipBox для compose.foundation и обновленного PlainTooltipBox и RichTooltipBox для использования TooltipBox с новыми композициями PlainTooltip и RichTooltip . ( I79e1d )

Версия 1.6.0-Alpha04

23 августа 2023 г.

androidx.compose.foundation:foundation-*:1.6.0-alpha04 выпускается. Версия 1.6.0-Alpha04 содержит эти коммиты.

Изменения API

  • Добавить интерфейс ReusableComposition для управления жизненным циклом и повторного использования подкомпозиций. ( I812D1 , B/2528446775 )
  • Modifier.focusGroup был продвинут до стабильных API. ( I7ffa3 )
  • Добавьте перегрузки для BasicTextField2 , которые принимают неизменное значение и обратный вызов, чтобы изменить это значение, как и текущий API BasicTextField . ( I3f2b8 )
  • GridItemSpan::currentLineSpan теперь стабильный API. ( ICC29C )
  • Canvas, который принимает contentDescription теперь является стабильным API. ( IB3D29 )
  • Введен viewportSize в ScrollState , способ узнать размер viewPort компонента, который использует ScrollState после измерения. ( I8b85a , b/283102682 )
  • Исправлена ​​проблема, в которой предварительная выборка в пейджере не соответствовала поведению в взглядах. ( I93352 , B/289088847 )
  • Modifier.consumeWindowInsets(PaddingValues) теперь стабилен.
    • Deprecated Modifier.consumedWindowInsets API ConsumedWindowinsets теперь удален. Вместо этого используйте Modifier.consumeWindowInsets . ( ID72BB )

Версия 1.6.0-Alpha03

9 августа 2023 г.

androidx.compose.foundation:foundation-*:1.6.0-alpha03 выпускается. Версия 1.6.0-Alpha03 содержит эти коммиты.

Изменения API

  • Перегрузка LazyLayout добавлена, он принимает лямбду LazyLayoutItemProvider , а не простой объект, как это было раньше. Предыдущая перегрузка устарела. ( I42a5a )
  • Добавлена ​​поддержка для настройки privateImeOptions ( IDB772 )

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

  • Фиксированные текстовые поля, показывающие клавиатуру и редактируемые, когда readOnly верно. Также исправлена ​​клавиатура, не показывающая, когда readOnly изменяется с истины на ложь, когда они сфокусированы. ( I34a19 , b/246909589 )

Версия 1.6.0-Alpha02

26 июля 2023 г.

androidx.compose.foundation:foundation-*:1.6.0-alpha02 выпускается. Версия 1.6.0-Alpha02 содержит эти коммиты.

Изменения API

  • Представил PagerLayoutInfo с информацией, собранной после прохода меры в Pager . Также представил PageInfo , информация о одной измеренной странице в Pager . ( IAD003 , B/283098900 )
  • Дополнительные аннотации для указания разрешенных входов в композиции ( i51109 )
  • Добавлен SemanticsNodeInteraction.requestFocus как более удобный и обнаруженный способ запросить фокус в тестах. ( IE8722 )
  • Полностью переработанный PlatformTextInput* IPI. ( I6c93a , b/2746611182 , b/267235947 , b/277380808 )
  • SoftwareKeyboardController и LocalSoftwareKeyboardController больше не экспериментальны. LocalSoftwareKeyboardController также теперь является правильным CompositionLocal . ( I4c364 )
  • Modifier.transformable теперь предоставляет Pan Delta в параметре canPan , чтобы помочь определить направление сковороды, позволяющего его разрешить. ( I692AA , B/266829800 )
  • Обновления модификатора consumeWindowInsets для расширения SuperClass AbstractComposeView ( IACD74 , B/269479941 )

Версия 1.6.0-Alpha01

21 июня 2023 г.

androidx.compose.foundation:foundation-*:1.6.0-alpha01 выпускается. Версия 1.6.0-Alpha01 содержит эти коммиты.

Новые возможности

  • Представил новый AnchoredDraggable API в Foundation. Его можно использовать для создания компонентов, которые можно перетаскивать между дискретными состояниями, такими как модальные нижние листы. Этот API заменяет Swipeable API материала. ( I4a2ed )

Изменения API

  • Поддержка InputConnection#requestCursorUpdates ( i0c69b )
  • Представил scrollAnimationSpec , чтобы разрешить пользовательские анимационные характеристики. Обновлено BringIntoViewCalculator для BringIntoViewScroller . ( IDB741 )
  • Добавить тип ResourceResolutionException , чтобы обернуть броски, брошенные при попытке загрузить растровые активы с описанием пути актива, который не удалось загрузить. ( I19F44 , B/230166331 , B/278424788 )
  • Добавлены свойства семантики и действия для поддержки текстового перевода. ( I4a6bc )
  • Представил API BringIntoViewCalculator , который можно использовать для настройки того, как компоненты, такие как Scrollable ответы bringIntoView запросы. Изменил перегрузку прокрутки, чтобы необязательно принять экземпляр BringIntoViewCalculator . ( Iaf5af )

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

  • Добавлен проверка ворса, чтобы предупредить, если вы создаете MutableInteractionSource в композиции, не запомнив его, аналогично проверкам ворса для создания изменяемого состояния / Animatable . ( I5daae )
  • Добавлена ​​поддержка для выбора мыши. Отбор на основе прикосновения будет расширяться по слову и сокращаться по характеру. ( IC0C6C , B/180639271 )
  • Добавлен интерфейс FocusTargetModifierNode , который можно использовать для создания пользовательской FocusTarget . ( I9790e )

Версия 1.5

Версия 1.5.4

18 октября 2023 г.

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

Версия 1.5.3

4 октября 2023 г.

androidx.compose.foundation:foundation-*:1.5.3 выпущен. Эта версия не имеет изменений.

Версия 1.5.2

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

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

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

  • Исправлена ​​ошибка в тексте, которая привела к сбоям в определенных обстоятельствах, когда семантика была признана недействительной.

Версия 1.5.1

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

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

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

  • Фиксированные текстовые поля, показывающие клавиатуру и редактируемые, когда readOnly верно. Также исправлена ​​клавиатура, не показывающая, когда readOnly изменяется с истины на ложь, когда они сфокусированы. ( I34a19 , b/246909589 )

Версия 1.5.0

9 августа 2023 г.

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

Важные изменения с 1.4.0

  • Многие основополагающие модификаторы, в том числе Modifier.clickable Modifier.draggable , Modifier.scrollable Modifier.Node
  • Улучшения в стабильности пейджеров. Многие ошибки были адресованы.
  • Параметры pageCount сейчас живет в PagerState , а не на самом пейджере

Версия 1.5.0-RC01

26 июля 2023 г.

androidx.compose.foundation:foundation-*:1.5.0-rc01 выпускается. Версия 1.5.0-RC01 содержит эти коммиты.

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

  • Доступна дополнительная проверка, чтобы рекомендовать Migrating mutableStateOf() вызовы в соответствующие специализированные типы для примитивов. Его идентификатор пронзака - AutoboxingStateCreation . Ранее эта проверка была включена по умолчанию для всех проектов. Чтобы увидеть это предупреждение в редакторе Android Studio и выходе из вашего проекта, измените его серьезность от информационного к предупреждению (или выше), объявив warning "AutoboxingStateCreation" внутри build.gradle или build.gradle.kts , как показано ( i34F7E ):

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

Версия 1.5.0-бета03

28 июня 2023 г.

androidx.compose.foundation:foundation-*:1.5.0-beta03 -бета03 выпускается. Версия 1.5.0-бета03 содержит эти коммиты.

Версия 1.5.0-бета02

7 июня 2023 г.

androidx.compose.foundation:foundation-*:1.5.0-beta02 -бета02 выпускается. Версия 1.5.0-бета02 содержит эти коммиты.

Версия 1.5.0-бета01

24 мая 2023 г.

androidx.compose.foundation:foundation-*:1.5.0-beta01 -бета01 выпускается. Версия 1.5.0-бета01 содержит эти коммиты.

Изменения API

  • Внедрите PlatformDataProvider , чтобы предоставлять информацию о частоте пульса и шагах за день. Интерфейс SensorGateway удаляется из публичного API. ( I55b84 )

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

  • Уменьшите ассигнования во время ленивого списка/сетки/и т. Д. измерения ( iaf9e2 )
  • Снижение распределения при применении снимков ( i65c09 )
  • Удаленные ассигнования из пружинной анимации ( IE9431 )
  • Удаленное распределение из TextLayout ( i0fd11 )
  • Удалили множественные ассигнования в отслеживании скорости указателя ( i26bae )

Версия 1.5.0-Alpha04

10 мая 2023 г.

androidx.compose.foundation:foundation:1.5.0-alpha04 и androidx.compose.foundation:foundation-layout:1.5.0-alpha04 выпускаются. Версия 1.5.0-Alpha04 содержит эти коммиты.

Изменения API

  • Добавлены оптимизированный TextStyle.merge(...) с полным списком параметров. ( IAD234 , B/246961787 )
  • Представьте SnapLayoutInfoProvider , который можно использовать с LazyGridState . ( I92134 , B/269237141 , B/260914964 )
  • Экспериментальный Modifier.animateItemPlacement() был добавлен для Lazy Shaggered Grids Extame. Вы можете применить его на элементы, чтобы достичь анимации с изменением/переупорядочкой позиции автоматизации. ( I4b62d , b/257034719 )
  • Продвигайте GridCells.FixedSize до стабильного. FixedSize Определяет LazyGrid где каждая ячейка принимает точный размер на поперечной оси, а оставшееся пространство распределяется по расположению поперечной оси. ( I8542f )
  • Введенный прицел приемника PagerScope для пейджера и функция утилиты для расчета смещения данной страницы. ( IF2577 )
  • Введите snapPositionalThreshold при создании поведения Snap Fling. Используйте этот параметр, чтобы указать позиционный порог для короткого щелчка в пейджере. ( If8f7f )
  • Заменил SnapLayoutInfoProvider.calculateSnappingOffsetBounds с calculateSnappingOffset . В этом новом методе мы просто просим следующее смещение, чтобы сделать. Расчет границ должен быть выполнен на уровне реализации, так как это может отличаться в зависимости от того, как нужно, чтобы произойти. ( I923a4 )
  • API -интерфейсы LazyStaggeredGrid были повышены до стабильной. ( I633a5 )
  • Удалите pageCount из Horizontal/VerticalPager . Это должно быть предоставлено при создании государства. Обновлено PagerState и rememberPagerState как PageState принять pageCount . ( IEB52D , B/266965072 )
  • Удалите pageCount из Horizontal/VerticalPager . Это должно быть предоставлено при создании государства. Обновлено PagerState и rememberPagerState как PageState принять pageCount . ( IFA3CB , B/266965072 )
  • Представьте shortSnapVelocityThreshold в пейджере SnapFlingBehavior . ( I7379e , b/275579012 )
  • Добавляет FlowRowScope и FlowColumnScope . ( I54fe2 )

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

  • Вызовы, чтобы получить семантику в тексте, когда ограничения имеют minWidth , а minHeight больше не потерпел крах. ( IBD072 )
  • Фиксированная регрессия, где клавиатура не отображалась для текстовых полей внутри диалогов, не созданных Dialog композицией. ( I82551 , B/262140644 )

Версия 1.5.0-Alpha03

19 апреля 2023 г.

androidx.compose.foundation:foundation:1.5.0-alpha03 и androidx.compose.foundation:foundation-layout:1.5.0-alpha03 выпускаются. Версия 1.5.0-Alpha03 содержит эти коммиты.

Этот выпуск позволяет новой стек рендеринга текста для Compose. Новый стек оптимизирован производительность, и вы не увидите видимых изменений.

Если вы видите изменения в визуализированном тексту, вы можете отлаживать, установив NewTextRendering1_5 = false чтобы подтвердить различие поведения. Установка это заставит переоборудование. Пожалуйста, подайте любые различия в поведении в качестве ошибок.

Флаг отладки будет удален до выпуска 1.5 Beta01 ( IADA23 , B/246960758 )

Изменения API

  • Сделайте встроенный в линии FlowColumn/FlowRow . ( IDAB37 )

Версия 1.5.0-Alpha02

5 апреля 2023 г.

androidx.compose.foundation:foundation:1.5.0-alpha02 и androidx.compose.foundation:foundation-layout:1.5.0-alpha02 выпускаются. Версия 1.5.0-Alpha02 содержит эти коммиты.

Изменения API

  • Добавлена ​​поддержка ячеек фиксированного размера в LazyGrid и расположить их с помощью поперечной ось. ( I83ed9 , b/235121277 , b/267942510 )
  • Добавлена ​​поддержка полос фиксированного размера в LazyStaggeredGrid и организует их с расположением поперечной оси. ( I7d519 )
  • UrlAnnotation S в AnnotatedString S теперь может быть открыт через услуги доступности, такие как TalkBack . ( IF4D82 , B/253292081 )
  • Добавлено действие InsertTextAtCursor Semantics для текстовых полей. ( I11ed5 )
  • Тестовые действия, связанные с текстами (например, performTextInput ), теперь будут запрашивать фокус напрямую, используя действие семантики, вместо того, чтобы нажать на поле. ( I6ed05 )
  • Добавляет поддержку между расстоянием/расположением поперечной оси с использованием verticalArrangement в FlowRow и horizontalArrangement в FlowColumn . Мы также удаляем verticalAlignment и horizontalAlignment верхнего уровня в FlowRow/FlowColumn . Разработчики могут использовать Modifier.align . Вместо этого. Это уменьшает путаницу между соглашениями об именовании verticalAlignment и verticalArrangement . ( I87B60 , B/268365538 )

Версия 1.5.0-Alpha01

22 марта 2023 г.

androidx.compose.foundation:foundation:1.5.0-alpha01 и androidx.compose.foundation:foundation-layout:1.5.0-alpha01 выпускаются. Версия 1.5.0-Alpha01 содержит эти коммиты.

Изменения API

  • Текст и BasicText рефактируются для использования новой системы модификаторов. Это приводит к значительному улучшению производительности во многих случаях. Изменения не должны быть видны. ( If1d17 , b/246961435 )
  • Добавлено действие Semantics PerformImeAction , чтобы вызвать действие IME на узлах текстового редактора. ( IC606F , B/269633506 )

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

  • Обновленные внутренние внутренности Modifier.hoverable . Hoverable. Модификатор hoverable будет показан только в инспекторе только в том случае, если он включен. ( 182103 )

Версия 1.4

Версия 1.4.3

3 мая 2023 г.

androidx.compose.foundation:foundation:1.4.3 и androidx.compose.foundation:foundation-layout:1.4.3 выпускаются без изменений (только удар версии).

Версия 1.4.2

19 апреля 2023 г.

androidx.compose.foundation:foundation:1.4.2 и androidx.compose.foundation:foundation-layout:1.4.2 выпускаются. Версия 1.4.2 содержит эти коммиты.

Версия 1.4.1

5 апреля 2023 г.

androidx.compose.foundation:foundation:1.4.1 и androidx.compose.foundation:foundation-layout:1.4.1 . Версия 1.4.1 содержит эти коммиты.

Версия 1.4.0

22 марта 2023 г.

androidx.compose.foundation:foundation:1.4.0 и androidx.compose.foundation:foundation-layout:1.4.0 выпускаются. Версия 1.4.0 содержит эти коммиты.

Важные изменения с 1.3.0

  • Добавлена ​​интеграция Emoji Compat в Text и TextField , а также абзац нижнего уровня. Он включен по умолчанию, когда настраивается emojicompat.
  • EmojiCompat можно настроить на определенном тексте с помощью PlatformParagraphStyle .
  • Добавлена ​​поддержка полной линии LazyStaggeredGrid (i28252)
  • Добавление экспериментального onHover в ClickableText (i6938f)
  • Введены новые экспериментальные перегрузки для функции runComposeUiTest и create*ComposeRule функции, которые принимают параметры CoroutineContext . Контекст будет использоваться для тестовой композиции и любых LaunchedEffect и rememberCoroutineScope() в композиции. ( I10614 , B/265177763 )
  • FlowRow и FlowColumn теперь доступны в виде @ExperimentalFoundationApi , которые позволяют получить более гибкую строку и компоновку на основе столбцов компонентов, которые разорватся на новую линию, если на основной оси недостаточно места. ( I3a7b2 )
  • Modifier.basicMarquee() доступен в качестве экспериментального для отображения контента с эффектом прокрутки шатра. ( I2df44 , b/139321650 )

Версия 1.4.0-rc01

8 марта 2023 г.

androidx.compose.foundation:foundation:1.4.0-rc01 и androidx.compose.foundation:foundation-layout:1.4.0-rc01 выпускаются. Версия 1.4.0-RC01 содержит эти коммиты.

Изменения API

  • Представил новый низкоуровневый API PlatformTextInputAdapter для создания пользовательских реализаций текста, которые непосредственно общаются с API платформы. ( I58df4 )
  • Добавьте поддержку для обратного макета в LazyStaggeredGrid . ( I3ef4a )

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

  • Действие SetText Semantics BasicTextField теперь обновит текстовый буфер, используя тот же путь кода, что и обновления IME, и функции тестирования (например, performTextReplacement ).
  • Функции текстового тестирования performTextClearance , performTextReplacement и performTextSelection Теперь используются SemanticsActions . ( I0807d , b/269633168 , b/269624358 )

Версия 1.4.0-бета02

22 февраля 2023 г.

androidx.compose.foundation:foundation:1.4.0-beta02 и androidx.compose.foundation:foundation-layout:1.4.0-beta02 выпускаются. Версия 1.4.0-бета02 содержит эти коммиты.

Изменения API

  • Добавлен новый обратный вызов Modifier.Node.onReset() , позволяющий сбросить какое -то локальное состояние для правильного обработки случая, когда Layout будет использоваться повторно (например, в качестве предмета LazyColumn ). Фиксированный FocusTargetModifierNode для правильного сброса сфокусированного состояния. ( I65495 , B/265201972 )
  • Добавлен параметр BlendMode в DrawScope.drawText , Paragraph.paint и MultiParagraph.paint Методы для поддержки различных алгоритмов смешивания при рисовании текста на холсте. ( I57508 )
  • Удал modifierElementOf() API. Пожалуйста, продлитесь от ModifierNodeElement напрямую. ( IE6D21 )

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

  • Регулировка ручек выбора больше не может выбрать частичный символ. ( Idedd1 )
  • Исправить сбой, когда Ctrl+Backspace на пустом TextField ( I0427F , B/244185537 )

Версия 1.4.0-бета01

8 февраля 2023 г.

androidx.compose.foundation:foundation:1.4.0-beta01 и androidx.compose.foundation:foundation-layout:1.4.0-beta01 выпускаются. Версия 1.4.0-бета01 содержит эти коммиты.

Новые возможности

  • С 1.3, добавлена ​​интеграция Emoji Compat в Text и TextField , а также абзац нижнего уровня. Он включен по умолчанию, когда настраивается emojicompat.
  • EmojiCompat можно настроить на определенном тексте с помощью PlatformParagraphStyle .

Изменения API

  • Добавлена ​​общая реализация API PinnableContainer , используемого во всех LazyLayouts для удержания элементов, которые выходят из состава, но все же должны быть активными. ( If45a4 )
  • PinnableContainer.PinnedHandle.unpin() был переименован в release() ( i4667a )

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

  • Добавлена ​​свойство mainAxisItemSpacing в LazyListLayoutInfo , LazyGridLayoutInfo и LazyStaggeredGridItemInfo ( i52fad )

Версия 1.4.0-альфа05

25 января 2023 г.

androidx.compose.foundation:foundation:1.4.0-alpha05 и androidx.compose.foundation:foundation-layout:1.4.0-alpha05 выпускаются. Версия 1.4.0-Alpha05 содержит эти коммиты.

Новые возможности

  • Добавлена ​​поддержка полной линии LazyStaggeredGrid ( i28252 )
  • Добавление экспериментального onHover в ClickableText ( i6938f )
  • Введены новые экспериментальные перегрузки для функции runComposeUiTest и create*ComposeRule функции, которые принимают параметры CoroutineContext . Контекст будет использоваться для тестовой композиции и любых LaunchedEffect и rememberCoroutineScope() в композиции. ( I10614 , B/265177763 )

Изменения API

  • Объединяет API -интерфейсы Pre/post OverscrollEffect в комбинированный «декоратор» applyToScroll и applyToFling функции. См. Обновленные образцы в документации для примеров того, как реализовать эффект перегодки с новой формой API. ( I8a9c4 , b/2555554340 )
  • Больше типа/нуляции встроенных/устаревших функций ( I24F91 )
  • API -интерфейсы LineBreak и Hyphens в TextStyle градуированы до стабильной. ( IC1E1D )

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

  • Курсор в текстовых полях теперь будет продолжать мигать, даже когда анимации отключены. ( I95E70 , B/265177763 )
  • Modifier.basicMarquee теперь анимирует, даже когда анимации отключены в настройках системы. ( I23389 , B/262298306 , B/265177763 )

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

  • notifyFocusedRect методах TextInputSession и TextInputService больше не устарели. ( I23a04 , b/262648050 )

Версия 1.4.0-альфа04

11 января 2023 г.

androidx.compose.foundation:foundation:1.4.0-alpha04 и androidx.compose.foundation:foundation-layout:1.4.0-alpha04 выпускаются. Версия 1.4.0-Alpha04 содержит эти коммиты.

Новые возможности

  • FlowRow и FlowColumn теперь доступны в виде @ExperimentalFoundationApi , которые позволяют получить более гибкую строку и компоновку на основе столбцов компонентов, которые разорватся на новую линию, если на основной оси недостаточно места. ( I3a7b2 )
  • Modifier.basicMarquee() доступен в качестве экспериментального для отображения контента с эффектом прокрутки шатра. ( I2df44 , b/139321650 )

Изменения API

  • FocusRequesterModifier устарел в пользу FocusRequesterNode ( i7f4d7 , b/247708726 , b/255352203 , b/253043481 , b/247716483 , b/254529934, b/251840112 , b/25185777, b/25714141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414934, b/25301540112 , b/2518577, b/ 257141471414141414141414747
  • Конструктор AndroidFont с variationSettings теперь является стабильным API и может использоваться для создания новых типов дескрипторов шрифтов. ( I5ADCC , B/261565807 )
  • Введен PinnableContainer API, распространяемый Lazy Sists через локальный композицию, который позволяет закреплять ток. Это означает, что такой предмет не будет утилизироваться, когда он прокручивается от представления. Например, Modifier.focusable() будет прикреплять ток, ориентированный на этот механизм. ( IB8881 , B/259274257 , B/195049010 )
  • Перепишите, как прокрутки реагируют на то, чтобы bringIntoViewRequesters и Focusables, чтобы лучше моделировать сложность этих операций и обработать большее количество кромков. ( I2e5fe , b/241591211 , b/192043120 , b/237190748 , b/230756508 , b/239451114 )
  • Больше обнуляемых типов возвращаемых устаревших скрытых функций ( Ibf7b0 )
  • Добавлен экспериментальный TextMotion в TextStyle , чтобы определить текст, чтобы быть Static(default) или анимированной. Используйте TextMotion.Animated , если текст будет масштабирован, переведен или повернут с помощью анимации. ( I24dd7 )
  • Добавить TextFieldFocusModifier , чтобы исправить навигационное поведение фокусировки для Android Platform ( i00303 )
  • Заменил maxSize: IntSize Argrege в drawText с size: Size , который должен быть встроен с другими функциями DrawScope . size устанавливается на Size.Unspecified по умолчанию, что не должно изменять предыдущее поведение по умолчанию. ( ICD27D )

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

  • Корректировки в физике схватки в SnapFlingBehaviour для более естественного ощущения.

Известная проблема

  • При обновлении с androidx.compose.foundation:1.4.0-alpha03 до androidx.compose.foundation:1.4.0-alpha04 , вы можете испытать ошибку java.lang.NoSuchFieldError . Вот где о проблеме было сообщено Оргино. Исправление было отправлено и будет доступно в следующем обновлении Compose. В качестве обхода обновите свои библиотеки androidx.compose.material и androidx.compose.material3 до последней версии (1.1.0-ALPHA04) или понизите свой androidx.compose.foundation до 1.4.0-ALPHA03.

Версия 1.4.0-альфа03

7 декабря 2022 года

androidx.compose.foundation:foundation:1.4.0-alpha03 и androidx.compose.foundation:foundation-layout:1.4.0-alpha03 выпускаются. Версия 1.4.0-Alpha03 содержит эти коммиты.

Изменения API

  • В тестах пользовательского интерфейса с использованием правила композиции продолжения возобновлялись во время обратных вызовов withFrameNanos , не будут отправлены до тех пор, пока не завершены все обратные вызовы кадров. Это соответствует поведению сочинения при нормальном запуске. Тем не менее, тесты, которые полагаются на старое поведение, могут потерпеть неудачу. Это должно повлиять только на код, который вызывает withFrameNanos или withFrameMillis напрямую, и имеет логику вне обратного вызова, передаваемую к тем функциям, которые, возможно, потребуются перемещать внутри обратных вызовов. См. Изменения в анимационном тесте в этом CL для примеров .
  • Добавлены дополнительные onPerformTraversals: (Long) -> Unit для TestMonotonicFrameClock конструктора FrameClclock и заводской функции для запуска кода после обратных вызовов withFrameNanos , но перед возобновлением кораток вызывающих абонентов. ( IDB413 , B/254115946 , B/222093277 , B/255802670 )
  • Внедрить действия доступности страницы: PageUp , PageDown , PageLeft , PageRight . Обратите внимание, что они доступны только от API 29. ( IDA4AB )
  • Введите HorizontalPager и VerticalPager , способ отображения композиционных продуктов в манере. Представил PagerState для контроля пейджеров, а также запроса информации о текущем состоянии пейджера. Invested PageSize , способ управления размером страницы пейджера, это можно использовать для создания карусели, как пейджерс. Введенный PagerSnapDistance , способ контролировать, как будет работать в поведении пейджера. ( I01120 )
  • Представил перегрузку в SnapFlingBehavior.performFling ( I569f6 )
  • Удален OverscrollEffect#isEnabled . Instead of needing to remember and set this flag, just don't dispatch events to the overscroll effect in cases where you do not want overscroll to show (for example if ScrollableState#canScrollForward/backward both return false). ( I1a4b0 , b/255554340 , b/255557085 )
  • Added ScrollableState#canScrollForward and ScrollableState#canScrollBackward to query whether a ScrollableState has room to scroll in either direction (whether it is at the minimum / maximum of its range). This defaults to true for backwards compatibility with existing implementations of ScrollableState . Consumers can use this to show indication to the user that there is still room to scroll, and this could also be used to avoid dispatching delta to ScrollableStates that have no room to scroll in a given direction, to reduce unnecessary work. ( Idf1a0 , b/255557085 )
  • Added an Modifier API to query ancestors scroll info. ( I2ba9d , b/203141462 )
  • Used in Clickable to correctly delay press interactions, when gestures could become scroll events.
  • Fixed Clickables not correctly delaying ripples, when used inside an Scrollable ViewGroup .
  • Updated Drawers and Sheets to correctly delay presses in case gestures can become scroll events.
  • Update snapStepSize naming to be consistent with other methods in SnapLayoutInfoProvider . ( Ife67c )
  • Added EmojiCompat to Compose ( Ibf6f9 , b/139326806 )
  • Renamed consumedWindowInsets() to consumeWindowInsets() and withConsumedWindowInsets() to onConsumedWindowInsetsChanged() and made the Modifiers public. ( Ie44e1 )

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

  • The crash with Modifier.animateItemPlacement() and Lazy grids was fixed. It was happening in some conditions when the new items count is smaller then the previous one. ( I0bcac , b/253195989 )

Версия 1.4.0-альфа02

9 ноября 2022 г.

androidx.compose.foundation:foundation:1.4.0-alpha02 and androidx.compose.foundation:foundation-layout:1.4.0-alpha02 are released. Version 1.4.0-alpha02 contains these commits.

Изменения API

  • awaitFirstDown and waitForUpOrCancellation now accept a PointerEventPass for greater flexibility. ( I7579a , b/212091796 )
  • Revert beyondBoundCount API from Lazy* APIs ( I12197 )
  • Introduced parameter in Lazy APIs to compose and place out of viewport items ( I69e89 , b/172029355 )
  • Added minLines parameter to the BasicText and BasicTextField . It allows to set the minimum height of these composables in terms of number of lines ( I24294 , b/122476634 )

Версия 1.4.0-альфа01

24 октября 2022 г.

androidx.compose.foundation:foundation:1.4.0-alpha01 and androidx.compose.foundation:foundation-layout:1.4.0-alpha01 are released. Version 1.4.0-alpha01 contains these commits.

Изменения API

  • A new method, awaitEachGesture() , for gesture detectors was added. It operates similar to forEachGesture() , but the loop over gestures operates entirely within the AwaitPointerEventScope so events can't be lost between iterations.
  • forEachGesture() has been deprecated in favor of awaitEachGesture() because it allows events to be lost between gestures. ( Iffc3f , b/251260206 )
  • Added WindowInsets.imeAnimationSourc e and WindowInsets.imeAnimationTarget to determine the animation progress and know where the IME will be after animation completes. ( I356f1 , b/217770337 )

Версия 1.3

Version 1.3.1

9 ноября 2022 г.

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

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

  • Fix performance issue in BeyondBoundsLayout ( aosp/2255266 )
  • ContentInViewModifier will not read layout coordinates unless attached ( aosp/2241316 )

Версия 1.3.0

24 октября 2022 г.

androidx.compose.foundation:foundation:1.3.0 and androidx.compose.foundation:foundation-layout:1.3.0 are released. Версия 1.3.0 содержит эти коммиты.

Важные изменения с версии 1.2.0

  • Experimental versions of LazyVerticalStaggeredGrid and LazyHorizontalStaggeredGrid were introduced.
  • SnapFlingBehavior , rememberSnapFlingBehavior and other corresponding APIs were added as experimental.
  • Modifier.clickable , Modifier.toggleable , and Modifier.selectable now show ripples if clicked with the keyboard or d-pad on a remote control.

Версия 1.3.0-rc01

5 октября 2022 г.

androidx.compose.foundation:foundation:1.3.0-rc01 and androidx.compose.foundation:foundation-layout:1.3.0-rc01 are released. Версия 1.3.0-rc01 содержит эти коммиты.

Изменения API

  • Introduced lowVelocityAnimationSpec used by the approach step when there's not enough fling velocity to decay. ( Iaeb27 )
  • Added new experimental API Hyphens to support automatic hyphenation in Text ( Iaa869 )

Version 1.3.0-beta03

21 сентября 2022 г.

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

Изменения API

  • Add options to customize line breaking in Text. ( I86907 )
  • BringIntoViewResponder s are now able to get the most up-to-date bounds of a request while processing it. ( If86a5 , b/241591211 )
  • Introduce support for spacings between items to experimental Staggered Grid ( I10b82 )
  • Introduce content padding to experimental Staggered Grid ( I342ea )
  • Changed size:IntSize argument with constraints: Constraints in TextMeasurer.measure method to support minimum width constraints. ( I37530 , b/242707525 )
  • Added Modifier.withConsumedWindowInsets() to get consumed WindowInsets for use outside windowInsetsPadding .
  • Added MutableWindowInsets to allow easily changing WindowInsets without recomposition. ( I7fd28 , b/237019262 , b/243119659 )

Version 1.3.0-beta02

7 сентября 2022 г.

androidx.compose.foundation:foundation:1.3.0-beta02 and androidx.compose.foundation:foundation-layout:1.3.0-beta02 are released. Version 1.3.0-beta02 contains these commits.

Изменения API

  • Initial version of experimental StaggeredGrid ( Ia48be )
  • Renamed FocusDirection.In and FocusDirection.Out to FocusDirection.Enter and FocusDirection.Exit ( Ia4262 , b/183746982 )
  • Introduced a rememberSnapFlingBehavior overload that provides a quick way of enabling snapping in LazyLists . ( Ifb48a )
  • Replaced the snapFlingBehavior factory with a concrete SnapFlingBehavior class. Scoped SnapLayoutInfoProvider methods to Density to make Dp<->Px conversions easier for the API users. ( I54a11 )
  • Update LazyLayoutMeasureScope.measure to return list of placeables, highlighting desired immutability of the returned value. ( I48b7c )
  • Introduced SnapLayoutInfoProvider which takes a LazyListState to create an instance of SnapLayoutInfoProvider that can be used to enable a snap FlingBehavior for LazyLists . ( I2dd10 )

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

  • Refactors AwaitPointerEventScope#awaitLongPressOrCancellation to match other await functions ( I646e6 )

Версия 1.3.0-бета01

24 августа 2022 г.

androidx.compose.foundation:foundation:1.3.0-beta01 and androidx.compose.foundation:foundation-layout:1.3.0-beta01 are released. Версия 1.3.0-beta01 содержит эти коммиты.

Изменения API

  • Removed pointerPosition from OverscrollEffect - effects that care about pointer position can use Modifier.pointerInput { } in the effectModifier to get the current pointer position instead. ( I9f606 , b/241239306 )
  • Exposed AwaitPointerEventScope#awaitLongPressOrCancellation as additional building block for more complex gesture detection ( I04374 , b/181577176 )
  • Introduced lazyListSnapLayoutInfoProvider to enable snapping in Lazy Lists. ( I3ecdf )
  • Introduced SnapFlingBehavior , a fling behavior that enables list snapping. Provide an instance of SnapLayoutInfoProvider with information about your snapping layout. ( Ie754c )

Версия 1.3.0-альфа03

10 августа 2022 г.

androidx.compose.foundation:foundation:1.3.0-alpha03 and androidx.compose.foundation:foundation-layout:1.3.0-alpha03 are released. Версия 1.3.0-alpha03 содержит эти коммиты.

Изменения API

  • Resource Fonts now support setting font variation settings (API 26+). ( I900dd , b/143703328 )
  • Variable font support in DeviceFontFamilyNameFont ( Ic1279 , b/143703328 )
  • Removed experimental annotation from PlatformTextStyle and LineHeightStyle . ( I64bef )
  • Text fields will now throw more detailed exceptions when the OffsetMapping provided by a VisualTransformation returns invalid indices. ( Ie73f9 , b/229378536 )
  • Introduce experimental APIs to share item provider logic between Lazy layouts. ( Ic891c )
  • ScrollableDefaults.reverseDirection() is not experimental anymore. ( Iba646 )
  • Deprecated SemanticsModifier.id and moved the semantics id to LayoutInfo.semanticsId instead. ( Iac808 , b/203559524 )
  • checkScrollableContainerConstraints() is not experimental anymore. ( I2c290 )
  • Modifier.clipScrollableContainer() is not experimental anymore. ( Ia2b44 )
  • Deprecate TextInputService.show|hideSoftwareKeyboard . Please use SoftwareKeyboardController instead in app code and TextInputSession in IME-management code. ( I14e4c , b/183448615 )

Версия 1.3.0-альфа02

27 июля 2022 г.

androidx.compose.foundation:foundation:1.3.0-alpha02 and androidx.compose.foundation:foundation-layout:1.3.0-alpha02 are released. Версия 1.3.0-alpha02 содержит эти коммиты.

Изменения API

  • Added drawText extension function on DrawScope to provide a way to draw multi-styled text on composables and modifiers that operate on a DrawScope like Canvas and drawBehind . ( I16a62 , b/190787898 )

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

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

Версия 1.3.0-альфа01

29 июня 2022 г.

androidx.compose.foundation:foundation:1.3.0-alpha01 and androidx.compose.foundation:foundation-layout:1.3.0-alpha01 are released. Версия 1.3.0-alpha01 содержит эти коммиты.

Изменения API

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

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

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

Версия 1.2

Version 1.2.1

10 августа 2022 г.

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

Версия 1.2.0

27 июля 2022 г.

androidx.compose.foundation:foundation:1.2.0 and androidx.compose.foundation:foundation-layout:1.2.0 are released. Версия 1.2.0 содержит эти коммиты.

Важные изменения с версии 1.1.0

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

Version 1.2.0-rc03

29 июня 2022 г.

androidx.compose.foundation:foundation:1.2.0-rc03 and androidx.compose.foundation:foundation-layout:1.2.0-rc03 are released. Version 1.2.0-rc03 contains these commits.

  • No changes since 1.2.0-rc02.

Version 1.2.0-rc02

22 июня 2022 г.

androidx.compose.foundation:foundation:1.2.0-rc02 and androidx.compose.foundation:foundation-layout:1.2.0-rc02 are released. Version 1.2.0-rc02 contains these commits.

Версия 1.2.0-rc01

15 июня 2022 г.

androidx.compose.foundation:foundation:1.2.0-rc01 and androidx.compose.foundation:foundation-layout:1.2.0-rc01 are released. Версия 1.2.0-rc01 содержит эти коммиты.

Изменения API

  • An experimental OverscrollEffect has been introduced to allow for custom overscroll effects, alongside the Modifier.scrollable overloads that accept it.
  • Experimental LocalOverScrollConfiguration has been moved from foundation.gesture to foundation package and renamed to LocalOverscrollConfiguration ( If19fb , b/204650733 )
  • Interfaces in compose libraries are now built using jdk8 default interface methods ( I5bcf1 )
  • Introduced an experimental api checkScrollableContainerConstraints() which allows to check that we do not nest scrollable containers. You can use it when create your own scrollable lazy layouts via LazyLayout . ( Id6fab , b/233352497 )
  • Removed deprecated LazyVerticalGrid from androidx.compose.foundation.lazy package. The new stable api is located in androidx.compose.foundation.lazy.grid ( I73c76 , b/225192009 )

Version 1.2.0-beta03

1 июня 2022 г.

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

Изменения API

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

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

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

Version 1.2.0-beta02

18 мая 2022 г.

androidx.compose.foundation:foundation:1.2.0-beta02 and androidx.compose.foundation:foundation-layout:1.2.0-beta02 are released. Version 1.2.0-beta02 contains these commits.

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

Версия 1.2.0-бета01

11 мая 2022 г.

androidx.compose.foundation:foundation:1.2.0-beta01 and androidx.compose.foundation:foundation-layout:1.2.0-beta01 are released. Версия 1.2.0-beta01 содержит эти коммиты.

Новые возможности

  • This is the first beta release of 1.2!

Изменения API

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

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

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

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

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

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

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

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

Version 1.2.0-alpha08

20 апреля 2022 г.

androidx.compose.foundation:foundation:1.2.0-alpha08 and androidx.compose.foundation:foundation-layout:1.2.0-alpha08 are released. Version 1.2.0-alpha08 contains these commits.

Изменения API

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

Версия 1.2.0-альфа07

6 апреля 2022 г.

androidx.compose.foundation:foundation:1.2.0-alpha07 and androidx.compose.foundation:foundation-layout:1.2.0-alpha07 are released. Version 1.2.0-alpha07 contains these commits.

Изменения API

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

Версия 1.2.0-альфа06

23 марта 2022 г.

androidx.compose.foundation:foundation:1.2.0-alpha06 and androidx.compose.foundation:foundation-layout:1.2.0-alpha06 are released. Версия 1.2.0-alpha06 содержит эти коммиты.

Изменения API

  • Added RequestFocus semantics action to request focus on the focusable target. ( I17b71 )
  • FocusOrder has now been merged into FocusProperties and focusProperties() now has all the capabilities of focusOrder() . FocusOrder and focusOrder() have been deprecated. focusOrder() that accepts a focusRequester should be replaced with a focusRequester() modifier in combination with focusProperties() . This allows the modifiers to have a stronger separation of concerns. ( I601b7 )
  • WindowInsets.asPaddingValues(Density) was added to allow developers to do the conversion without needing to be in composition. ( I94c35 )
  • 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 )

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

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

Версия 1.2.0-альфа05

9 марта 2022 г.

androidx.compose.foundation:foundation:1.2.0-alpha05 and androidx.compose.foundation:foundation-layout:1.2.0-alpha05 are released. Версия 1.2.0-alpha05 содержит эти коммиты.

Изменения API

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

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

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

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

  • Updated to use Kotlinx coroutines 1.6.0 ( I3366d )

Версия 1.2.0-альфа04

23 февраля 2022 г.

androidx.compose.foundation:foundation:1.2.0-alpha04 and androidx.compose.foundation:foundation-layout:1.2.0-alpha04 are released. Версия 1.2.0-alpha04 содержит эти коммиты.

Изменения API

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

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

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

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

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

Версия 1.2.0-альфа03

9 февраля 2022 г.

androidx.compose.foundation:foundation:1.2.0-alpha03 and androidx.compose.foundation:foundation-layout:1.2.0-alpha03 are released. Версия 1.2.0-alpha03 содержит эти коммиты.

Изменения API

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

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

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

Version 1.2.0-alpha02

26 января 2022 г.

androidx.compose.foundation:foundation:1.2.0-alpha02 and androidx.compose.foundation:foundation-layout:1.2.0-alpha02 are released. Версия 1.2.0-alpha02 содержит эти коммиты.

Изменения API

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

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

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

Версия 1.2.0-альфа01

12 января 2022 г.

androidx.compose.foundation:foundation:1.2.0-alpha01 and androidx.compose.foundation:foundation-layout:1.2.0-alpha01 are released. Версия 1.2.0-alpha01 содержит эти коммиты.

Изменения API

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

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

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

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

  • Now depends on Kotlin 1.6.10 .

Версия 1.1

Version 1.1.1

23 февраля 2022 г.

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

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

Версия 1.1.0

9 февраля 2022 г.

androidx.compose.foundation:foundation:1.1.0 and androidx.compose.foundation:foundation-layout:1.1.0 are released. Версия 1.1.0 содержит эти коммиты.

Важные изменения с версии 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.foundation:foundation:1.1.0-rc03 and androidx.compose.foundation:foundation-layout: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.foundation:foundation:1.1.0-rc01 and androidx.compose.foundation:foundation-layout:1.1.0-rc01 are released. Версия 1.1.0-rc01 содержит эти коммиты.

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

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

Version 1.1.0-beta04

1 декабря 2021 г.

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

Новые возможности

  • Updated to be compatible with Kotlin 1.6.0

Изменения API

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

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

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

Version 1.1.0-beta03

17 ноября 2021 г.

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

Изменения API

  • Support for horizontal spans was added to LazyVerticalGrid. ( I7e2fa , b/176758183 )
  • Experimental ability to animate Lazy lists item positions was added. There is a new modifier available within LazyItemScope called Modifier.animateItemPlacement() . Usage example:

      var list by remember { mutableStateOf(listOf("A", "B", "C")) }
      LazyColumn {
          item {
              Button(onClick = { list = list.shuffled() }) {
                  Text("Shuffle")
              }
          }
          items(list, key = { it }) {
              Text("Item $it", Modifier.animateItemPlacement())
          }
      }
    
    • When you provide a key via LazyListScope.item or LazyListScope.items this modifier will enable item reordering animations. Aside from item reordering all other position changes caused by events like arrangement or alignment changes will also be animated. ( I59e7b , b/150812265 )

Version 1.1.0-beta02

3 ноября 2021 г.

androidx.compose.foundation:foundation:1.1.0-beta02 and androidx.compose.foundation:foundation-layout:1.1.0-beta02 are released. Version 1.1.0-beta02 contains these commits.

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

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

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

  • Added Modifier.pointerHoverIcon ( I95f01 )

Версия 1.1.0-бета01

27 октября 2021 г.

androidx.compose.foundation:foundation:1.1.0-beta01 and androidx.compose.foundation:foundation-layout:1.1.0-beta01 are released. Версия 1.1.0-beta01 содержит эти коммиты.

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

  • Added experimental BringIntoView API that lets you send a request to parents so that they scroll to bring an item into view ( Ib918d , b/195353459 )

Версия 1.1.0-альфа06

13 октября 2021 г.

androidx.compose.foundation:foundation:1.1.0-alpha06 and androidx.compose.foundation:foundation-layout:1.1.0-alpha06 are released. Версия 1.1.0-alpha06 содержит эти коммиты.

Изменения API

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

Версия 1.1.0-альфа05

29 сентября 2021 г.

androidx.compose.foundation:foundation:1.1.0-alpha05 and androidx.compose.foundation:foundation-layout:1.1.0-alpha05 are released. Версия 1.1.0-alpha05 содержит эти коммиты.

Изменения API

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

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

Версия 1.1.0-альфа04

15 сентября 2021 г.

androidx.compose.foundation:foundation:1.1.0-alpha04 and androidx.compose.foundation:foundation-layout:1.1.0-alpha04 are released. Версия 1.1.0-alpha04 содержит эти коммиты.

Изменения API

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

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

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

Версия 1.1.0-альфа03

1 сентября 2021 г.

androidx.compose.foundation:foundation:1.1.0-alpha03 and androidx.compose.foundation:foundation-layout:1.1.0-alpha03 are released. Версия 1.1.0-alpha03 содержит эти коммиты.

Новые возможности

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

Изменения API

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

Версия 1.1.0-альфа02

18 августа 2021 г.

androidx.compose.foundation:foundation:1.1.0-alpha02 and androidx.compose.foundation:foundation-layout:1.1.0-alpha02 are released. Версия 1.1.0-alpha02 содержит эти коммиты.

Изменения API

Версия 1.1.0-альфа01

4 августа 2021 г.

androidx.compose.foundation:foundation:1.1.0-alpha01 and androidx.compose.foundation:foundation-layout:1.1.0-alpha01 are released. Версия 1.1.0-alpha01 содержит эти коммиты.

Изменения API

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

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

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

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

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

Версия 1.0

Version 1.0.5

3 ноября 2021 г.

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

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

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

Version 1.0.4

13 октября 2021 г.

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

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

  • Updated to depend on Kotlin 1.5.31

Version 1.0.3

29 сентября 2021 г.

androidx.compose.foundation:foundation:1.0.3 and androidx.compose.foundation:foundation-layout: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.foundation:foundation:1.0.2 and androidx.compose.foundation:foundation-layout: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.foundation:foundation:1.0.1 and androidx.compose.foundation:foundation-layout:1.0.1 are released. Версия 1.0.1 содержит эти коммиты.

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

  • Updated to depend on Kotlin 1.5.21 .

Версия 1.0.0

28 июля 2021 г.

androidx.compose.foundation:foundation:1.0.0 and androidx.compose.foundation:foundation-layout:1.0.0 are released. Версия 1.0.0 содержит эти коммиты.

Основные особенности версии 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.foundation:foundation:1.0.0-rc02 and androidx.compose.foundation:foundation-layout:1.0.0-rc02 are released. Version 1.0.0-rc02 contains these commits.

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

Версия 1.0.0-rc01

1 июля 2021 г.

androidx.compose.foundation:foundation:1.0.0-rc01 and androidx.compose.foundation:foundation-layout:1.0.0-rc01 are released. Версия 1.0.0-rc01 содержит эти коммиты.

Изменения API

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

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

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

Version 1.0.0-beta09

16 июня 2021 г.

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

Изменения API

  • Removed ManualFrameClock . If you need to control animations, use composeTestRule.mainClock instead. ( I3c3e8 , b/189951065 )
  • change enum Role and LiveRegionMode to inline classes with private constructor ( Id1890 )
  • KeyboardCapitalization is converted into inline class. ( Id5a1c )
  • TextOverflow is changed to an inline class. ( I433af )

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

  • Now when you specify the unique keys for LazyColumn/Row items the scroll position will be maintained based on the key, which means if you add/remove items before the current visible item the item with the given key will be kept as the first visible one . ( Id263f , b/184257857 )
  • Key constants are @ExperimentalComposeUiApi for now. Consuming code can declare private constants prior to stabilization. ( Ia5d48 )
  • Added IdlingStrategy to AndroidComposeTestRule that can be used by testing frameworks to install an alternative mechanism to await or achieve quiescence. Use AndroidComposeTestRule.setIdlingStrategyFactory() before your test starts to install your own strategy. ( I608fa )

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.foundation:foundation:1.0.0-beta08 and androidx.compose.foundation:foundation-layout:1.0.0-beta08 are released. Version 1.0.0-beta08 contains these commits.

Изменения API

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

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

  • Fix crashes of long press the blank area in non-empty text. ( I33ab5 , b/187437299 )
  • Show Toolbar after SelectAll ( I495d9 , b/185919613 )
  • Fix for scrollable containers clipping its children on the cross axis. It was easily reproducible if you have a LazyRow with Card items. now the shadow will not be clipped. ( Icb635 , b/186318448 )
  • Fixed an issue where ripples / other indication would sometimes get stuck on a long click when using Modifier.combinedClickable ( I2298c , b/186223077 )
  • 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.foundation:foundation:1.0.0-beta07 and androidx.compose.foundation:foundation-layout:1.0.0-beta07 are released. Version 1.0.0-beta07 contains these commits.

Изменения API

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

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

Version 1.0.0-beta06

5 мая 2021 г.

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

Изменения API

  • Solve Conflict with Navigation Gesture ( I1145e )
  • Added CollectionInfo and CollectionItemInfo accessibility APIs that allows to mark collection and its items for accessibility services ( Id54ef , b/180479017 )
  • Added SemanticsActions.ScrollToIndex to scroll a list with indexed items to the item with a certain index, and SemanticsProperties.IndexForKey to get the index of an item in a list with keyed items. Both actions are implemented by LazyList.
    • Added SemanticsNodeInteraction.performScrollToIndex that scrolls a list to the given index, and SemanticsNodeInteraction.performScrollToKey that scrolls a list to the item with the given key. ( I4fe63 , b/178483889 , b/161584524 )
  • AnnotatedString save support to TextFieldValue.Saver. Added addTtsAnnotation and withAnnotation utility functions to AnnotatedString.Builder ( I8cbdc , b/178446304 )
  • Default 0.dp parameter values were added to PaddingValues(horizontal, vertical) ( I05571 , b/181336792 )

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

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

Version 1.0.0-beta05

21 апреля 2021 г.

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

Изменения API

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

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

  • Fixed ACTION_SCROLL_FORWARD , ACTION_SCROLL_BACKWARD , accessibilityActionScrollLeft , accessibilityActionScrollUp , accessibilityActionScrollRight and accessibilityActionScrollDown accessibility scroll actions. Instead of scrolling to the end of the scrollable, it will now scroll by one screen in the given direction. ( Ieccb0 )
  • Файлы AndroidManifest из UI-test-Manifest и UI-Tooling-Data в настоящее время совместимы с Android 12 ( i6f9de , b/184718994 )

Version 1.0.0-beta04

7 апреля 2021 г.

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

Изменения API

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

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

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

    To summarize, consider the example:

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

    Prior to this change, the ShowCount composable function would always skip, even after the count parameter was updated. Это уже не так. ( I5648a )

Version 1.0.0-beta03

24 марта 2021 г.

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

Изменения API

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

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

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

Версия 1.0.0-бета02

10 марта 2021 г.

androidx.compose.foundation:foundation:1.0.0-beta02 and androidx.compose.foundation:foundation-layout:1.0.0-beta02 are released. Версия 1.0.0-beta02 содержит эти коммиты.

Изменения API

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

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

Version 1.0.0-beta01

24 февраля 2021 г.

androidx.compose.foundation:foundation:1.0.0-beta01 and androidx.compose.foundation:foundation-layout:1.0.0-beta01 are released. Версия 1.0.0-beta01 содержит эти коммиты.

This is the first release of Compose 1.0.0 Beta.

Изменения API

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

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

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

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

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

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

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

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

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

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

  • Removed runBlockingWithManualClock ( I15cdc , b/179664814 )

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

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

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

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

  • defaultMinSizeConstraints was renamed to defaultMinSize. ( I4eaae )

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

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

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

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

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

  • Providers has been renamed to CompositionLocalProvider

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

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

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

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

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

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

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

Версия 1.0.0-альфа12

10 февраля 2021 г.

androidx.compose.foundation:foundation:1.0.0-alpha12 and androidx.compose.foundation:foundation-layout:1.0.0-alpha12 are released. Версия 1.0.0-alpha12 содержит эти коммиты.

Изменения API

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

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

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

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

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

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

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

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

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

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

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

  • Selection was moved to foundation. ( I7892b )

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

  • Added password semantics for accessibility ( I231ce )

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Версия 1.0.0-альфа11

28 января 2021 г.

androidx.compose.foundation:foundation:1.0.0-alpha11 and androidx.compose.foundation:foundation-layout:1.0.0-alpha11 are released. Версия 1.0.0-alpha11 содержит эти коммиты.

Изменения API

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

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

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

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

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

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

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

  • Removed data class from the following classes:

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

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

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

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

  • The propagateMinConstraints parameter was added to Box, for specifying whether the incoming min constraints should be passed to the content of the Box or not. По умолчанию — ложь. ( I0125b , b/152613457 )

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

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

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

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

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

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

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

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

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

  • RememberObserver replaces CompositionLifecycleObserver and CompositionLifecycleObserver is now deprecated.

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

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

  • Renamed TransformedText.transformedText to TransformedText.text

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

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

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

  • Please use ImeAction.None instead of ImeAction.NoAction

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

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

  • Changed VisualTransformation to be a functional interface ( I3bba4 )

  • Leverage TestCoroutineDispatcher in testing ( I532b6 )

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

  • Renamed TextInputService.onStateUpdated as updateState ( Id4853 )

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

Версия 1.0.0-альфа10

13 января 2021 г.

androidx.compose.foundation:foundation:1.0.0-alpha10 and androidx.compose.foundation:foundation-layout:1.0.0-alpha10 are released. Версия 1.0.0-alpha10 содержит эти коммиты.

Изменения API

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

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

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

Версия 1.0.0-альфа09

16 декабря 2020 г.

androidx.compose.foundation:foundation:1.0.0-alpha09 and androidx.compose.foundation:foundation-layout:1.0.0-alpha09 are released. Версия 1.0.0-alpha09 содержит эти коммиты.

Изменения API

  • Add Scrollable interface

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

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

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

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

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

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

  • Removed ExperimentalPointerInput annotation ( Ia7a24 )

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  • AndroidOwner made internal ( Ibcad0 , b/170296980 )

  • New infiniteRepeatable function for creating an InfiniteRepeatableSpec ( I668e5 )

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

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

    A new method, insertBottomUp() , was added.

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

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

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

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

Версия 1.0.0-альфа08

2 декабря 2020 г.

androidx.compose.foundation:foundation:1.0.0-alpha08 and androidx.compose.foundation:foundation-layout:1.0.0-alpha08 are released. Версия 1.0.0-alpha08 содержит эти коммиты.

Изменения API

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

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

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

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

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

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

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

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

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

Версия 1.0.0-альфа07

11 ноября 2020 г.

androidx.compose.foundation:foundation:1.0.0-alpha07 , androidx.compose.foundation:foundation-layout:1.0.0-alpha07 , and androidx.compose.foundation:foundation-text:1.0.0-alpha07 are released. Версия 1.0.0-alpha07 содержит эти коммиты.

Изменения API

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

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

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

Версия 1.0.0-альфа06

28 октября 2020 г.

androidx.compose.foundation:foundation:1.0.0-alpha06 , androidx.compose.foundation:foundation-layout:1.0.0-alpha06 , and androidx.compose.foundation:foundation-text:1.0.0-alpha06 are released. Версия 1.0.0-alpha06 содержит эти коммиты.

Изменения API

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

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

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

Версия 1.0.0-альфа05

14 октября 2020 г.

androidx.compose.foundation:foundation:1.0.0-alpha05 , androidx.compose.foundation:foundation-layout:1.0.0-alpha05 , and androidx.compose.foundation:foundation-text:1.0.0-alpha05 are released. Версия 1.0.0-alpha05 содержит эти коммиты.

Изменения API

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

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

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

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

Версия 1.0.0-альфа04

1 октября 2020 г.

androidx.compose.foundation:foundation:1.0.0-alpha04 , androidx.compose.foundation:foundation-layout:1.0.0-alpha04 , and androidx.compose.foundation:foundation-text:1.0.0-alpha04 are released. Версия 1.0.0-alpha04 содержит эти коммиты.

Изменения API

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

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

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

Версия 1.0.0-альфа03

16 сентября 2020 г.

androidx.compose.foundation:foundation:1.0.0-alpha03 , androidx.compose.foundation:foundation-layout:1.0.0-alpha03 , and androidx.compose.foundation:foundation-text:1.0.0-alpha03 are released. Версия 1.0.0-alpha03 содержит эти коммиты.

Изменения API

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

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

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

Версия 1.0.0-альфа02

2 сентября 2020 г.

androidx.compose.foundation:foundation:1.0.0-alpha02 , androidx.compose.foundation:foundation-layout:1.0.0-alpha02 , and androidx.compose.foundation:foundation-text:1.0.0-alpha02 are released. Версия 1.0.0-alpha02 содержит эти коммиты.

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

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

    Например:

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

    ( I0a85b , b/161247083 )

Версия 1.0.0-альфа01

26 августа 2020 г.

androidx.compose.foundation:foundation:1.0.0-alpha01 , androidx.compose.foundation:foundation-layout:1.0.0-alpha01 , and androidx.compose.foundation:foundation-text:1.0.0-alpha01 are released. Версия 1.0.0-alpha01 содержит эти коммиты.

Version 0.1.0-dev

Version 0.1.0-dev17

19 августа 2020 г.

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

Изменения API

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

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

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

Version 0.1.0-dev16

5 августа 2020 г.

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

Изменения API

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

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

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

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

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

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

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

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

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

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

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

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

  • Renamed AndroidComposeTestRule to createAndroidComposeRule. ( I70aaf )

  • Add accessibility action to get TextLayoutResult ( I9d6e6 )

Version 0.1.0-dev15

22 июля 2020 г.

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

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

Dependencies Update

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

Изменения API

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

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

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

  • Add cursor color customisation to the TextField ( I6e33f )

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

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

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

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

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

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

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

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

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

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

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

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

  • Improve DrawModifier API:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  • rename Border modifier to DrawBorder ( I8ffcc )

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

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

  • Replaced DrawBorder in favor of Border Modifier ( Id335a )

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  • Added symmetric padding modifier. ( I39840 )

  • Removed deprecated LayoutAspectRatio modifier. ( I65a74 )

  • Removed deprecated LayoutAlign modifiers. ( I10877 )

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

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

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

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

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

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

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

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

  • Removed deprecated Wrap and Center composables. ( I29e23 )

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

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

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

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

  • Initial support for Rtl in Compose layout ( Ia5519 )

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

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

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

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

  • Implements LongPressAndDrag for TextField Selection. ( I17919 )

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  • Renamed LayoutResult to MeasureResult. ( Id8c68 )

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  • Renamed LayoutModifier2 to LayoutModifier. ( Id29f3 )

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

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

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

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

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

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

  • WithConstraints got LayoutDirection parameter ( I6d6f7 )

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

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

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

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

  • Improvements to the API surface of Constraints ( I0fd15 )

  • Added TextDirection.Content ( I48f36 )

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

  • Add FloatingToolbar for TextField Selection. ( Ie8b07 )

  • TextDirectionAlgorithm is renamed as TextDirection ( I75ce8 )

  • TextDirection is renamed as ResolvedTextDirection ( I3ff38 )

  • Add HapticFeedback to TextField Selection. ( I58050 )

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

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

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

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

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

  • Add Toolbar for text related operations. ( I49d53 )

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

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