<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/new_conversation_coordinator"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <org.fossify.commons.views.MyAppBarLayout
        android:id="@+id/new_conversation_appbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <com.google.android.material.appbar.MaterialToolbar
            android:id="@+id/new_conversation_toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="@color/color_primary"
            app:title="@string/new_conversation"
            app:titleTextAppearance="@style/AppTheme.ActionBar.TitleTextStyle" />

    </org.fossify.commons.views.MyAppBarLayout>

    <RelativeLayout
        android:id="@+id/new_conversation_holder"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior">

        <org.fossify.commons.views.MyEditText
            android:id="@+id/new_conversation_address"
            android:layout_width="match_parent"
            android:layout_height="@dimen/normal_icon_size"
            android:layout_marginStart="@dimen/activity_margin"
            android:layout_marginEnd="@dimen/activity_margin"
            android:layout_toStartOf="@+id/new_conversation_confirm"
            android:background="@android:color/transparent"
            android:gravity="center_vertical"
            android:hint="@string/add_contact_or_number"
            android:inputType="textCapWords"
            android:textSize="@dimen/big_text_size" />

        <ImageView
            android:id="@+id/new_conversation_confirm"
            android:layout_width="@dimen/normal_icon_size"
            android:layout_height="@dimen/normal_icon_size"
            android:layout_alignTop="@+id/new_conversation_address"
            android:layout_alignBottom="@+id/new_conversation_address"
            android:layout_alignParentEnd="true"
            android:background="?selectableItemBackgroundBorderless"
            android:padding="@dimen/medium_margin"
            android:src="@drawable/ic_check_vector"
            android:visibility="gone" />

        <ImageView
            android:id="@+id/add_contact_divider"
            android:layout_width="match_parent"
            android:layout_height="@dimen/divider_height"
            android:layout_below="@+id/new_conversation_address"
            android:background="@color/divider_grey" />

        <org.fossify.commons.views.MyTextView
            android:id="@+id/no_contacts_placeholder"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@+id/suggestions_scrollview"
            android:layout_centerHorizontal="true"
            android:layout_marginTop="@dimen/bigger_margin"
            android:alpha="0.8"
            android:gravity="center"
            android:paddingLeft="@dimen/activity_margin"
            android:paddingRight="@dimen/activity_margin"
            android:text="@string/no_access_to_contacts"
            android:textSize="@dimen/bigger_text_size"
            android:textStyle="italic"
            android:visibility="gone" />

        <org.fossify.commons.views.MyTextView
            android:id="@+id/no_contacts_placeholder_2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/no_contacts_placeholder"
            android:layout_centerHorizontal="true"
            android:background="@drawable/ripple_all_corners"
            android:gravity="center"
            android:padding="@dimen/activity_margin"
            android:text="@string/request_the_required_permissions"
            android:textSize="@dimen/bigger_text_size"
            android:visibility="gone" />

        <org.fossify.commons.views.MyTextView
            android:id="@+id/suggestions_label"
            style="@style/MaterialSectionLabelStyle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/add_contact_divider"
            android:layout_marginStart="@dimen/activity_margin"
            android:layout_marginBottom="@dimen/medium_margin"
            android:text="@string/suggestions"
            android:textSize="@dimen/normal_text_size" />

        <HorizontalScrollView
            android:id="@+id/suggestions_scrollview"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/suggestions_label"
            android:layout_marginBottom="@dimen/medium_margin"
            android:overScrollMode="never"
            android:scrollbars="none">

            <LinearLayout
                android:id="@+id/suggestions_holder"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:divider="@drawable/linear_layout_horizontal_divider"
                android:orientation="horizontal"
                android:showDividers="middle" />

        </HorizontalScrollView>

        <org.fossify.commons.views.MyRecyclerView
            android:id="@+id/contacts_list"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_below="@+id/suggestions_scrollview"
            android:clipToPadding="false"
            android:layoutAnimation="@anim/layout_animation"
            android:overScrollMode="ifContentScrolls"
            android:scrollbars="none"
            app:layoutManager="org.fossify.commons.views.MyLinearLayoutManager" />

        <com.reddit.indicatorfastscroll.FastScrollerView
            android:id="@+id/contacts_letter_fastscroller"
            android:layout_width="32dp"
            android:layout_height="wrap_content"
            android:layout_alignTop="@+id/contacts_list"
            android:layout_alignParentEnd="true"
            android:paddingTop="@dimen/big_margin"
            android:paddingBottom="@dimen/big_margin" />

        <com.reddit.indicatorfastscroll.FastScrollerThumbView
            android:id="@+id/contacts_letter_fastscroller_thumb"
            android:layout_width="@dimen/fab_size"
            android:layout_height="match_parent"
            android:layout_alignTop="@+id/contacts_letter_fastscroller"
            android:layout_alignBottom="@+id/contacts_letter_fastscroller"
            android:layout_marginEnd="@dimen/activity_margin"
            android:layout_toStartOf="@+id/contacts_letter_fastscroller" />

    </RelativeLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
