Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ScrollView and ConstraintLayout leave a huge white space at the bottom

I'm designing a settings screen. As there might be a lot of options I wrapped my ConstraintLayout in a ScrollView. However, there is a huge white space at the bottom that I can't get rid of. I already added fillViewPort="true" to the ScrollView as suggested in numerous other answers on the topic.

Here is my layout file :

<?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>

The result :

Initial screen enter image description here

Fully scrolled enter image description here

like image 682
ArcDexx Avatar asked Nov 07 '22 07:11

ArcDexx


1 Answers

It seems you set the constraints wrong. Be careful when creating the xml with ConstraintLayout and pay attention to views which cannot connect to each other. This means that something got wrong. I copied your code and reconnected all the constraints. For me, there is no bottom space now.

<?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>

like image 76
AloDev Avatar answered Nov 15 '22 10:11

AloDev