Stay organized with collections Save and categorize content based on your preferences.

wear protolayout

  
This library allows defining a set of UI layouts and non-UI expressions to be rendered/evaluated on a remote surfaces.
Latest Update Stable Release Release Candidate Beta Release Alpha Release
March 22, 2023 - - - 1.0.0-alpha06

Declaring dependencies

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.

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

Groovy

dependencies {
    implementation "androidx.wear.protolayout:protolayout-proto:1.0.0-alpha06"
    implementation "androidx.wear.protolayout:protolayout-expression:1.0.0-alpha06"
}

Kotlin

dependencies {
    implementation("androidx.wear.protolayout:protolayout-proto:1.0.0-alpha06")
    implementation "androidx.wear.protolayout:protolayout-expression:1.0.0-alpha06"
}

For more information about dependencies, see Add build dependencies.

Feedback

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

Create a new issue

See the Issue Tracker documentation for more information.

Version 1.0

Version 1.0.0-alpha06

March 22, 2023

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

New Features

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

  • LoadActionListener has been added to ProtoLayoutViewInstance. (If7806)

Bug Fixes

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

Version 1.0.0-alpha05

March 8, 2023

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

New Features

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

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

Bug Fixes

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

Version 1.0.0-alpha04

February 22, 2023

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

New Features

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

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

Bug Fixes

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

Version 1.0.0-alpha03

February 8, 2023

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

New Features

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

Version 1.0.0-alpha02

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

New Features

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

Version 1.0.0-alpha01

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

New Features

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