<?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="wrap_content"
    android:padding="24dp">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvCaption"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/title_open_link"
            android:textAppearance="@style/TextAppearance.AppCompat.Large"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvTitle"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="24dp"
            android:layout_marginEnd="12dp"
            android:labelFor="@+id/etLink"
            android:text="Link title"
            android:textAppearance="@style/TextAppearance.AppCompat.Medium"
            android:textStyle="italic"
            app:layout_constraintEnd_toStartOf="@+id/ibShare"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvCaption" />

        <ImageButton
            android:id="@+id/ibShare"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginEnd="12dp"
            android:background="?android:attr/selectableItemBackgroundBorderless"
            android:contentDescription="@string/title_share"
            app:layout_constraintBottom_toBottomOf="@id/tvTitle"
            app:layout_constraintEnd_toStartOf="@+id/ibCopy"
            app:srcCompat="@drawable/baseline_share_24" />

        <ImageButton
            android:id="@+id/ibCopy"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="?android:attr/selectableItemBackgroundBorderless"
            android:contentDescription="@string/title_clipboard_copy"
            app:layout_constraintBottom_toBottomOf="@id/tvTitle"
            app:layout_constraintEnd_toEndOf="parent"
            app:srcCompat="@drawable/baseline_bookmarks_24" />

        <EditText
            android:id="@+id/etLink"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:imeOptions="actionDone"
            android:inputType="textUri|textMultiLine"
            android:text="https://email.faircode.eu/"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvTitle" />

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvDifferent"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="24dp"
            android:text="@string/title_different_link"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            android:textColor="?attr/colorWarning"
            android:textStyle="bold"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/etLink" />

        <CheckBox
            android:id="@+id/cbSecure"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:text="@string/title_link_http"
            android:textColor="?attr/colorWarning"
            android:textStyle="bold"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvDifferent" />

        <CheckBox
            android:id="@+id/cbSanitize"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:text="@string/title_sanitize_link"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/cbSecure" />

        <Button
            android:id="@+id/btnOwner"
            style="@style/buttonStyleSmall"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:minWidth="0dp"
            android:minHeight="0dp"
            android:text="@string/title_check_owner"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/cbSanitize" />

        <eu.faircode.email.ContentLoadingProgressBar
            android:id="@+id/pbWait"
            style="@style/Base.Widget.AppCompat.ProgressBar"
            android:layout_width="24dp"
            android:layout_height="24dp"
            android:layout_marginStart="12dp"
            android:indeterminate="true"
            app:layout_constraintBottom_toBottomOf="@id/btnOwner"
            app:layout_constraintStart_toEndOf="@id/btnOwner"
            app:layout_constraintTop_toTopOf="@id/btnOwner" />

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvOwnerRemark"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/title_remark_owner"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            android:textStyle="italic"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/btnOwner" />

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvOwnerTitle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:text="@string/title_ip_owner"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvOwnerRemark" />

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvHost"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="example.org"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            android:textColor="?android:textColorPrimary"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvOwnerTitle" />

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvOwner"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Cloudflare"
            android:textAppearance="@style/TextAppearance.AppCompat.Medium"
            android:textColor="?android:textColorPrimary"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvHost" />

        <androidx.constraintlayout.widget.Group
            android:id="@+id/grpOwner"
            android:layout_width="0dp"
            android:layout_height="0dp"
            app:constraint_referenced_ids="tvOwnerTitle,tvHost,tvOwner" />
    </androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>