Zoe*_*Zoe 12 android android-layout android-scrollview android-studio-2.2 android-constraintlayout
所以我一直在ScrollView中使用ConstraintLayout开发这个布局.它工作正常,但现在我遇到了问题.我必须在屏幕外扩展布局.我可以在设计模式下滚动,但如果没有它被卡在顶部,我就无法添加任何内容.约束是针对早期的对象,而不是我正在添加的当前对象.
我可以在Blueprint模式下添加约束,但看起来我无法在蓝图模式下滚动ScrollView.这甚至可能吗?使用Android Studio 2.2(发布)和constraint-layout:1.0.0-alpha8
我尝试在设计模式下这样做,但它不滚动.有任何想法吗?
使用ConstraintLayout正常滚动会导致约束停留在同一位置.
编辑:
已更新alpha9但仍未解决
编辑2:
beta1也不起作用.AS 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>
Run Code Online (Sandbox Code Playgroud)
从 ConstraintLayout 1.0.1 开始,滚动会滚动约束。这意味着可以在蓝图模式下滚动 ConstraintLayout 并且它可以按预期运行。它适用于 Android Studio 2.3.2 及更高版本(我没有旧版本)。
现在,当滚动时,可见视图、边框和约束都会随着绘制的按钮一起移动。