所以最近,在 Android Studio 2.2 中,有一个新的 ConstraintLayout 可以让设计变得更容易,但与RelativeLayout
and不同Linearlayout
,我不能使用ScrollView
to 环绕ConstraintLayout
。这可能吗?如果是这样,怎么做?
IE
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:layout_editor_absoluteX="0dp"
tools:layout_editor_absoluteY="0dp">
<android.support.constraint.ConstraintLayout
android:id="@+id/constraintLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:layout_editor_absoluteX="0dp"
tools:layout_editor_absoluteY="0dp">
<!-- Have whatever children you want inside -->
</android.support.constraint.ConstraintLayout>
</ScrollView>