ScrollView и ConstraintLayout оставляют огромное пустое пространство внизу - PullRequest
0 голосов
/ 27 апреля 2018

Я проектирую экран настроек. Поскольку вариантов может быть много, я поместил свой ConstraintLayout в ScrollView. Однако внизу есть огромное пустое пространство, от которого я не могу избавиться. Я уже добавил fillViewPort="true" к ScrollView, как предлагалось во многих других ответах по теме.

Вот мой файл макета:

<?xml version="1.0" encoding="utf-8"?>
<ScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fillViewport="true">

    <android.support.constraint.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:animateLayoutChanges="true">

        <TextView
            android:id="@+id/settings_security"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="24dp"
            android:layout_marginTop="16dp"
            android:text="Hello there"
            android:textAllCaps="true"
            android:textColor="@color/holo_blue_light"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <com.filecloud.android.components.TopTextView
            android:id="@+id/settings_enable_lock"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="24dp"
            android:layout_marginTop="8dp"
            android:text="Hello there"
            android:textSize="18sp"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/settings_security" />

        <Switch
            android:id="@+id/settings_enable_lock_switch"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginEnd="24dp"
            app:layout_constraintBottom_toBottomOf="@id/settings_enable_lock"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@id/settings_enable_lock"
            app:layout_constraintTop_toTopOf="@id/settings_enable_lock"
            app:layout_constraintVertical_bias="0.5"
            app:layout_constraintHorizontal_bias="1"/>

        <FrameLayout
            android:id="@+id/settings_change_lock"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingStart="24dp"
            android:paddingTop="16dp"
            android:paddingBottom="16dp"
            android:clickable="true"
            android:foreground="?android:attr/selectableItemBackground"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/settings_enable_lock_switch">

        <com.filecloud.android.components.TopTextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Hello there"
            android:textSize="18sp" />

    </FrameLayout>

    <com.filecloud.android.components.TopTextView
        android:id="@+id/settings_enable_integration"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="24dp"
        android:text="Hello there"
        android:textSize="18sp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/settings_change_lock" />

    <com.filecloud.android.components.TopTextView
        android:id="@+id/settings_enable_integration_hint"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="24dp"
        android:text="Hello there"
        android:textSize="14sp"
        android:textColor="@color/settings_hint"
        android:textStyle="bold"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/settings_enable_integration" />


    <Switch
        android:id="@+id/settings_enable_integration_switch"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="24dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@id/settings_enable_integration"
        app:layout_constraintTop_toTopOf="@id/settings_enable_integration"
        app:layout_constraintBottom_toBottomOf="@id/settings_enable_integration_hint"
        app:layout_constraintVertical_bias="0.5"
        app:layout_constraintHorizontal_bias="1" />

    <View
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:background="@color/light_grey"
        android:layout_marginTop="16dp"
        app:layout_constraintTop_toBottomOf="@id/settings_enable_integration_hint" />

    <TextView
        android:id="@+id/settings_media_sync"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="24dp"
        android:layout_marginTop="32dp"
        android:text="Hello there"
        android:textAllCaps="true"
        android:textColor="@color/holo_blue_light"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/settings_enable_integration_hint" />

    <com.filecloud.android.components.TopTextView
        android:id="@+id/settings_enable_media_sync"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="24dp"
        android:layout_marginTop="8dp"
        android:text="Hello there"
        android:textSize="18sp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/settings_media_sync" />

    <com.filecloud.android.components.TopTextView
        android:id="@+id/settings_enable_media_sync_hint"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="24dp"
        android:text="Hello there"
        android:textSize="14sp"
        android:textColor="@color/settings_hint"
        android:textStyle="bold"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/settings_enable_media_sync" />


    <Switch
        android:id="@+id/settings_enable_media_sync_switch"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="24dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@id/settings_enable_media_sync"
        app:layout_constraintTop_toTopOf="@id/settings_enable_media_sync"
        app:layout_constraintBottom_toBottomOf="@id/settings_enable_media_sync_hint"
        app:layout_constraintVertical_bias="0.5"
        app:layout_constraintHorizontal_bias="1" />

    <LinearLayout
        android:id="@+id/settings_media_sync_source"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingStart="24dp"
        android:paddingTop="16dp"
        android:paddingBottom="16dp"
        android:clickable="true"
        android:orientation="vertical"
        android:foreground="?android:attr/selectableItemBackground"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/settings_enable_media_sync_hint">

        <com.filecloud.android.components.TopTextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Hello there"
            android:textSize="18sp" />

        <com.filecloud.android.components.TopTextView
            android:id="@+id/settings_media_sync_source_hint"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/mediasync_default"
            android:textSize="14sp"
            android:textColor="@color/settings_hint"
            android:textStyle="bold" />

        </LinearLayout>

    <com.filecloud.android.components.TopTextView
        android:id="@+id/settings_media_sync_destination_folder"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="24dp"
        android:text="Hello there"
        android:textSize="18sp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/settings_media_sync_source" />

    <com.filecloud.android.components.TopTextView
        android:id="@+id/settings_media_sync_destination_folder_hint"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="24dp"
        android:text="Hello there"
        android:textSize="14sp"
        android:textColor="@color/settings_hint"
        android:textStyle="bold"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/settings_media_sync_destination_folder" />

    <FrameLayout
        android:id="@+id/settings_media_sync_status"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingStart="24dp"
        android:paddingTop="16dp"
        android:paddingBottom="16dp"
        android:clickable="true"
        android:foreground="?android:attr/selectableItemBackground"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/settings_media_sync_destination_folder_hint">

        <com.filecloud.android.components.TopTextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Hello there"
            android:textSize="18sp" />

    </FrameLayout>

    <View
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:background="@color/light_grey"
        app:layout_constraintTop_toBottomOf="@id/settings_media_sync_status" />

    <TextView
        android:id="@+id/settings_offline_sync"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="24dp"
        android:layout_marginTop="16dp"
        android:text="Hello there"
        android:textAllCaps="true"
        android:textColor="@color/holo_blue_light"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/settings_media_sync_status" />

    <com.filecloud.android.components.TopTextView
        android:id="@+id/settings_enable_auto_offline_sync"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="24dp"
        android:layout_marginTop="8dp"
        android:text="Hello there"
        android:textSize="18sp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/settings_offline_sync" />

    <com.filecloud.android.components.TopTextView
        android:id="@+id/settings_enable_auto_offline_sync_hint"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="24dp"
        android:text="Hello there"
        android:textSize="14sp"
        android:textColor="@color/settings_hint"
        android:textStyle="bold"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/settings_enable_auto_offline_sync" />


    <Switch
        android:id="@+id/settings_enable_auto_offline_sync_switch"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="24dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@id/settings_enable_auto_offline_sync"
        app:layout_constraintTop_toTopOf="@id/settings_enable_auto_offline_sync"
        app:layout_constraintBottom_toBottomOf="@id/settings_enable_auto_offline_sync_hint"
        app:layout_constraintVertical_bias="0.5"
        app:layout_constraintHorizontal_bias="1" />

    <View
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:background="@color/light_grey"
        android:layout_marginTop="16dp"
        app:layout_constraintTop_toBottomOf="@id/settings_enable_auto_offline_sync_hint" />

    <TextView
        android:id="@+id/settings_data_usage"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="24dp"
        android:layout_marginTop="32dp"
        android:text="Hello there"
        android:textAllCaps="true"
        android:textColor="@color/holo_blue_light"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/settings_enable_auto_offline_sync_hint" />

    <com.filecloud.android.components.TopTextView
        android:id="@+id/settings_enable_wifi_only"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="24dp"
        android:layout_marginTop="8dp"
        android:text="Hello there"
        android:textSize="18sp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/settings_data_usage" />

    <com.filecloud.android.components.TopTextView
        android:id="@+id/settings_enable_wifi_only_hint"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="24dp"
        android:text="Hello there"
        android:textSize="14sp"
        android:textColor="@color/settings_hint"
        android:textStyle="bold"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/settings_enable_wifi_only" />

    <Switch
        android:id="@+id/settings_enable_wifi_only_switch"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="24dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@id/settings_enable_wifi_only"
        app:layout_constraintTop_toTopOf="@id/settings_enable_wifi_only"
        app:layout_constraintBottom_toBottomOf="@id/settings_enable_wifi_only_hint"
        app:layout_constraintVertical_bias="0.5"
        app:layout_constraintHorizontal_bias="1" />

    </android.support.constraint.ConstraintLayout>

</ScrollView>

Результат:

Начальный экран enter image description here

Полностью прокручен enter image description here

1 Ответ

0 голосов
/ 28 апреля 2018

Кажется, вы неправильно установили ограничения. Будьте осторожны при создании xml с ConstraintLayout и обратите внимание на представления, которые не могут соединиться друг с другом. Это означает, что что-то не так. Я скопировал ваш код и переподключил все ограничения. Для меня сейчас нет дна.

<?xml version="1.0" encoding="utf-8"?>
<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">

<android.support.constraint.ConstraintLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:paddingBottom="8dp"
    android:animateLayoutChanges="true">

    <TextView
        android:id="@+id/settings_security"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="24dp"
        android:layout_marginTop="8dp"
        android:text="Hello there"
        android:textAllCaps="true"
        android:textColor="@color/holo_blue_light"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <com.filecloud.android.components.TopTextView
        android:id="@+id/settings_enable_lock"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="24dp"
        android:layout_marginTop="8dp"
        android:text="Hello there"
        android:textSize="18sp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/settings_security" />

    <Switch
        android:id="@+id/settings_enable_lock_switch"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="24dp"
        app:layout_constraintBottom_toBottomOf="@id/settings_enable_lock"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="1"
        app:layout_constraintStart_toEndOf="@id/settings_enable_lock"
        app:layout_constraintTop_toTopOf="@id/settings_enable_lock"
        app:layout_constraintVertical_bias="0.5" />

    <FrameLayout
        android:id="@+id/settings_change_lock"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="8dp"
        android:clickable="true"
        android:foreground="?android:attr/selectableItemBackground"
        android:paddingBottom="16dp"
        android:paddingStart="24dp"
        android:paddingTop="16dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.5"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/settings_enable_lock">

        <com.filecloud.android.components.TopTextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Hello there"
            android:textSize="18sp" />

    </FrameLayout>

    <com.filecloud.android.components.TopTextView
        android:id="@+id/settings_enable_integration"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="24dp"
        android:layout_marginTop="8dp"
        android:text="Hello there"
        android:textSize="18sp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/settings_change_lock" />

    <com.filecloud.android.components.TopTextView
        android:id="@+id/settings_enable_integration_hint"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="24dp"
        android:layout_marginTop="8dp"
        android:text="Hello there"
        android:textColor="@color/settings_hint"
        android:textSize="14sp"
        android:textStyle="bold"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/settings_enable_integration" />


    <Switch
        android:id="@+id/settings_enable_integration_switch"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="24dp"
        app:layout_constraintBottom_toBottomOf="@id/settings_enable_integration_hint"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="1"
        app:layout_constraintStart_toEndOf="@id/settings_enable_integration"
        app:layout_constraintTop_toTopOf="@id/settings_enable_integration"
        app:layout_constraintVertical_bias="0.5" />

    <View
        android:id="@+id/view19"
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:layout_marginTop="8dp"
        android:background="@color/light_grey"
        app:layout_constraintTop_toBottomOf="@+id/settings_enable_integration_hint" />

    <TextView
        android:id="@+id/settings_media_sync"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="24dp"
        android:layout_marginTop="8dp"
        android:text="Hello there"
        android:textAllCaps="true"
        android:textColor="@color/holo_blue_light"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/view19" />

    <com.filecloud.android.components.TopTextView
        android:id="@+id/settings_enable_media_sync"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="24dp"
        android:layout_marginTop="8dp"
        android:text="Hello there"
        android:textSize="18sp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/settings_media_sync" />

    <com.filecloud.android.components.TopTextView
        android:id="@+id/settings_enable_media_sync_hint"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="24dp"
        android:text="Hello there"
        android:textColor="@color/settings_hint"
        android:textSize="14sp"
        android:textStyle="bold"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/settings_enable_media_sync" />


    <Switch
        android:id="@+id/settings_enable_media_sync_switch"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="24dp"
        app:layout_constraintBottom_toBottomOf="@id/settings_enable_media_sync_hint"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="1"
        app:layout_constraintStart_toEndOf="@id/settings_enable_media_sync"
        app:layout_constraintTop_toTopOf="@id/settings_enable_media_sync"
        app:layout_constraintVertical_bias="0.5" />

    <LinearLayout
        android:id="@+id/settings_media_sync_source"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:clickable="true"
        android:foreground="?android:attr/selectableItemBackground"
        android:orientation="vertical"
        android:paddingBottom="16dp"
        android:paddingStart="24dp"
        android:paddingTop="16dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.5"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/settings_enable_media_sync_hint">

        <com.filecloud.android.components.TopTextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Hello there"
            android:textSize="18sp" />

        <com.filecloud.android.components.TopTextView
            android:id="@+id/settings_media_sync_source_hint"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/mediasync_default"
            android:textColor="@color/settings_hint"
            android:textSize="14sp"
            android:textStyle="bold" />

    </LinearLayout>

    <com.filecloud.android.components.TopTextView
        android:id="@+id/settings_media_sync_destination_folder"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="24dp"
        android:layout_marginTop="8dp"
        android:text="Hello there"
        android:textSize="18sp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/settings_media_sync_source" />

    <com.filecloud.android.components.TopTextView
        android:id="@+id/settings_media_sync_destination_folder_hint"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="24dp"
        android:text="Hello there"
        android:textColor="@color/settings_hint"
        android:textSize="14sp"
        android:textStyle="bold"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/settings_media_sync_destination_folder" />

    <FrameLayout
        android:id="@+id/settings_media_sync_status"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="8dp"
        android:clickable="true"
        android:foreground="?android:attr/selectableItemBackground"
        android:paddingBottom="16dp"
        android:paddingStart="24dp"
        android:paddingTop="16dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.5"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/settings_media_sync_destination_folder_hint">

        <com.filecloud.android.components.TopTextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Hello there"
            android:textSize="18sp" />

    </FrameLayout>

    <View
        android:id="@+id/view20"
        android:layout_width="304dp"
        android:layout_height="1dp"
        android:layout_marginTop="8dp"
        android:background="@color/light_grey"
        app:layout_constraintTop_toBottomOf="@+id/settings_media_sync_status"
        tools:layout_editor_absoluteX="8dp" />

    <TextView
        android:id="@+id/settings_offline_sync"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="24dp"
        android:layout_marginTop="8dp"
        android:text="Hello there"
        android:textAllCaps="true"
        android:textColor="@color/holo_blue_light"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/view20" />

    <com.filecloud.android.components.TopTextView
        android:id="@+id/settings_enable_auto_offline_sync"
        android:layout_width="wrap_content"
        android:layout_height="19dp"
        android:layout_marginStart="24dp"
        android:layout_marginTop="8dp"
        android:text="Hello there"
        android:textSize="18sp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/settings_offline_sync" />

    <com.filecloud.android.components.TopTextView
        android:id="@+id/settings_enable_auto_offline_sync_hint"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="24dp"
        android:text="Hello there"
        android:textColor="@color/settings_hint"
        android:textSize="14sp"
        android:textStyle="bold"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/settings_enable_auto_offline_sync" />


    <Switch
        android:id="@+id/settings_enable_auto_offline_sync_switch"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="24dp"
        app:layout_constraintBottom_toBottomOf="@id/settings_enable_auto_offline_sync_hint"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="1"
        app:layout_constraintStart_toEndOf="@id/settings_enable_auto_offline_sync"
        app:layout_constraintTop_toTopOf="@id/settings_enable_auto_offline_sync"
        app:layout_constraintVertical_bias="0.5" />

    <View
        android:id="@+id/view21"
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:layout_marginTop="16dp"
        android:background="@color/light_grey"
        app:layout_constraintTop_toBottomOf="@+id/settings_enable_auto_offline_sync_hint" />

    <TextView
        android:id="@+id/settings_data_usage"
        android:layout_width="wrap_content"
        android:layout_height="24dp"
        android:layout_marginTop="8dp"
        android:text="Hello there"
        android:textAllCaps="true"
        android:textColor="@color/holo_blue_light"
        app:layout_constraintTop_toBottomOf="@+id/view21"
        tools:layout_editor_absoluteX="24dp" />

    <com.filecloud.android.components.TopTextView
        android:id="@+id/settings_enable_wifi_only"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="24dp"
        android:layout_marginTop="8dp"
        android:text="Hello there"
        android:textSize="18sp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/settings_data_usage" />

    <com.filecloud.android.components.TopTextView
        android:id="@+id/settings_enable_wifi_only_hint"
        android:layout_width="wrap_content"
        android:layout_height="22dp"
        android:layout_marginStart="24dp"
        android:text="Hello there"
        android:textColor="@color/settings_hint"
        android:textSize="14sp"
        android:textStyle="bold"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/settings_enable_wifi_only" />

    <Switch
        android:id="@+id/settings_enable_wifi_only_switch"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="24dp"
        app:layout_constraintBottom_toBottomOf="@id/settings_enable_wifi_only_hint"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="1"
        app:layout_constraintStart_toEndOf="@id/settings_enable_wifi_only"
        app:layout_constraintTop_toTopOf="@id/settings_enable_wifi_only"
        app:layout_constraintVertical_bias="0.5" />

</android.support.constraint.ConstraintLayout>

...