<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout 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:layout_margin="16dp"
    android:focusableInTouchMode="true"
    tools:context="createchannel.ui.CreateChannelFragment">

    <com.wang.avi.AVLoadingIndicatorView
        android:id="@+id/view_loading"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:visibility="gone"
        app:indicatorColor="@color/colorBlack"
        app:indicatorName="BallPulseIndicator"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        tools:visibility="visible" />

    <TextView
        android:id="@+id/text_channel_type"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/msg_public_channel"
        android:textColor="@color/colorPrimaryText"
        android:textSize="16sp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <TextView
        android:id="@+id/text_channel_type_description"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/msg_public_channel_description"
        android:textColor="@color/colorSecondaryText"
        android:textSize="12sp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/text_channel_type" />

    <Switch
        android:id="@+id/switch_channel_type"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintBottom_toBottomOf="@+id/text_channel_type_description"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="@+id/text_channel_type" />

    <TextView
        android:id="@+id/text_read_only"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="16dp"
        android:text="@string/msg_ready_only_channel"
        android:textColor="@color/colorPrimaryText"
        android:textSize="16sp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/text_channel_type_description" />

    <TextView
        android:id="@+id/text_read_only_description"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/msg_ready_only_channel_description"
        android:textColor="@color/colorSecondaryText"
        android:textSize="12sp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/text_read_only" />

    <Switch
        android:id="@+id/switch_read_only"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintBottom_toBottomOf="@+id/text_read_only_description"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="@+id/text_read_only" />

    <ImageView
        android:id="@+id/image_channel_icon"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="22dp"
        android:src="@drawable/ic_hashtag_black_12dp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/text_read_only_description" />

    <EditText
        android:id="@+id/text_channel_name"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:backgroundTint="@color/colorDim"
        android:hint="@string/msg_channel_name"
        android:inputType="text"
        android:maxLines="1"
        android:paddingEnd="10dp"
        android:paddingStart="24dp"
        android:textSize="16sp"
        app:layout_constraintBottom_toBottomOf="@+id/image_channel_icon"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@+id/image_channel_icon"
        app:layout_constraintTop_toTopOf="@+id/image_channel_icon" />

    <ImageView
        android:id="@+id/image_invite_member"
        android:layout_width="14dp"
        android:layout_height="14dp"
        android:layout_marginTop="16dp"
        android:src="@drawable/ic_at_black_24dp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/text_channel_name" />

    <EditText
        android:id="@+id/text_invite_members"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:backgroundTint="@color/colorDim"
        android:hint="@string/msg_invite_members"
        android:inputType="text"
        android:maxLines="1"
        android:paddingEnd="10dp"
        android:paddingStart="24dp"
        android:textSize="16sp"
        app:layout_constraintBottom_toBottomOf="@+id/image_invite_member"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@+id/image_invite_member"
        app:layout_constraintTop_toTopOf="@+id/image_invite_member" />

    <android.support.constraint.ConstraintLayout
        android:id="@+id/view_member_suggestion"
        android:layout_width="match_parent"
        android:layout_height="100dp"
        android:layout_marginEnd="12dp"
        android:layout_marginStart="12dp"
        android:background="@color/colorWhite"
        android:elevation="2dp"
        android:orientation="vertical"
        android:visibility="gone"
        app:layout_constraintBottom_toTopOf="@+id/text_invite_members">

        <android.support.v7.widget.RecyclerView
            android:id="@+id/recycler_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:visibility="gone" />

        <com.wang.avi.AVLoadingIndicatorView
            android:id="@+id/view_member_suggestion_loading"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:visibility="gone"
            app:indicatorColor="@color/colorBlack"
            app:indicatorName="BallPulseIndicator"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <TextView
            android:id="@+id/text_member_not_found"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/msg_member_not_found"
            android:visibility="gone"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />
    </android.support.constraint.ConstraintLayout>

    <android.support.design.chip.ChipGroup
        android:id="@+id/chip_group_member"
        style="@style/Widget.MaterialComponents.Chip.Entry"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="16dp"
        android:visibility="gone"
        app:chipSpacing="3dp"
        app:layout_constraintTop_toBottomOf="@+id/text_invite_members" />

</android.support.constraint.ConstraintLayout>