макетирование одежды

This library allows defining a set of UI layouts and non-UI expressions to be rendered/evaluated on remote surfaces.
Последнее обновление Стабильный релиз Предварительная версия релиза Бета-версия Альфа-версия
1 июля 2026 г. 1.4.1 - - -

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

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

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

классный

dependencies {
    // Use to implement support for Wear ProtoLayout Expressions
    implementation "androidx.wear.protolayout:protolayout-expression:1.4.1"

    // Use to implement support for Wear ProtoLayout
    implementation "androidx.wear.protolayout:protolayout:1.4.1"

    // Use to utilize components and layouts with Material design in your ProtoLayout
    implementation "androidx.wear.protolayout:protolayout-material:1.4.1"
}

Котлин

dependencies {
    // Use to implement support for Wear ProtoLayout Expressions
    implementation("androidx.wear.protolayout:protolayout-expression:1.4.1")

    // Use to implement support for Wear ProtoLayout
    implementation("androidx.wear.protolayout:protolayout:1.4.1")

    // Use to utilize components and layouts with Material design in your ProtoLayout
    implementation("androidx.wear.protolayout:protolayout-material:1.4.1")
}
,

классный

dependencies {
    // Use to implement support for Wear ProtoLayout Expressions
    implementation "androidx.wear.protolayout:protolayout-expression:1.4.1"

    // Use to implement support for Wear ProtoLayout
    implementation "androidx.wear.protolayout:protolayout:1.4.1"

    // Use to utilize components and layouts with Material design in your ProtoLayout
    implementation "androidx.wear.protolayout:protolayout-material:1.4.1"
}

Котлин

dependencies {
    // Use to implement support for Wear ProtoLayout Expressions
    implementation("androidx.wear.protolayout:protolayout-expression:1.4.1")

    // Use to implement support for Wear ProtoLayout
    implementation("androidx.wear.protolayout:protolayout:1.4.1")

    // Use to utilize components and layouts with Material design in your ProtoLayout
    implementation("androidx.wear.protolayout:protolayout-material:1.4.1")
}

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

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

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

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

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

Версия 1.4

Версия 1.4.1

1 июля 2026 г.

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

Устранение уязвимостей и повышение безопасности

  • Для предотвращения исчерпания памяти введено ограничение на размер изображений 2048px и максимальный размер исходного файла 20MB .
  • Устранена ошибка, позволявшая пропускать проверку глубины компоновки при оптимизации по отпечаткам элементов, что обеспечило принудительное выполнение проверок глубины для глубоких макетов.
  • Предотвращено исключение/сбой, вызванный недопустимыми параметрами зазора в DashedArcLine , из-за превышения допустимых значений параметров.
  • Replaced uncaught IllegalArgumentExceptions with safer error logging and node invalidation in expression pipeline .
  • Исправлена ​​необработанная ошибка NullPointerException при обработке некорректных URI изображений .

Версия 1.4.0

25 марта 2026 г.

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

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

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

  • Выпуск 1.4.0-beta01 библиотеки Wear ProtoLayout указывает на то, что данная версия библиотеки полностью функциональна, а API заблокирован (за исключением тех мест, которые помечены как экспериментальные). Wear ProtoLayout 1.4 включает следующие новые функции и API:
    • Inlined Image Resources and performance improvements: Introduced an improved resource handling concept where ImageResource can be directly inlined within the layout itself.
    • Material3TileService: Introduced a new, Kotlin-friendly service for creating tiles. It simplifies development by providing a single suspend function to return both tile layout and resources. It automatically manages the MaterialScope and ProtoLayoutScope for better resource handling and performance improvements on faster Tiles loading.
    • Обновление предварительного просмотра тайлов: Инструменты для предварительного просмотра тайлов были обновлены для поддержки новой автоматической обработки ресурсов ProtoLayoutScope , что гарантирует корректное отображение встроенных ресурсов в предварительном просмотре без дополнительной настройки.
    • Многочисленные улучшения Kotlin DSL: добавлены специализированные вспомогательные функции Kotlin для Tile и всех других API, необходимых для создания плиток (например, Timeline ), чтобы улучшить опыт разработчиков для пользователей Kotlin.
    • Dynamic Service Switching: Introduced METADATA_GROUP_KEY , allowing developers to group multiple TileService instances in the manifest. This enables dynamic switching between different services that represent the same tile on new OS versions.
    • Tile ID in Updates: Developers can now specify a particular tileId in update requests, allowing for more granular control over which tile instances are refreshed.
    • Увеличены требования к версии Compile SDK: для поддержки нового Material3TileService и расширенной обработки ресурсов требование к версии compileSdk увеличено до 35 .
    • Предотвращение ошибок ANR: Логика отмены привязки во время запросов на обновление тайлов перенесена в фоновый поток для предотвращения ошибок «Приложение не отвечает» (ANR).
    • Для корректной работы с данными о частоте сердечных сокращений необходимо добавить аннотацию RequiresPermission: начиная с API 36, для вызова PlatformHealthSources.heartRateBpm или PlatformHealthSources.heartRateAccuracy требуется предоставить вызывающему приложению разрешение android.health.connect.HealthPermissions.READ_HEART_RATE .

Версия 1.4.0-rc02

11 марта 2026 г.

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

изменения API

  • Starting from API 36, accessing heart rate data, such as via ProtoLayout Expressions library with PlatformHealthSources.heartRateBpm and PlatformHealthSources.heartRateAccuracy needs android.health.connect.HealthPermissions.READ_HEART_RATE permission to be granted to the calling App.

Версия 1.4.0-rc01

25 февраля 2026 г.

androidx.wear.protolayout:protolayout-*:1.4.0-rc01 is released with no changes from the previous release. Version 1.4.0-rc01 contains these commits .

Version 1.4.0-beta01

11 февраля 2026 г.

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

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

Выпуск 1.4.0-beta01 библиотеки Wear ProtoLayout указывает на то, что данная версия библиотеки полностью функциональна, а API заблокирован (за исключением тех мест, которые помечены как экспериментальные). Wear ProtoLayout 1.4 включает следующие новые функции и API:

  • Inlined Image Resources and performance improvements: Introduced an improved resource handling concept where ImageResource can be directly inlined within the layout itself.
    • Это значительно упрощает разработку, устраняя необходимость в ручном сопоставлении ресурсов в методе onTileResourcesRequest и переопределяя этот метод.
    • This significantly improves Tiles loading time by removing the need for two binder calls as only the onTileResourcesRequest method can be implemented.
    • Теперь все API Image поддерживают эту концепцию, предоставляя новые методы, которые принимают ProtoLayoutScope отвечающий за это.
  • Material3 Scope & Resources Auto-Registration: Added materialScopeWithResources to support the Material3 MaterialScope concept with the Inline Image Resources. This scope handles automatic resource registration and includes new helper methods for images ( backgroundImage , avatarImage , and icon ) to streamline components usage.

    • Упрощенный фрагмент кода:

      materialScopeWithResources(
      context = context,
      deviceConfiguration = deviceParameters,
          protoLayoutScope = protoLayoutScope) {
        primaryLayout(
        // layout setup here
      iconContent = { **icon**(
      **imageResource**(
      **androidImageResource**(R.drawable.myIcon)))})
      //…
      }
      
  • Поддержка PendingIntent: Добавлена ​​поддержка PendingIntent для плиток. Кликабельные элементы PendingIntent принимают резервные действия ( LoadAction или LaunchAction ). Это гарантирует, что если ProtoLayout Renderer — более старая версия, не поддерживающая PendingIntent , автоматически будет использовано допустимое резервное действие.

  • Много улучшений в Kotlin DSL:

    • Добавлены специализированные вспомогательные функции Kotlin для типов Image и всех ImageResources , чтобы улучшить удобство работы разработчиков с Kotlin.
    • Добавлены вспомогательные функции для таких типов контейнеров, как Box , Row , Column и т. д., чтобы лучше соответствовать современным требованиям разработки под Android.
    • Добавлен новый модификатор Kotlin Transformation и вспомогательные методы для анимации плавного появления.
  • Настройка анимации Lottie: добавлен API в AndroidLottieResourceByResId , позволяющий настраивать анимацию Lottie через свойства, а также добавлена ​​конкретная поддержка и API для создания свойства, позволяющего оформить слот на основе его ID с указанным цветом.

  • Поддержка режима Ambient Mode: добавлен новый источник событий платформы, isInAmbientMode , позволяющий макетам реагировать и обновлять выражения в зависимости от того, находится ли устройство в режиме Ambient Mode.

Изменения в API

  • Вспомогательные функции для работы с изображениями в Material3: Существующие вспомогательные функции для работы с изображениями в Material3 устарели, вместо них добавлены новые перегрузки, использующие ProtoLayoutScope и новую обработку встроенных ресурсов.
  • Обновления MaterialScope: Поле protoLayoutScope в MaterialScope имеет значение NonNull для упрощения использования при создании с помощью materialScopeWithResources . Добавлена ​​новая функция hasProtoLayoutScope для проверки его наличия. MaterialScope также предоставляет доступ к общедоступному полю для Context .
  • Semantics heading is available as an API in LayoutModifier .
  • Поддержка направления дуги. Константы ARC_DIRECTION_* теперь доступны в открытом доступе для использования в элементах Arc / ArcLine / ArcText / DashedArcLine .

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

  • Resource Comparison: Optimized performance by implementing improved hash and equals methods for comparing resource types.
  • Применить описание содержимого по умолчанию к текстовой кнопке с одним слотом.
  • Исправить вычисления для корректировки максимального количества строк на стороне рендерера.

Версия 1.4.0-alpha05

28 января 2026 г.

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

Изменения в API

  • Добавлен новый модификатор Transformation Kotlin. ( I195a7 , b/397169191 )

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

  • Мы исправили проблему, улучшив обработку ресурсов за счет удаления stateful ProtoLayoutScope из TileService . ( I5dc0a , b/474614772 )

Version 1.4.0-alpha04

14 января 2026 г.

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

Изменения в API

  • We have deprecated Material3 image helpers in favour of new overloads that are using ProtoLayoutScope and better resources handling concept where ImageResource can be directly inlined in the layout itself, removing the need for onTileResourcesRequest method for resources mappings. For the best experience, use it with androidx.wear.tiles.Material3TileService added in Wear Tiles 1.6-alpha04 version. ( I8198c , b/440376391 )

Версия 1.4.0-alpha03

17 декабря 2025 г.

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

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

  • Comparing two resources types for the better resource handling and performance improvements is now done using the optimized hash and equals methods. ( 82f21b2f )

Версия 1.4.0-alpha02

22 октября 2025 г.

androidx.wear.protolayout:protolayout-*:1.4.0-alpha02 is released. Version 1.4.0-alpha02 contains these commits .

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

  • Added new Platform event source ( isInAmbientMode ) describing whether the device is in ambient mode or not ( Ief832 )

Изменения в API

  • Теперь clickable элемент PendingIntent принимает резервное действие ( LoadAction / LaunchAction ), которое будет использоваться, если PendingIntent не поддерживается рендерером ProtoLayout . Резервное действие будет автоматически выбрано и размещено в макете, если версия рендерера ниже той, которая поддерживает PendingIntent . ( I6eee2 , b/450259727 )
  • Поле protoLayoutScope в MaterialScope теперь имеет значение NonNull для упрощения использования при создании MaterialScope с помощью materialScopeWithResources . Кроме того, появилась функция hasProtoLayoutScope для проверки наличия этого поля. ( I1858f , b/450067019 )

Версия 1.4.0-alpha01

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

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

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

  • Добавлен вспомогательный метод для LayoutModifier , который позволяет элементу плавно появляться по мере того, как плитка становится видимой. ( I38531 , b/390345969 )
  • Добавлен materialScopeWithResources для поддержки концепции MaterialScope в M3, который также обеспечивает автоматическую регистрацию ресурсов. В его состав добавлены новые вспомогательные методы для изображений ( backgroundImage avatarImage и icon), которые устраняют необходимость ручной регистрации ресурсов в onTileResourceRequest при их использовании. ( I525bd , b/428692714 )
  • Вспомогательные функции Kotlin для ProtoLayout , предназначенные для работы Image и ImageResources , с использованием ProtoLayoutScope и автоматической регистрации ресурсов. ( Iada82 , b/430584304 )
  • Добавлен геттер для определения количества свойств Лотти, разрешенных для настройки одной анимации Лотти. ( I73733 , b/436532706 )
  • Добавить API в AndroidLottieResourceByResId , позволяющий настраивать анимацию Lottie через свойства, а также API для создания свойства для оформления слота с указанием его ID и цвета. ( I301b3 , b/423581481 )
  • Добавить API поставщика для приема PendingIntent в качестве действия клика ( I01978 , b/433802488 )
  • Add new API in Image.Builder - setImageResource to set resource object directly to the Image in onTileRequest , without a need to register it in mapping in onTileResourcesRequest . ( Ifa69a , b/428693523 )
  • Добавлена ​​концепция ProtoLayoutScope в рамках подготовки к улучшенной обработке ресурсов в Tiles. ( I132ce , b/428692423 )
  • ProtoLayout Material3 MaterialScope now exposes Context field as public, for use in methods within the scope, without the need to pass it around. ( I0e5cc , b/414559956 )
  • Сделать API семантики заголовков общедоступными ( I75299 , b/413653475 )
  • Предоставить доступ к константам ARC_DIRECTION_* в качестве общедоступных для использования в Arc/ArcLine/ArcText/DashedArcLine . ( I83959 , b/427556439 )

Изменения в API

  • Мы объявили устаревшими методы Image.Builder() и Image.Builder.setResourceId в пользу нового API автоматической регистрации ресурсов, доступного в Image.Builder(ProtoLayoutScope) и Image.Builder.setImageResource , который устраняет необходимость переопределения метода onTileResourcesRequest . ( I7bfe6 , b/432758526 )
  • Move APIs for creating ProtoLayoutScope from restricted to public. However, they shouldn't be used as the system already handles those calls. ( I1d8e8 , b/432758251 )

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

  • Add implementation for supporting PendingIntent in ProtoTiles ( I38167 , b/430610429 )
  • Добавить метод invalidateLayout . ( Ief898 )
  • Moving the default minSdk from API 21 to API 23 ( Ibdfca , b/380448311 , b/435705964 , b/435705223 )
  • ImageResource теперь есть методы hashCode и equals . ( I650ee , b/428692423 , b/428693523 )
  • Добавить новое протокольное сообщение PendingIntentAction и его построитель-обертку ( Ie2aca , b/427643502 )
  • Уменьшить частоту создания экземпляров ZoneId . ( I284d3 )
  • Применить описание содержимого по умолчанию к textButton с одним слотом. ( I0dc8a , b/415001534 )
  • Исправлены вычисления для корректировки максимального количества строк на стороне рендерера. ( I933bc , b/414353620 )

Версия 1.3

Версия 1.3.0

4 июня 2025 г.

androidx.wear.protolayout:protolayout-*:1.3.0 is released. Version 1.3.0 contains these commits .

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

  • В дизайне часов используется технология Material 3: компоненты и компоновка оптимизированы для круглого дисплея и масштабируются под разные размеры экрана, от маленьких до больших.
    • This includes Kotlin-only, protolayout-material3 library with more Compose-like APIs for the following components and features:
    • Dynamic color theme coming from the system and watch face with the latest Material3 theme for colors, shapes and typography
    • MaterialScope for taking care of all opinionated defaults and easier customization
    • iconEdgeButton , textEdgeButton
    • iconButton , textButton , button , imageButton , avatarButton , compactButton
    • titleCard , appCard , graphicDataCard , iconDataCard , textDataCard
    • circularProgressIndicator , segmentedCircularProgressIndicator
    • primaryLayout , buttonGroup
    • Все компоненты работают с любыми версиями SDK и ProtoLayout Renderer, обеспечивая разумные резервные варианты там, где это применимо.
  • Более удобные для Kotlin API, похожие на Compose, для базовых элементов ProtoLayout.
    • LayoutModifier with ability to add the most of modifiers as chained functions ( padding , contentDescription (including clearSemantics ), background , clip , opacity etc.), convertible to the existing Modifiers object
    • LayoutColors и LayoutString — типы данных с упрощенной поддержкой использования динамических полей и ограничений.
    • text и fontStyle
    • Улучшена поддержка карт для StateBuilder , включая DynamicDataMap и фабричные методы, такие как intAppDataKey для упрощения создания объектов AppDataKey
  • Lottie animations support including option to set different triggers on when animation should start, for example when layout is loaded or when layout becomes visible
    • Улучшена поддержка градиентов:
    • API для линейных градиентов, входящий в состав Brush , может использоваться в модификаторах Background для таких элементов, как Box , Spacer и т. д.
    • Allow dynamic color values in ColorStop used for linear and sweep gradient
    • Существующий градиент заметания в дуговых объектах теперь поддерживает динамические цвета, а также начальные и конечные углы.
  • Привязка данных платформы в protolayout-expression позволяет получать информацию всякий раз, когда изменяется видимость макета, что, например, может использоваться для скрытия определенных частей макета во время пролистывания плитки.
  • В библиотеку тестирования protolayout-testing добавлена ​​поддержка упрощенного модульного тестирования любых элементов ProtoLayout.
  • Новый элемент DashedArcLine с улучшенным набором функций, позволяющий использовать пунктирные линии, в отличие от существующего ArcLine
  • ArcSpacer support for setting its length in DP dimension instead of degrees
  • Добавлена ​​ось закругления FontSetting применимая к некоторым шрифтам.

Версия 1.3.0-rc01

20 мая 2025 г.

Выпущена версия androidx.wear.protolayout:protolayout-*:1.3.0-rc01 без изменений по сравнению с предыдущим релизом. Версия 1.3.0-rc01 содержит следующие коммиты .

Версия 1.3.0-beta02

7 мая 2025 г.

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

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

  • We have made an important improvement in the Typography design values that are applied on API 36 and above. This is because from API 36, all Tiles will be in the system font, so this change introduces better consistency in the Tiles carousel. ( If316f )
  • Конструкторы Text , Spacer , ArcLine и DashedArcLine не будут выдавать ошибку, если для динамических значений не заданы layoutConstraints . Обратите внимание, что более старые рендереры по-прежнему требуют установки layoutConstraints и будут игнорировать любые динамические значения, у которых они не заданы. ( Ic52e8 )
  • Добавьте модификатор семантики заголовка, чтобы указать, что элемент макета является заголовком раздела контента в целях доступности, и по умолчанию отметьте текст в слоте заголовка элемента primaryLayout как заголовок, предназначенный для людей с ограниченными возможностями. ( Iae1fb )
  • Final UX polish of the primaryLayout where space between title slot and main slot is decreased to 4dp instead of 6dp on smaller screens. ( I0e056 )
  • Применить описание содержимого по умолчанию к textEdgeButton . ( Ifaf8b )
  • Небольшое обновление внутреннего отступа avatarButton . ( I0910b )

Версия 1.3.0-beta01

9 апреля 2025 г.

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

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

Выпуск 1.3.0-beta01 библиотеки Wear ProtoLayout указывает на то, что данный релиз является полностью функциональным, а API заблокирован (за исключением тех мест, которые помечены как экспериментальные). Wear ProtoLayout 1.3 включает следующие новые функции и API:

  • В дизайне часов используется технология Material 3: компоненты и компоновка оптимизированы для круглого дисплея и масштабируются под разные размеры экрана, от маленьких до больших.
    • This includes Kotlin-only, protolayout-material3 library with more Compose-like APIs for the following components and features:
    • Dynamic color theme coming from the system and watch face with the latest Material3 theme for colors, shapes and typography
    • MaterialScope для учета всех заданных по умолчанию параметров и упрощения настройки.
    • iconEdgeButton , textEdgeButton
    • iconButton , textButton , button , imageButton , avatarButton , compactButton
    • titleCard , appCard , graphicDataCard , iconDataCard , textDataCard
    • circularProgressIndicator , segmentedCircularProgressIndicator
    • primaryLayout , buttonGroup
    • Все компоненты работают с любыми версиями SDK и ProtoLayout Renderer, обеспечивая разумные резервные варианты там, где это применимо.
  • Более удобные для Kotlin API, похожие на Compose, для базовых элементов ProtoLayout.
    • LayoutModifier with ability to add the most of modifiers as chained functions ( padding , contentDescription (including clearSemantics ), background , clip , opacity etc.), convertible to the existing Modifiers object
    • LayoutColors и LayoutString — типы данных с упрощенной поддержкой использования динамических полей и ограничений.
    • text и fontStyle
    • Улучшена поддержка карт для StateBuilder , включая DynamicDataMap и фабричные методы, такие как intAppDataKey для упрощения создания объектов AppDataKey
  • Анимации Lottie поддерживают возможность установки различных триггеров для запуска анимации, например, при загрузке макета или при отображении макета.
    • Улучшена поддержка градиентов:
    • API для линейных градиентов, входящий в состав Brush , может использоваться в модификаторах Background для таких элементов, как Box , Spacer и т. д.
    • Разрешить динамические значения цвета в ColorStop , используемом для линейных и градиентных переходов.
    • Existing Sweep Gradient in arc objects now supports dynamic colors and start and end angles
  • Привязка данных платформы в protolayout-expression позволяет получать информацию всякий раз, когда изменяется видимость макета, что, например, может использоваться для скрытия определенных частей макета во время пролистывания плитки.
  • Testing library - protolayout-testing - has been added to support easier Unit test coverage for any ProtoLayout elements
  • New element DashedArcLine with improved set of features so that line can have dashes, as opposed to the existing ArcLine
  • ArcSpacer поддерживает задание длины в единицах измерения DP вместо градусов.
  • Добавлена ​​ось закругления FontSetting применимая к некоторым шрифтам.

Версия 1.3.0-alpha10

12 марта 2025 г.

Выпущена версия androidx.wear.protolayout:protolayout-*:1.3.0-alpha10 . Версия 1.3.0-alpha10 содержит следующие коммиты .

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

  • Добавить вспомогательную функцию для Brush в модификаторе фона Kotlin. ( I995de )
  • Mandatory Android Context field has been made public in MaterialScope to allow for easier usage in developers' functions that are creating components for Material3 tiles. ( I7df73 )

Изменения в API

  • Переименуйте API platformVisibilityStatus в PlatformEventSources.isLayoutVisible и добавьте новый экспериментальный API PlatformEventSources.isLayoutUpdatePending . ( IE1E04 )

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

  • Margins for primaryLayout are now properly rounded up instead, which can have effect on some layout up to 2dp space less for the main slot. ( I8f5d3 )
  • Уточнение стандартной динамической цветовой темы в компонентах Material3 ProtoLayout . ( Iff5f3 )
  • Typography.NUMERAL_* typographies are no longer tabular/monospace by default. If text is animating, it is highly recommended to add FontSetting.tabularNum() setting to it. In all other cases this monospace option is not needed and there will be more available characters by not using it. ( Id3cd9 )
  • Уточнение стандартной динамической цветовой темы в компонентах Material3 ProtoLayout . ( I9d831 )

Версия 1.3.0-alpha09

26 февраля 2025 г.

Выпущена версия androidx.wear.protolayout:protolayout-*:1.3.0-alpha09 . Версия 1.3.0-alpha09 содержит следующие коммиты .

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

  • Added experimental modifiers for enterTransition and exitTransition ( I4a4d6 )
  • We have added additional platform binding to receive the visibility status of full layout, whenever it's changed. ( I250c3 )
  • Разрешить внедрение данных о состоянии тестового приложения и платформе в LayoutElementAssertionsProvider для оценки динамических значений. ( Ib5fcb )
  • Добавить фильтры углов в библиотеку тестирования макета ( IE2361 )
  • ButtonColors , CardColors и ProgressIndicatorColors теперь поддерживают метод copy с возможностью переопределения некоторых параметров. ( IE2054 )

Изменения в API

  • Добавить поддержку динамической привязки данных в библиотеку тестирования ( Ib98de )
  • Исправлена ​​ошибка использования imageButton с функцией backgroundImage путем удаления эффекта наложения. Кроме того, добавлена ​​возможность указания значения null для цвета backgroundImage , что означает, что наложение не будет применено. ( Ibec3c )

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

  • Changed default hasValueOfType method to throw UnsupportedOperationException instead of IllegalArgumentException . ( Ia36c3 )
  • Значения цветовых токенов по умолчанию обновлены в соответствии с последней спецификацией ( I75d44 ).
  • Исправлена ​​ошибка сглаживания, видимая на дуговых линиях в рендерере AndroidX tiles. ( I88190 )

Version 1.3.0-alpha08

12 февраля 2025 г.

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

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

  • Add FontSetting list parameter for Material3 text. ( Ic102d )
  • Добавлен класс DynamicDataMap , который теперь поддерживается StateBuilder , для более типобезопасного API Kotlin для состояний приложения ( I012ba ).
  • Добавлены фабричные методы, такие как intAppDataKey для упрощения создания объектов AppDataKey ( Icea2a ).
  • В дополнение к методам hasInt/hasColor/ ..., DynamicDataValue теперь имеет метод hasValueOfType(Class<?>) ( I4f7a6 ).
  • We have added errorDim to the Material3 ProtoLayout ColorScheme , for high priority errors or emergency actions such as safety alerts. ( Ia17bb )
  • Мы добавили защиту от сбоя при доступе к глобальной настройке reducemotion, которая срабатывала на некоторых платформах, где эта настройка не была предоставлена. ( I01e2c )

Изменения в API

  • addKeyToValueMapping is renamed to addToStateMap and DynamicDataMap.put methods are removed as they were redundant. ( Ibe9dd )
  • В Material3 Typography теперь поддерживается переменная ось округлости для системных шрифтов, поддерживающих эту ось. В ProtoLayout FontSetting также поддерживается ось округлости для шрифтов, поддерживающих эту ось. ( I33eb5 )
  • Renamed multilineAlignment to alignment in Material3 text method. ( I2b66b )
  • Обновите круговой индикатор выполнения, присвоив ему тип «Box», а также укажите тип mainContent в constructGraphic как Box ( I5a3dc ).
  • Better support for using circular progress indicator in graph ( I039db )

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

  • Разрешить динамические значения в ColorStop , а также для начального/конечного углов в SweepGradient . ( I0146d )
  • Исправлены ошибки в документации. ( I4a63a )
  • Обновлены компоненты Material 3 ( graphicCard и avatarButton ) для обеспечения резервного варианта, когда расширение размеров weight не поддерживается (например, ниже API 33). Обновлен компонент текста для резервного использования TEXT_OVERFLOW_ELLIPSIZE_END когда TEXT_OVERFLOW_ELLIPSIZE не поддерживается рендерером. ( I19e2c )
  • Docs update for PrimaryLayoutMargins . ( Ibaf7b )

Версия 1.3.0-alpha07

29 января 2025 г.

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

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

  • Added API option to set different triggers for Lottie animations. Additionally, added API for triggers fired when layout is visible ( I8272d )
  • Added border , visibility and opacity modifiers. ( I6d3dd )
  • Добавлена ​​кнопка аватара в компонент ProtoLayout Material3. ( Idb5ae )
  • We are now allowing margins (side and in some cases bottom) to be customized in Material3 primaryLayout . ( Ib22f6 )
  • Добавьте сегментированный вариант кругового индикатора выполнения. ( I6a648 )
  • Added compact button component to ProtoLayout Material3. ( Ia3c5c )
  • Added pill shape button and image button components to ProtoLayout Material3. ( Ifb88a )

Изменения в API

  • LayoutModfier.foldIn is now called foldRight to better reflect its expected behaviour ( Idf242 )
  • VisibleOnce trigger is now experimental. ( Ib2d26 )
  • Remove withOpacity from the public API as there is a graphics library alternative. ( I030c2 )
  • Renamed top level methods in LayoutString.kt and LayoutColor.kt to have Java friendly names. ( I7aff0 )
  • Удалены типографические элементы, не относящиеся к ProtoLayout, в Material3. ( Idd9ae )
  • Добавьте суффикс Color к полям в классах *Colors в Material3. ( I2d114 )

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

  • Добавлена ​​реализация резервного варианта EdgeButton для старых рендереров без поддержки асимметричных углов. ( I63364 )
  • Добавлена ​​резервная реализация циклического индикатора выполнения с использованием более старого рендерера. ( I0f134 )

Версия 1.3.0-alpha06

15 января 2025 г.

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

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

  • LayoutColor поддерживает как статические, так и динамические типы цветов ( I4c89b )
  • Добавлен компонент текстовой кнопки ProtoLayout Material3 ( ID680d ).
  • Add iconButton ProtoLayout Material3 component. ( Ica3f0 )
  • Added ProtoLayout Material3 button container component. ( I17a38 )
  • Добавлена ​​поддержка семантических модификаторов Chainable для protolayout-material3 ( I4af62 ).
  • Added ProtoLayout Material3 single segment CircularProgressIndicator ( I2c8a2 )
  • Added padding , metadata modifiers ( I8720a )
  • Добавлены background , clip и clickable модификаторы ( I35478 )
  • Add LinearGradient to Brush and allow it to be used in the Background Modifier. ( Ic4dea )
  • Add small size for appCard and titleCard . ( I91f98 )
  • Добавлен компонент ProtoLayout Material3 graphicDataCard . ( I92be7 )
  • Added ProtoLayout Material3 iconDataCard and textDataCard components. ( I4e1e4 )
  • Добавлен компонент ProtoLayout Material3 appCard . ( Id4c57 )
  • Абстрактное EdgeButtonColors в ButtonColors . ( I83624 )
  • Added ProtoLayout Material3 titleCard component. ( I2dc72 )

Изменения в API

  • ProtoLayout Material3 API now accepts LayoutString to support both static and dynamic texts. ( I9c24a )

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

  • Добавить реализацию рендерера для создания объекта DashedArcLine ( I0c700 )
  • Изменение в механизме рендеринга, позволяющее ArcSpacer учитывать длину dp. ( I1437b )

Версия 1.3.0-alpha05

11 декабря 2024 г.

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

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

  • Добавлена ​​поддержка строковых полей макета, допускающих LayoutString . ( Ida650 )
  • Добавлен компонент контейнера карточки из ProtoLayout Material3 . ( IC985A )

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

  • В этой библиотеке теперь используются аннотации JSpecify, определяющие наличие нулевого значения , которые относятся к использованию типов. Разработчикам Kotlin следует использовать следующий аргумент компилятора для обеспечения корректного использования: -Xjspecify-annotations=strict (это значение по умолчанию, начиная с версии 2.1.0 компилятора Kotlin). ( Id1f9b , b/326456246 )

Version 1.3.0-alpha04

13 ноября 2024 г.

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

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

  • Обновлена ​​форма Material3: теперь это класс с полями, хранящими фактическое значение угла, как в Wear Compose. ( Ied8cd )
  • Updated Material3 colors to include ColorScheme concept, same as in Wear Compose. ( If645e )
  • Add multiple commonly used matcher to the testing library. ( Ie5cec )

Версия 1.3.0-alpha03

30 октября 2024 г.

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

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

  • Добавьте LayoutElementAssertionsProvider , LayoutElementAssertion и LayoutElementMatcher в библиотеку тестирования ( Id1110 ).

Версия 1.3.0-alpha02

16 октября 2024 г.

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

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

  • Initial version of Material 3 library. Includes text , edgeButton , buttonGroup and primaryLayout components.

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

  • После этого изменения androidx компилируется с использованием protobuf 4.28.2 для устранения уязвимости CVE-2024-7254 . Обновите зависимость от версии 1.3.0-alpha01 для androidx.wear.protolayout:protolayout-proto и androidx.wear.protolayout:protolayout-external-protobuf до версии 1.3.0-alpha02, чтобы устранить риск уязвимости.

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

Версия 1.3.0-alpha01

2 октября 2024 г.

androidx.wear.protolayout:protolayout-*:1.3.0-alpha01 is released. Version 1.3.0-alpha01 contains these commits .

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

  • Уточнено, что доступность названий семейств шрифтов Roboto и Roboto Flex зависит от устройства. ( I193be )
  • В AndroidX Tile renderer включено семейство шрифтов Roboto Flex. ( I08e94 )

Версия 1.2

Версия 1.2.1

16 октября 2024 г.

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

Security Fixes

  • В результате этого изменения androidx компилируется с использованием protobuf 4.28.2 для устранения уязвимости CVE-2024-7254 . Обновите зависимость от версии 1.2.0 пакетов androidx.wear.protolayout:protolayout-proto и androidx.wear.protolayout:protolayout-external-protobuf до версии 1.2.1, чтобы устранить риск уязвимости.

Версия 1.2.0

7 августа 2024 г.

androidx.wear.protolayout:protolayout-*:1.2.0 is released. Version 1.2.0 contains. these commits .

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

  • FontStyle внесены изменения, обеспечивающие дополнительную поддержку шрифтов для переменных осей, а также улучшен API выбора шрифтов для поддержки будущих шрифтов Flex.
  • Additional Modifiers support:
    • Модификатор трансформации, позволяющий перемещать, вращать и масштабировать объекты с анимацией или без нее.
    • Задание различных значений (по горизонтали и вертикали) для каждого радиуса скругления углов.
  • Улучшена доступность всех сенсорных элементов за счет расширения области касания любого элемента, использующего модификатор Clickable, до размеров не менее 48dp на 48dp .
  • Improved PrimaryLayout and EdgeContentLayout by adding setResponsiveContentInsetEnabled to better support responsive behavior of these layouts across different screen sizes and improve Tiles consistency.
  • Улучшено масштабирование/отсутствие масштабирования Material Text для нелинейного масштабирования шрифтов в Android 14.
  • Улучшена поддержка направления RTL-разметки для всех дуговых элементов.

Дополнительные изменения

Версия 1.2.0-rc01

24 июля 2024 г.

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

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

  • Мы исправили стандартный Material Chip таким образом, что его можно использовать в качестве значка только в том случае, если не переданы ни основная, ни дополнительная метка. ( Iceef9 )
  • Документация по макетам Material Design обновлена ​​и теперь включает визуальные элементы с соответствующей страницы для более удобного понимания макетов. ( I0256a )

Версия 1.2.0-beta01

10 июля 2024 г.

androidx.wear.protolayout:protolayout-*:1.2.0-beta01 is released. Version 1.2.0-beta01 contains these commits .

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

Выпуск 1.2.0-beta01 библиотеки Wear ProtoLayout указывает на то, что данный релиз является полностью функциональным, а API заблокирован (за исключением тех мест, которые помечены как экспериментальные). Wear ProtoLayout 1.2 включает следующие новые функции и API:

  • FontStyle добавлена ​​поддержка дополнительных шрифтов:
    • Setting different font variation setting such as FontSetting.weight and FontSetting.width
    • Setting the same width for all numeric characters - tabular numerals ( FontSetting.tnum font feature setting)
    • Улучшены API выбора шрифтов для поддержки будущих гибких шрифтов путем указания предпочтительных названий семейств шрифтов для использования.
  • Extended Corner modifier to support specifying each CornerRadius with a separate horizontal and vertical values to allow building elements with asymmetric corners.
  • Added a new Transformation modifier offering translation, rotation and scaling of LayoutElement . These transformations can be animated by using dynamic values.
  • Added setArcDirection with Clockwise , CounterClockwise and Normal options to all arc elements ( Arc , ArcLine and ArcText ) for better support in different layout directions (such as LTR and RTL).
  • Improved accessibility of all touch targets by extending the tappable area of any element that uses Clickable modifier to be at least 48dp by 48dp .
  • Improved PrimaryLayout and EdgeContentLayout by adding setResponsiveContentInsetEnabled to better support responsive behavior of these layouts across different screen sizes and improve Tiles consistency. Added linter warning to suggest usage of these APIs with a quick fix.
  • Improved scaling/non-scaling of the Material Text for Android 14's non-linear font scaling.

Изменения в API

  • Default font family name ( DEFAULT_SYSTEM_FONT ) is removed as it is implied by not using the preferredFontFamilies API. ( I39dab )
  • Parameter passed in to the FontSetting.width should be positive. ( I1266f )

Версия 1.2.0-alpha05

26 июня 2024 г.

androidx.wear.protolayout:protolayout-*:1.2.0-alpha05 is released. Version 1.2.0-alpha05 contains these commits .

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

  • Add hasText method to Material.CompactChip to check whether the text content has been set. ( I6e8fc )

Изменения в API

  • FontFamily const are moved to be in FontStyle instead of its Builder class. ( I06ced )
  • Update FontSetting.weight and FontSetting.width API to include Range annotations and change weight's parameter to be int. ( Ia726c )

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

  • Non-scalable texts in Material library now work correctly with Android 14's non-linear font scaling. ( I6601e )

Версия 1.2.0-alpha04

29 мая 2024 г.

androidx.wear.protolayout:protolayout-*:1.2.0-alpha04 is released. Version 1.2.0-alpha04 contains these commits .

Изменения в API

  • Added asymmetrical corners API to be able to specify separately each corner's radius with 2 values. ( Icbd69 )
  • Extended the FontSetting API to include:
    • font feature setting such as setting the font to be tabular. ( If12b7 )
    • font variation setting such as setting custom width for variable fonts. ( I2b36d )
  • Added font family API to FontStyle to allow specifying an order list of which font families should be used. ( Iba9f5 )
  • Renamed constants for space height between content and secondary label in Material's LayoutDefaults that were initially prefixed with “Edge content” to be more generic as they can be applied to both PrimaryLayout and EdgeContentLayout . ( I4dc32 )

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

  • Renamed naming for variable font axes from axisName to axisTag . ( I02ba3 )

Версия 1.2.0-alpha03

14 мая 2024 г.

androidx.wear.protolayout:protolayout-*:1.2.0-alpha03 is released. Version 1.2.0-alpha03 contains these commits .

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

  • Added API for setting custom weight values for FontStyle . ( I7390a )

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

  • Fix the failure in getTouchDelegateInfo due to empty target map. ( I2accf )

Версия 1.2.0-alpha02

1 мая 2024 г.

androidx.wear.protolayout:protolayout-*:1.2.0-alpha02 is released. Version 1.2.0-alpha02 contains these commits .

Изменения в API

  • We've added support for disabling ripple feedback on individual clickable elements. ( If1ede )
  • The API for transformation has been removed from ArcModifiers as they don't support that feature ( Ic0827 )
  • ArcDirectionProp Builder now expects a value in the constructor. ( I76ada )
  • The PlatformDataValues.Builder.putAll method will allow merging one PlatformDataValue into another one. ( I50ba3 )
  • Text#setIsScalable is renamed to Text#setScalable . ( If920e )
  • Material Text can set whether to use scalable size (grows when user font size is changed) or not. ( Ibc849 )
  • We've added the option to set content description to TitleChip . ( I5d21f )
  • Fixed CompactChip to work correctly with icon only and update the API to allow this option. ( I6589e )

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

  • Fixed an issue of potential duplicate platform data during initialization. ( Iba0fd )
  • Introduce a new getter to DynamicDataNode to retrieve node cost. The cost is used when acquiring dynamic node quota. Currently, Nodes with fixed values will have a cost of 0, all the other nodes will have a cost of 1. ( Ia33e1 )
  • Remove counting logic from the NO_OP_QUOTA_MANAGER . ( Ib50b8 )
  • We have added a lint rule to report a warning when PrimaryLayout is used without setResponsiveContentInsetEnabled and provide a quick fix. ( I12025 )
  • There is a limit to a number of dynamic expression nodes. ( Iffae8 )

Версия 1.2.0-alpha01

6 марта 2024 г.

androidx.wear.protolayout:protolayout-*:1.2.0-alpha01 is released. Version 1.2.0-alpha01 contains these commits .

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

  • ProtoLayout Arc elements now have the option to add ArcDirection ( Clockwise , Counterclockwise or Normal ) to it. Adding this behavior to Arc , ArcLine or ArcText will fix their behavior on RTL layouts. ( I90699 )
  • EdgeContentLayout has been updated with a new setResponsiveContentInsetEnabled setter to achieve better alignment with the UX guidelines, consistency in Tiles by having primary label at the fixed place on top and responsive inset for labels. ( I60175 )
  • We have added PrimaryLayout.setResponsiveContentInsetEnabled that adds responsive inset to the primary label, secondary label and bottom chip in this layout, to avoid that content going off the screen edge. ( I0c457 )
  • Adds method to remove outer margins from CircularProgressIndicator so it can be used as a smaller component. ( I55c06 )

Изменения в API

  • Tiles renderer now excludes font padding on all text elements by default, without an option to include it. ( I3e300 )

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

  • Fixed Text alignment issue when ellipsize, letter spacing and center align are all used on Text. ( I716c7 )
  • Add a workaround for a skia arc drawing issue. ( I08f09 )
  • Fix ArcLine drawing direction for RTL layouts. ( I6c141 )

Версия 1.1

Версия 1.1.0

7 февраля 2024 г.

androidx.wear.protolayout:protolayout-*:1.1.0 is released. Version 1.1.0 contains these commits.

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

  • Gradient support and better representation of lengths larger than 360 degrees in ArcLine .
  • Date-time formatting supports different time zones for dynamic data types.
  • Better text autosizing and ellipsizing options, to handle truncated text.
  • Spacer supports expanded dimensions with optional weight.
  • Schema version requirement annotation to all ProtoLayout APIs.
  • Extended target area to any Clickable element to 48 dp x 48 dp, to satisfy accessibility requirements.
  • Font padding is turned off by default and is the only behavior across all Text elements and Material components that contain text.

Additional changes

Версия 1.1.0-rc01

24 января 2024 г.

androidx.wear.protolayout:protolayout-*:1.1.0-rc01 is released. Version 1.1.0-rc01 contains these commits.

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

  • PlatformTimeUpdateNotifierImpl ticks immediately after enabling update. ( I77145 )
  • CircularProgressIndicator has been fixed for RTL layouts. From now on, it will go clockwise in all cases. ( I95ee3 )
  • Add a workaround for a skia arc drawing issue. ( I08f09 )

Версия 1.1.0-beta01

10 января 2024 г.

androidx.wear.protolayout:protolayout-*:1.1.0-beta01 is released. Version 1.1.0-beta01 contains these commits.

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

The 1.1.0-beta01 release of Wear ProtoLayout indicates that this release of the library is feature complete and the API is locked (except where marked as experimental). Wear ProtoLayout 1.1 includes the following new functionalities and APIs:

  • ArcLine now supports gradient by adding Brush with SweepGradient and having a shadow on the cap to better represent length larger than 360 degrees by adding Shadow on the existing StrokeCap .
  • DynamicInstant has support for zoned date-time formatting. DynamicInstant and DynamicDuration can be used as state or platform data types.
  • Autosizing feature for text size that allows setting multiple sizes to FontStyle.setSizes where the Text size will automatically scale based on the space it has inside of the parent. Additionally, we improved ellipsizing options for text that overflows by adding TEXT_OVERFLOW_ELLIPSIZE and deprecating TEXT_OVERFLOW_ELLIPSIZE_END .
  • Spacer now supports having expanded dimensions with optional weight. For building ExpandedDimensionProp we have added a helper method DimensionBuilders.weight .
  • Support for dynamically hiding and unhiding layout elements with Modifier.visible . This includes having dynamic values in BoolProp .
  • All ProtoLayout APIs now have schema version requirement annotation and version can be checked before calling a newer API.
  • Every element that has Clickable now has its target area extended to at least 48x48 in the renderer to better support accessibility requirements.
  • Following other Material components and Compose initiatives, we have now turned off font padding by default on all Text elements. Additionally, AndroidTextStyle and related setters have been removed from the public API. with following bug fixes:
  • Added a setter for positioning the edge content in EdgeContentLayout so it can be positioned before other content.
  • Consistently throwing an exception when encountering an unrecognized enum value.
  • Invalidate the result of an expression when it yields an invalid numeric value (NaN or infinite) or throws an ArithmeticException .

Изменения в API

  • Updates to SweepGradient API to allow accepting either colors or ColorStops in the constructor. ( I6676f )

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

  • Adding a restricted API and renderer support for setting a direction in which arc elements are drawn. ( Idef5a )
  • RoundMode defaults to Floor in FloatToInt32Node when unspecified. The node will still throw an exception if the provided RoundMode is unrecognized. ( I1b2d8 )

Версия 1.1.0-alpha04

13 декабря 2023 г.

androidx.wear.protolayout:protolayout-*:1.1.0-alpha04 is released. Version 1.1.0-alpha04 contains these commits.

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

  • VersionInfo class not implements the Comparable interface. ( I8d13c )
  • Renderer now supports TEXT_OVERFLOW_ELLIPSIZE option. ( I7f085 )

Изменения в API

  • Text overflow option TEXT_OVERFLOW_ELLIPSIZE_END is now deprecated. Please use the new API TEXT_OVERFLOW_ELLIPSIZE with very similar behavior. ( I822d8 )
  • Following other Material components and Compose initiatives, we have now turned off font padding by default on all Text elements. Additionally, AndroidTextStyle and related setters have been removed from the public API. ( I79094 , Ib0b03 , I32959 , Iaf7d5 , Ifa298 , I0a4ae , Ida9d3 )
  • Modifier.hidden is replaced with Modifier.visible ( I56902 )
  • FontStyle#setSizes now accepts int instead of SpProp arguments. ( I02b37 )

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

  • Throw an exception when encountering an Undefined or Unrecognized enum value. ( I9d2cf )
  • Refactor DynamicTypeBindingRequest . ( I27b57 )
  • Invalidate the result of an expression when it yields an invalid numeric value (NaN or infinite) or throws an ArithmeticException . ( I681ae )

Версия 1.1.0-alpha03

29 ноября 2023 г.

androidx.wear.protolayout:protolayout-*:1.1.0-alpha03 is released. Version 1.1.0-alpha03 contains these commits.

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

  • Add experimental support for dynamically hiding/unhiding layout elements ( I64a78 )
  • Add dynamic value support to BoolProp ( I2fe96 )
  • Add schema version requirement annotation to ProtoLayout APIs ( I0f03c )
  • Extending the API with the new option in TextOverflow for ellipsizing the Text in a fixed parent container even when max lines is not reached (but there's not enough space for Text). ( I110a9 )
  • Added helper method DimensionBuilders.weight for building ExpandedDimensionProp with weight. ( I4f72b )
  • DynamicInstant and DynamicDuration can be used as state or platform data types. ( I6819f )

Изменения в API

  • Update The API to hide DynamicZonedDateTime and move all its operations to DyanamicInstant ( I34b94 )
  • Spacer now supports Expanded dimension for width/height. ( Ie7c94 )
  • Support click target area extension in Renderer ( I39c79 )

Версия 1.1.0-alpha02

15 ноября 2023 г.

androidx.wear.protolayout:protolayout-*:1.1.0-alpha02 is released. Version 1.1.0-alpha02 contains these commits.

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

  • Added an ArcLine StrokeCap Shadow field to the API. ( I830ec )
  • Extending the API to be able to specify Spacer's width or height to expand. ( I757ca )
  • We have added an experimental API to automatically scale the text size based on the space it has inside of the parent. ( Ibbe63 )
  • Support minimum clickable size ( I178e3 )
  • Added renderer support for StrokeCap Shadow . ( I48b17 )
  • Add renderer support for Sweep Gradient in ArcLine . ( I4d5bb )

Версия 1.1.0-alpha01

18 октября 2023 г.

androidx.wear.protolayout:protolayout-*:1.1.0-alpha01 is released. Version 1.1.0-alpha01 contains these commits.

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

  • Added a brush option to Arcline , with support for SweepGradient . ( Ie7ce3 )
  • Added support for zoned date-time formatting. ( Ibfae0 )
  • Added protos and java Wrappers required for zoned date-time formatting. ( I97126 )
  • Added getters for reading back the value stored in a DynamicDataValue . ( Ie6cea )
  • Added a setter for positioning the edge content in EdgeContentLayout so it can be positioned before other content. ( Ie8e8a )

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

  • Fixed an issue when an expression with multiple time data source registrations was not being updated immediately. ( I8e1a8 )
  • Fixed a bug to center root element during diff updates. ( Ie48f7 )
  • Unset (or empty) layout constraint values will not be ignored anymore. ( Ibc785 )
  • Reduced delay between a layout becoming visible and its pipeline nodes being initialized. ( I38d4e )

Версия 1.0

Версия 1.0.0

9 августа 2023 г.

androidx.wear.protolayout:protolayout-*:1.0.0 is released. Version 1.0.0 contains these commits.

Major features of 1.0.0

ProtoLayout library introduces APIs for creating layouts and expressions that can be used across different Wear OS surfaces. For example Tiles library uses these APIs to support platform data binding (for faster tile data updates) and animations.

Версия 1.0.0-rc01

26 июля 2023 г.

androidx.wear.protolayout:protolayout-*:1.0.0-rc01 is released. Version 1.0.0-rc01 contains these commits.

  • To migrate from Tiles to ProtoLayout , please follow the instructions here .

Изменения в API

  • We have removed setLayoutConstraintForDynamicAnchorAngle and getLayoutConstraintForDynamicAnchorAngle methods from Arc element. These methods have been added by mistake and they didn't have any effect on the provided layout. ( If7d01 )
  • We have limited the maximum depth that a ProtoLayout 's layout can have to 30 nested LayoutElements . ( I8a74b )

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

  • We have added a check to throw if DynamicColor has been set for a SpanText . ( I0e5bc )
  • It is clarified that DAILY_CALORIES data source unit is kcal. ( Iaa785 )

Версия 1.0.0-beta01

21 июня 2023 г.

androidx.wear.protolayout:protolayout-*:1.0.0-beta01 is released. Version 1.0.0-beta01 contains these commits.

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

  • Allow setting clock for time binding tests. ( I05622 )

Изменения в API

  • PlatformDataReceiver.onData() and StateBuilders.Builder.addKeyToValueMapping now accept type-safe mapping of DynamicDataKey to DynamicDataValue rather than unsafe generics. That means that DynamicDataValue is now typed with its DynamicType . HEART_RATE_ACCURACY_X constants moved to the root of PlatformHealthSources , to match other Android constants positioning. HEART_RATE_ACCURACY_X int constants are now used directly in DynamicHeartRateAccuracy.constant() and DynamicHeartRateAccuracy.dynamicDataValueOf() instead of value constant. ( I82ff5 )
  • The PlatformHealthSources.Constants class was instantiable by mistake. This has been fixed now. ( Icb849 )
  • PlatformTimeUpdateNotifier#setReceiver now receives Runnable instead of Supplier function and Executor to notify on. ( I9d938 )
  • We have changed the parameter type in the PlatformTimeUpdateNotifier#setReceiver from Callable to Supplier . ( I664bf )
  • CompactChip and TitleChip now support adding an icon to it. ( I5a01e )

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

  • Update Prop messages with dynamic fields to use oneof instead ( I81739 )
  • Reuse setters implementation for overloads that have setters ( Ied70c )
  • Properly record fingerprints in setters that have overloads ( I86ed2 )

Версия 1.0.0-alpha11

7 июня 2023 г.

androidx.wear.protolayout:protolayout-*:1.0.0-alpha11 is released. Version 1.0.0-alpha11 contains these commits.

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

  • We've added a PlatformDataKey for heart rate accuracy. ( I7f9b8 )

Изменения в API

  • Rename StateBuilders#getIdToValueMapping to getKeyToValueMapping and change the return type to Map<<AppDataKey<?>,DynamicDataValue> . ( Iaa7ae )
  • Make StateStore a final class ( I408ca )
  • TimeGateway interface has been replaced by PlatformTimeUpdateNotifier in protolayout-expression-pipeline library which provides desired frequency for updating time data. ( I60869 )
  • Rename register / unregisterForData in PlatformDataProvider to set / clearReceiver ( I14b02 )
  • In Material Text, getExcludeFontPadding has been renamed to hasExcludeFontPadding . ( Iea01d )
  • Setter for perfectly aligning label was added to all chip components. All chips now have min tappable target applied. ( I8ae92 )
  • LayoutDefaults#BUTTON_MAX_NUMBER has been renamed to MAX_BUTTONS . ( I84788 )
  • DAILY_DISTANCE is renamed to DAILY_DISTANCE_M . ( I4f758 )

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

  • Update Prop types docs to clarify why static value is enforced. Specify the default value used if static value wasn't provided. ( I155aa )
  • PlatformDataKey namespaces should follow Java style naming. ( I47bda )

Версия 1.0.0-alpha10

24 мая 2023 г.

androidx.wear.protolayout:protolayout-*:1.0.0-alpha10 is released. Version 1.0.0-alpha10 contains these commits.

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

  • Add AppDataKey for accessing app pushed state; Add PlatformDataKey for accessing platform data; Add namespace support in StateStore . ( I7985e )
  • Support Equal and NotEqual operations for DynamicBool . ( I6a0c1 )

Изменения в API

  • FontStyles class is now final ( Iaa2ea )
  • LayoutElementBuilders#FontStyles has been deprecated. Please use androidx.wear.protolayout.Typography or create your own FontStyle . ( Ic929b )
  • Hide Action#Builder nested interface from Action interface. Implementations of Builder are already provided by LoadAction and LaunchAction classes. ( I1d70c )
  • Allow using DynamicFloat with FloatProp . Note that FloatProp do no require layout constraints as it's not used as a layout changing prop. ( I286ac )
  • The LoalAction and SetStateAction actions are removed as they were not really supported yet. ( I5d6a6 )
  • Added support for ARGB_8888 format for inline image resources. ( I8a07c )
  • Rename StateEntryValue to DynamicDataValue , and update the state APIS to use the DynamicDataKey ( If1c01 )
  • We are limiting the number of entries that are allowed in the StateStore in order to ensure that memory usage and state update time are well contained and controlled for each instance of the StateStore . As a result, the developer needs to ensure that they do not have more than MAX_STATE_ENTRY_COUNT entries in the map otherwise they will get an IllegalStateException when creating or updating the StateStore . ( Ibadb3 )
  • Hide OnLoadTrigger and OnConditionMetTrigger classes, and rename setTrigger to setCondition for OnConditionMetTrigger . ( Ibf629 )
  • For performance and compatibility reasons, the ProtoLayout renderers won't support the full set of features in AnimatedVectorDrawable resources. We're marking those APIs as experimental until we can define the supported set. ( Ic6daf )
  • Added dynamic types for daily distance, daily calories and daily floors. Keys for platform health sources are now under PlatformHealthSources.Keys ( Ib7637 )
  • The Easing.cubicBezier method replaces the CubicBezierEasing.Builder . With that the EasingFunction class is removed and the easing constants from that class are now directly accessible from the Easing interface. In addition setInfiniteRepeatable is replaced by INFINITE_REPEATABLE_WITH_RESTART and INFINITE_REPEATABLE_WITH_REVERSE ( Ib41e7 )
  • Implement PlatformDataProvider to provide heart rate and daily steps. SensorGateway interface is removed from public API. ( I55b84 )
  • Add PlatformDataProvider , and update StateStore to register to PlatformDataProvider when the provider's supported key is required by node from expression pipeline. ( Ib616a )
  • SensorGateway is no longer Closeable as it no longer maintains any state. ( I6b4f7 )
  • Allow using FloatProp with DynamicFloat for progress in CircularProgressIndicator . This is supported for renderers supporting version 1.2. Old renderers will fallback to the staticValue if provided, otherwise to 0 ( I0d91b )
  • MultiButtonLayout constants have been refactored into LayoutDefaults.MultiButtonLayoutDefaults class which now contains those for button sizes depending on a number of buttons in the layout. ( I13973 )
  • Support using StringProp with DynamicString in Material Text. This is supported for renderers supporting version 1.2. Old renderers will fallback to the provided static value. Update Text#getText return type from String to StringProp . ( I7275b )

Версия 1.0.0-alpha09

10 мая 2023 г.

androidx.wear.protolayout:protolayout-*:1.0.0-alpha09 is released. Version 1.0.0-alpha09 contains these commits.

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

  • We've added an experimental extension layout element. Note that this can't be used by default and requires a renderer extension capable of understanding the layout element. ( I6581d )
  • Added StrokeCap support for ArcLine . ( I94951 )
  • Added support for Conditional Instant operation. ( I489a7 )
  • Added support for Conditional Duration operation. ( Iab469 )
  • Added support for creating duration from seconds. ( Ib5fa1 )

Изменения в API

  • enable/disablePlatformSource methods have been removed from DynamicTypeEvaluator . The caller should be responsible for updates. ( I78c6d )
  • Allow capping the size of bound data types. ( Ie2966 )
  • Add support for dynamic content description in protolayout-material . ( I62c8e )
  • Use long and @IntRange for duration and delay in AnimationParameters. ( I388b6 )

Версия 1.0.0-alpha08

19 апреля 2023 г.

androidx.wear.protolayout:protolayout-*:1.0.0-alpha08 is released. Version 1.0.0-alpha08 contains these commits.

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

  • AndroidTextStyle has been added to LayoutElementBuilders . ( I8d967 )
  • We have added support for setting excluding font padding in ProtoLayout Material Text. ( I17f5d )
  • ARGB_8888 is now supported for inline images. ( I18c1e )
  • DynamicColor now supports onCondition operation. ( I10927 )

Изменения в API

  • Support custom duration for reverse animation ( I3251f )
  • We've added the SemanticDescription modifier. In addition, ContentDescription is not bindable. ( I3f1d )
  • The DynamicBool.isFalse() method is now replaced with DynamicBool.negate() and the DynamicBool.isTrue() is removed. In addition NaN DynamicFloat values and narrowing a DynamicInt32 to a DynamicFloat now emit an invalid dynamic result. ( I6ac1e )
  • Int and float formatters now use the Builder pattern. ( Ieb213 )

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

  • Fallback static value has been removed from animatable fields. ( Ifcb01 )
  • DynamicTypeValueReceiver#onPreUpdate has been removed. ( I2dc35 )
  • Length of Strings in dynamic expressions are now capped. ( I4c93 )
  • The gradle dependencies are now correctly set to api instead of implementation when required. ( I40503 )

Версия 1.0.0-alpha07

5 апреля 2023 г.

androidx.wear.protolayout:protolayout-*:1.0.0-alpha07 is released. Version 1.0.0-alpha07 contains these commits.

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

  • Add dynamic value support to StringProp ( I04342 )
  • Mark bindable layout elements ( Ia110b )

Изменения в API

  • sensorGateway#registerSensorGatewayConsumer takes data type as a parameter instead of method in Consumer. ( Icf314 )
  • ObservableStateStore has been renamed to StateStore . ( Ieb0e2 )
  • Added DynamicTypeEvaluator.Builder instead of constructor arguments to allow more optional arguments, including ObservableStateStore which now defaults to an empty store. ( I6f832 )
  • Refactored order of parameters in DynamicTypeEvaluator . ( Ic1ba4 )

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

  • Correctly propagate signals from platform sensor sources to downstream nodes ( I5a922 )

Версия 1.0.0-alpha06

22 марта 2023 г.

androidx.wear.protolayout:protolayout-*:1.0.0-alpha06 is released. Version 1.0.0-alpha06 contains these commits.

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

  • We've added an experimental API for using heart rate and daily steps in dynamic expressions ( Ifd711 )
  • We have added support for reverse and forward delay for animations. ( Ic25f7 )
  • We've added DynamicColor support to Border and Background
  • We've added dynamic value support to types in DimensionBuilder
  • Layout and components from tiles-material are moving to protolayout-material

Изменения в API

  • LoadActionListener has been added to ProtoLayoutViewInstance . ( If7806 )

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

  • Added FloatNodesTest ( Id7281 )
  • Fix renderer crash when unable to load structured bitmap.

Версия 1.0.0-alpha05

8 марта 2023 г.

androidx.wear.protolayout:protolayout-*:1.0.0-alpha05 is released. Version 1.0.0-alpha05 contains these commits.

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

  • We've added an experimental "content update" animation to the Modifiers object. This animation will trigger whenever the element (with this modifier) or one of its children changes during a layout update. ( bd03e5d )

Изменения в API

  • We've added forwardRepeatDelayMillis and reverseRepeatDelayMillis to Repeatable . We've also renamed delayMillis in AnimationSpec to startDelayMillis ( Ifb266 )
  • DynamicTypeEvaluator.bind methods now accept an Executor. ( I346ab )
  • We've added the startEvaluation method to the BoundDynamicType to trigger the evaluation after the dynamic type is bound. ( I19908 )

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

  • The Animator object will be reused for subsequent animations of a single element. ( Ia3be9 )

Версия 1.0.0-alpha04

22 февраля 2023 г.

androidx.wear.protolayout:protolayout-*:1.0.0-alpha04 is released. Version 1.0.0-alpha04 contains these commits.

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

  • ObservableStateStore now informs the listeners when a key is removed too.
  • We've added renderer schema version and font scale to DeviceParameters (which can be used to conditionally create layouts in response to different versions and font settings).
  • We've added support for animating DynamicInt32 values ( I05485 )
  • We've added OnLoad and OnConditionalMet triggers. These can be used to start animations that support a trigger.
  • We've added layout weight for expanded dimensions and min size for wrapped dimensions.
  • We've added duration and instant dynamic types. These can be used to represent a time instant or duration in a dynamic expression.
  • We've added support for AnimatedVectorDrawable and SeekableAnimatedVectorDrawable as layout resources.

Изменения в API

  • Sensor data requires API 29+. ( I8099e )
  • We've added two launchAction helper methods (for launching Activities).

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

  • Rename set/getSpec to set/getAnimationSpec in Tiles animation ( I3d74b )

Версия 1.0.0-alpha03

8 февраля 2023 г.

androidx.wear.protolayout:protolayout-*:1.0.0-alpha03 is released. Version 1.0.0-alpha03 contains these commits.

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

  • We have added toByteArray() and fromByteArray() to Dynamic types in protolayout-express library.
  • We have added toString() to Dynamic types in protolayout-expression library.
  • We have added evaluation support for Dynamic types. The DynamicTypeEvaluator class from the protolayout-expression-pipeline library can be used to evaluate (and receive updated values) for a previously create Dynamic type ( DynamicString , DynamicFloat , …)
  • When animations can't be played (either because they are disabled by the evaluator, or the number of running animations has reached the set limit), the static values set on the animatable node will be used to replace the animation.

Версия 1.0.0-alpha02

25 января 2023 г.

androidx.wear.protolayout:protolayout:1.0.0-alpha02 , androidx.wear.protolayout:protolayout-expression:1.0.0-alpha02 , and androidx.wear.protolayout:protolayout-proto:1.0.0-alpha02 are released. Version 1.0.0-alpha02 contains these commits.

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

  • Layout builders from androidx.wear.tiles:tiles are moving to androidx.wear.protolayout:protolayout . The ones in androidx.wear.tiles:tiles will be deprecated in one of the next alpha releases.

Версия 1.0.0-alpha01

11 января 2023 г.

androidx.wear.protolayout:protolayout-expression:1.0.0-alpha01 and androidx.wear.protolayout:protolayout-proto:1.0.0-alpha01 are released. Version 1.0.0-alpha01 contains these commits.

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

  • This release introduces a new library "ProtoLayout Expression" for creating expressions from dynamic variables.