因此,我一直在使用 ScrollView 中的 ConstraintLayout 开发此布局。它工作正常,但现在我遇到了一个问题。我必须在屏幕外展开布局。我可以在设计模式下滚动,但我不能添加任何东西而不让它卡在顶部。约束是针对早期对象的,而不是我添加的当前对象。
我可以在蓝图模式下添加约束,但看起来我无法在蓝图模式下滚动 ScrollView。这甚至可能吗?使用 Android Studio 2.2(release) 和constraint-layout:1.0.0-alpha8
我试着像在设计模式下那样做,但它不会滚动。有任何想法吗?
使用 ConstraintLayout 正常滚动会导致约束保持在同一位置。
编辑:
更新到alpha9
但仍然没有解决它
编辑2:
beta1 也不起作用。如 2.2.2。
编辑 3:
样本布局:
<Button
android:text="Button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/sampleButton"
/>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:ignore="HardcodedText">
<android.support.constraint.ConstraintLayout
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- ETC constraints -->
</android.support.constraint.ConstraintLayout>
</ScrollView>