No matter what I type in layout_height, the height of ConstraintLayout seem to be the same as phone screen size. Is there any way I could design it to automatically fit its height to total height of its content?
<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"
    android:fillViewport="true"
    tools:context="stfn.personaltrainer.activities.Training">
    <android.support.constraint.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="10dp">
        <TextView
            android:id="@+id/exerciceName"
            android:layout_width="277dp"
            android:layout_height="41dp"
            android:layout_marginTop="4dp"
            android:text="Exercice name"
            android:textAlignment="center"
            android:textSize="36sp"
            app:layout_constraintHorizontal_bias="0.504"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toTopOf="parent" />
        <!-- TextViews, Buttons, etc. -->
        <Button
            android:id="@+id/repetitionsDone"
            android:layout_width="118dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="50dp"
            android:onClick="goToNextSeries"
            android:text="@string/done"
            android:textAppearance="@style/TextAppearance.AppCompat.Button"
            app:layout_constraintLeft_toLeftOf="parent"
            app:layout_constraintRight_toRightOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/repetitionsInCurrentSeries" />
    </android.support.constraint.ConstraintLayout>
</ScrollView>

 
    