Vì vậy, gần đây, với Android Studio 2.2, có một ConstraintLayout mới giúp thiết kế dễ dàng hơn rất nhiều, nhưng không giống như RelativeLayoutvà Linearlayout, tôi không thể sử dụng a ScrollViewđể bao quanh ConstraintLayot. Điều này có khả thi không? Nếu vậy, làm thế nào?
I E
<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>
layout_height="wrap_content", Ứng dụng sẽ hiển thị màn hình trống, nhưng nếu tôi sử dụng layout_height="match_parent", Ứng dụng sẽ không cuộn.