codelab-constraint-layout icon indicating copy to clipboard operation
codelab-constraint-layout copied to clipboard

In Android Studio 2.3, `Autoconnect` only works with parents

Open dannyroa opened this issue 7 years ago • 5 comments

The codelabs is incorrect because instruction is to use AutoConnect to neighboring views.

dannyroa avatar Mar 13 '17 03:03 dannyroa

To expand on the issue, I can't complete Step 8 (Using Autoconnect to create constraints) of the tutorial.

Look at android developer reference Build a Responsive UI with ConstraintLayout. Under section "Automatically Create Constraints", it says the following:

When turned on, it [autoconnect] automatically creates two or more constraints for each view as you add them to the layout, but only when appropriate to constrain the view to the parent layout. Autoconnect does not create constraints to other views in the layout.

tl;dr: Autoconnect only make constraints with respect to parent layout, not other views. The tutorial says otherwise.

zawmai avatar Apr 03 '17 19:04 zawmai

Thanks. Yes the AutoConnect behavior has been modified. Let me update the codelab!

nageshs avatar Apr 04 '17 04:04 nageshs

+1. I try the ConstraintLayout today and I see that the Autoconnect only work with the parents.

jeancdc avatar Apr 14 '17 14:04 jeancdc

+1 Today I couln't finish step 8 of codelabs because of this as well. The tutorial should be updated. Thanks @nageshs!

Btw there's also a difference in percentage of vertical bias, 81% is 19% now.

micer avatar Apr 19 '17 15:04 micer

@dannyroa I think this issue should be closed now.

zawmai avatar Jun 15 '17 08:06 zawmai