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
(34)
►
tháng 5
tháng 5
(2)
►
tháng 4
tháng 4
(9)
►
tháng 3
tháng 3
(6)
►
tháng 2
tháng 2
(8)
►
tháng 1
tháng 1
(9)
►
2023
2023
(76)
►
tháng 12
tháng 12
(4)
►
tháng 11
tháng 11
(9)
►
tháng 10
tháng 10
(7)
►
tháng 9
tháng 9
(8)
►
tháng 8
tháng 8
(3)
►
tháng 7
tháng 7
(4)
►
tháng 6
tháng 6
(6)
►
tháng 5
tháng 5
(10)
►
tháng 4
tháng 4
(4)
►
tháng 3
tháng 3
(7)
►
tháng 2
tháng 2
(9)
►
tháng 1
tháng 1
(5)
►
2022
2022
(59)
►
tháng 12
tháng 12
(3)
►
tháng 11
tháng 11
(5)
►
tháng 10
tháng 10
(8)
►
tháng 9
tháng 9
(4)
►
tháng 8
tháng 8
(4)
►
tháng 7
tháng 7
(2)
►
tháng 6
tháng 6
(7)
►
tháng 5
tháng 5
(6)
►
tháng 4
tháng 4
(5)
►
tháng 3
tháng 3
(6)
►
tháng 2
tháng 2
(5)
►
tháng 1
tháng 1
(4)
►
2021
2021
(54)
►
tháng 12
tháng 12
(3)
►
tháng 11
tháng 11
(2)
►
tháng 10
tháng 10
(6)
►
tháng 9
tháng 9
(4)
►
tháng 8
tháng 8
(5)
►
tháng 7
tháng 7
(8)
►
tháng 6
tháng 6
(4)
►
tháng 5
tháng 5
(5)
►
tháng 4
tháng 4
(1)
►
tháng 3
tháng 3
(7)
►
tháng 2
tháng 2
(4)
►
tháng 1
tháng 1
(5)
►
2020
2020
(107)
►
tháng 12
tháng 12
(7)
►
tháng 11
tháng 11
(3)
►
tháng 10
tháng 10
(8)
►
tháng 9
tháng 9
(6)
►
tháng 8
tháng 8
(11)
►
tháng 7
tháng 7
(14)
►
tháng 6
tháng 6
(10)
►
tháng 5
tháng 5
(12)
►
tháng 4
tháng 4
(11)
►
tháng 3
tháng 3
(11)
►
tháng 2
tháng 2
(6)
►
tháng 1
tháng 1
(8)
►
2019
2019
(145)
►
tháng 12
tháng 12
(16)
►
tháng 11
tháng 11
(12)
►
tháng 10
tháng 10
(10)
►
tháng 9
tháng 9
(13)
►
tháng 8
tháng 8
(12)
►
tháng 7
tháng 7
(6)
►
tháng 6
tháng 6
(9)
►
tháng 5
tháng 5
(18)
►
tháng 4
tháng 4
(14)
►
tháng 3
tháng 3
(12)
►
tháng 2
tháng 2
(10)
►
tháng 1
tháng 1
(13)
▼
2018
2018
(128)
▼
tháng 12
tháng 12
(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
►
tháng 11
tháng 11
(12)
►
tháng 10
tháng 10
(10)
►
tháng 9
tháng 9
(10)
►
tháng 8
tháng 8
(16)
►
tháng 7
tháng 7
(10)
►
tháng 6
tháng 6
(13)
►
tháng 5
tháng 5
(9)
►
tháng 4
tháng 4
(11)
►
tháng 3
tháng 3
(12)
►
tháng 2
tháng 2
(9)
►
tháng 1
tháng 1
(3)
►
2017
2017
(48)
►
tháng 12
tháng 12
(3)
►
tháng 11
tháng 11
(2)
►
tháng 10
tháng 10
(8)
►
tháng 9
tháng 9
(3)
►
tháng 8
tháng 8
(4)
►
tháng 7
tháng 7
(3)
►
tháng 6
tháng 6
(3)
►
tháng 5
tháng 5
(4)
►
tháng 4
tháng 4
(5)
►
tháng 3
tháng 3
(5)
►
tháng 2
tháng 2
(6)
►
tháng 1
tháng 1
(2)
►
2016
2016
(5)
►
tháng 12
tháng 12
(3)
►
tháng 11
tháng 11
(2)
Subscribe to updates
Bài đăng
Atom
Bài đăng
Android Developers
Android Studio
Preview
Release Updates
ConstraintLayout 2.0.0 alpha 3
Thứ Sáu, 21 tháng 12, 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>