We just published ConstraintLayout beta 5. As always, it's available in the SDK Manager (under the "Support Repository" section). We recommend to update to this version -- it will be the last beta before 1.0 and is considered as the release candidate. Key Changes:
Note: if you are using Android Studio 2.2, you might have to do File->Invalidate Caches & restart studio after installing this version (the editor behavior may not be correct, with widgets temporarily snapping to the top left corner or not shown). Using Android Studio 2.3 is strongly encouraged. MATCH_PARENT MATCH_PARENT is not valid in ConstraintLayout when set on its children, and its behavior undefined. To reduce the risk of errors we now throws an exception if we encounter it. Improved performance This release fixes a few issues and performance improvements (notably, wrap_content measure on the layout got a ~30-40% speed bump). Better view dimension controls The new available behaviors when a dimension is set to 0dp (MATCH_CONSTRAINT). As before, both endpoints (left/right or top/bottom) need to be connected to targets.
Additionally, minimum and maximum dimensions can be specified (they will only apply to MATCH_CONSTRAINT widgets):
Spread provides the previous behaviour of expanding to fill the area defined by the constraints. Wrap provides a significant new behaviour, with the widget resizing as if wrap_content was used, but limited by the connected constraints. A widget will thus not grow beyond the endpoints.Gone Behavior in Chains Previously, this was not handled -- views in a Chain would disappear but still take space. Now, if a view in a chain is marked as GONE, the chain will react as if the view didn’t exist. Improved Ratio Support Here the widget has both dimension set to MATCH_CONSTRAINT (0dp), and the attribute layout_constraintDimensionRatio=”16:9” |
Recent Changes >