constraintlayout 滚动,是否可以在蓝图模式下使用ConstraintLayout滚动ScrollView?

So I have been developing this layout using a ConstraintLayout inside a ScrollView. It works fine, but now I have hit a problem. I have to expand the layout outside the screen. I can scroll in Design mode, but I cannot add anything without it getting stuck to the top. The constraints are for earlier objects, not the current one I'm adding.

I can add constraints in Blueprint mode, but it looks like I cannot scroll the ScrollView in blueprint mode. Is this even possible? Using Android Studio 2.2(release) and constraint-layout:1.0.0-alpha8

I tried doing it like in Design mode, but it doesn't scroll. Any ideas?

Scrolling normally with ConstraintLayout causes the constraints to stay in the same location.

EDIT:

Updated to alpha9 but still does not solve it

EDIT 2:

beta1 does not work either. AS 2.2.2.

EDIT 3:

Sample layout:

android:text="Button"

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:id="@+id/sampleButton"

/>

android:layout_width="match_parent"

android:layout_height="match_parent"

tools:ignore="HardcodedText">

android:orientation="vertical" android:layout_width="match_parent"

android:layout_height="wrap_content">

解决方案

As of ConstraintLayout 1.0.1 scrolling scrolls the constraints. Meaning it is possible to scroll a ConstraintLayout in blueprint mode and it functions as expected. It works at Android Studio 2.3.2 and up (I haven't older versions).

Now when scrolling, both the visible view, the border, and constraints move along with the drawn button.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值