Platform
Android Studio
Google Play
Jetpack
Docs
Blog
Download
What's New
User Guide
Preview
Home
Platform
Android Studio
Download
What's New
User Guide
Preview
Google Play
Docs
Blog
Download a Preview
Install Alongside Stable
New Features
Release Updates
Updates archive
►
2024
2024
(73)
►
October
October
(2)
►
September
September
(8)
►
August
August
(9)
►
July
July
(6)
►
June
June
(7)
►
May
May
(9)
►
April
April
(9)
►
March
March
(6)
►
February
February
(8)
►
January
January
(9)
►
2023
2023
(76)
►
December
December
(4)
►
November
November
(9)
►
October
October
(7)
►
September
September
(8)
►
August
August
(3)
►
July
July
(4)
►
June
June
(6)
►
May
May
(10)
►
April
April
(4)
►
March
March
(7)
►
February
February
(9)
►
January
January
(5)
►
2022
2022
(59)
►
December
December
(3)
►
November
November
(5)
►
October
October
(8)
►
September
September
(4)
►
August
August
(4)
►
July
July
(2)
►
June
June
(7)
►
May
May
(6)
►
April
April
(5)
►
March
March
(6)
►
February
February
(5)
►
January
January
(4)
►
2021
2021
(54)
►
December
December
(3)
►
November
November
(2)
►
October
October
(6)
►
September
September
(4)
►
August
August
(5)
►
July
July
(8)
►
June
June
(4)
►
May
May
(5)
►
April
April
(1)
►
March
March
(7)
►
February
February
(4)
►
January
January
(5)
►
2020
2020
(107)
►
December
December
(7)
►
November
November
(3)
►
October
October
(8)
►
September
September
(6)
►
August
August
(11)
►
July
July
(14)
►
June
June
(10)
►
May
May
(12)
►
April
April
(11)
►
March
March
(11)
►
February
February
(6)
►
January
January
(8)
►
2019
2019
(145)
►
December
December
(16)
►
November
November
(12)
►
October
October
(10)
►
September
September
(13)
►
August
August
(12)
►
July
July
(6)
►
June
June
(9)
►
May
May
(18)
►
April
April
(14)
►
March
March
(12)
►
February
February
(10)
►
January
January
(13)
▼
2018
2018
(128)
▼
December
December
(13)
Emulator 28.1.0 Canary
ConstraintLayout 2.0.0 alpha 3
Emulator 28.0.22 Stable
Emulator 28.0.22 Canary
Android Studio 3.3 Release Candidate 3 available
Android Studio 3.4 Canary 9 available
Android Studio 3.4 Canary 8 available
Emulator 28.0.21 Canary
Emulator 28.0.20 Stable
Emulator 28.0.20 Canary
Emulator 28.0.19 Canary
Android Studio 3.3 Release Candidate 2 available
Android Studio 3.4 Canary 7 available
►
November
November
(12)
►
October
October
(10)
►
September
September
(10)
►
August
August
(16)
►
July
July
(10)
►
June
June
(13)
►
May
May
(9)
►
April
April
(11)
►
March
March
(12)
►
February
February
(9)
►
January
January
(3)
►
2017
2017
(48)
►
December
December
(3)
►
November
November
(2)
►
October
October
(8)
►
September
September
(3)
►
August
August
(4)
►
July
July
(3)
►
June
June
(3)
►
May
May
(4)
►
April
April
(5)
►
March
March
(5)
►
February
February
(6)
►
January
January
(2)
►
2016
2016
(5)
►
December
December
(3)
►
November
November
(2)
Subscribe to updates
Posts
Atom
Posts
Android Developers
Android Studio
Preview
Release Updates
ConstraintLayout 2.0.0 alpha 3
Friday, December 21, 2018
We just released ConstraintLayout 2.0.0 alpha 3. It’s available from the google maven repository:
dependencies {
implementation 'com.android.support.constraint:constraint-layout:2.0.0-alpha3'
}
or if using the AndroidX packages:
dependencies {
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3'
}
Changes
This release contains various bug fixes and performance improvements:
Barrier fixes
Chains optimizations
Fixed glitches in MotionLayout touch handling (end state could be triggered incorrectly)
We also added several new features to MotionLayout:
New XML format for specifying ConstraintSets, allowing finer-grained overrides
KeyTimeCycle
: a keyframe that allows you to define a cycle driven by time instead of by the transition (e.g. a pulsating color defined this way will keep pulsating even if the overall transition is stopped)
KeyPosition now supports percentWidth/percentHeight
KeyTrigger
: a keyframe that can fire callbacks depending on the current animation progress
Supports custom interpolators (referencing a Framework XML interpolator)
Touch interactions can now drive multiple state transitions seamlessly one after another
OnClick
: now supports multiple OnClick per MotionScene.
Important:
motion:mode
has been renamed to
motion:clickAction
.
Added ImageFilterButton, an equivalent of ImageFilterView but extending ImageButton
Added new callbacks in TransitionListener
New XML Format for ConstraintSet
An important addition in alpha 3 is a new way of defining ConstraintSet in the MotionScene file. Previously,
<Constraint>
elements had to contain all attributes defined on a view (as we replace everything when you apply them). Now, you can instead only add the specific areas you are modifying, as sub-elements of
<Constraint>
:
<Layout>
: layout-related (constraints) attributes
<PropertySet>
: visibility, alpha and progress
<Transform>
: scale, translation, rotation, pivot, elevation
<Motion>
: easing, arc motion, etc.
For example, let's say that you wanted to only modify the rotation of a widget in a ConstraintSet. Previously you would have needed to repeat all the attributes to preserve the position of the widget:
<Constraint
android:id="@+id/button"
android:layout_width="64dp"
android:layout_height="64dp"
android:layout_marginTop="100dp"
motion:layout_constraintStart_toStartOf="parent"
motion:layout_constraintEnd_toEndOf="parent"
motion:layout_constraintTop_toTopOf="parent"
android:rotation="45"
/>
With alpha 3 you can instead only specify the Transform area, the rest will be unaffected:
<Constraint android:id="@+id/button">
<Transform
motion:rotation="45" />
</Constraint>