<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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="wrap_content"
    android:orientation="horizontal">

    <ImageView
        android:id="@+id/ivRemove"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_vertical"
        android:layout_marginStart="8dp"
        android:layout_marginEnd="4dp"
        android:src="@drawable/ic_remove_viewer_sort"
        android:visibility="gone"
        tools:visibility="visible" />

    <FrameLayout
        android:id="@+id/ivRelationContainer"
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:layout_marginStart="8dp"
        android:layout_marginTop="10dp"
        android:layout_marginBottom="10dp"
        android:background="@drawable/ic_relation_format_background">

        <com.anytypeio.anytype.core_ui.widgets.RelationFormatIconWidget
            android:id="@+id/ivRelation"
            android:layout_gravity="center"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            tools:src="@drawable/ic_relation_format_checkbox_small"/>

    </FrameLayout>

    <LinearLayout
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_marginStart="12dp"
        android:layout_weight="1"
        android:gravity="center_vertical"
        android:orientation="vertical">

        <TextView
            android:id="@+id/tvTitle"
            style="@style/ViewerSortTitleStyle"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            app:layout_constraintBottom_toTopOf="@+id/tvSubtitle"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@+id/ivRelation"
            app:layout_constraintTop_toTopOf="parent"
            tools:text="Title" />

        <TextView
            android:id="@+id/tvSubtitle"
            style="@style/ViewerSortSubtitleStyle"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@+id/ivRelation"
            app:layout_constraintTop_toBottomOf="@+id/tvTitle"
            tools:text="Subtitle" />

    </LinearLayout>

    <ImageView
        android:id="@+id/ivGo"
        android:layout_width="24dp"
        android:layout_height="24dp"
        android:layout_gravity="center_vertical"
        android:src="@drawable/ic_viewer_sort_arrow" />

</LinearLayout>