<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/coordinator"
    android:background="@color/windowBackground"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <android.support.design.widget.AppBarLayout
        android:id="@+id/app_bar_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">

        <android.support.design.widget.CollapsingToolbarLayout
            android:id="@+id/collapsing_toolbar"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:contentScrim="?attr/colorPrimary"
            app:expandedTitleTextAppearance="@style/AppTheme.Toolbar.Expanded.Title"
            app:layout_scrollFlags="scroll|exitUntilCollapsed">

            <ImageView
                android:id="@+id/image"
                android:layout_width="match_parent"
                android:layout_height="@dimen/chat_activity_group_admin_panel_recipient_picture_size"
                android:scaleType="centerCrop"
                app:layout_collapseMode="parallax" />

            <View
                android:layout_width="match_parent"
                android:layout_height="?attr/actionBarSize"
                android:layout_gravity="bottom"
                android:background="#90000000"
                app:layout_collapseMode="pin" />

            <android.support.v7.widget.Toolbar
                android:id="@+id/toolbar"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="bottom"
                app:layout_collapseMode="pin"
                app:popupTheme="@style/ThemeOverlay.AppCompat.Light">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="?attr/actionBarSize"
                    android:layout_centerVertical="true"
                    android:layout_toEndOf="@id/conversation_image"
                    android:orientation="vertical"
                    android:paddingBottom="2.0dip"
                    android:paddingEnd="0.0dip"
                    android:paddingStart="4.0dip"
                    android:paddingTop="0.0dip">

                    <TextView
                        android:id="@+id/toolbar_title"
                        android:layout_width="wrap_content"
                        android:layout_height="0dp"
                        android:layout_gravity="center_vertical"
                        android:layout_marginStart="@dimen/chat_margin_x_small"
                        android:layout_weight="0.6"
                        android:ellipsize="end"
                        android:gravity="center_vertical"
                        android:maxLines="1"
                        android:textAppearance="@style/Base.TextAppearance.Widget.AppCompat.Toolbar.Title"
                        android:textColor="@color/white"
                        android:textSize="19sp" />

                    <!--<TextView-->
                    <!--android:id="@+id/toolbar_subtitle"-->
                    <!--android:layout_width="wrap_content"-->
                    <!--android:layout_height="wrap_content"-->
                    <!--android:layout_marginLeft="@dimen/chat_margin_x_small"-->
                    <!--android:layout_weight="0.4"-->
                    <!--android:ellipsize="end"-->
                    <!--android:maxLines="1"-->
                    <!--android:textAppearance="@style/Base.TextAppearance.Widget.AppCompat.Toolbar.Subtitle"-->
                    <!--android:textColor="@color/grey_50"-->
                    <!--android:textSize="14sp" />-->
                </LinearLayout>

            </android.support.v7.widget.Toolbar>
        </android.support.design.widget.CollapsingToolbarLayout>
    </android.support.design.widget.AppBarLayout>

    <android.support.v4.widget.NestedScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical">

            <!--member list-->
            <android.support.v7.widget.CardView
                android:id="@+id/cardview_members"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                app:cardUseCompatPadding="true">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical">

                    <LinearLayout
                        android:focusableInTouchMode="true"
                        android:id="@+id/box_members"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="vertical">

                        <TextView
                            android:id="@+id/members_label"
                            style="@style/TextAppearance.AppCompat.Medium"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:padding="@dimen/chat_padding_normal"
                            android:text="@string/activity_group_admin_panel_members_label"
                            android:textColor="@color/colorPrimary" />

                        <!--box add member-->
                        <LinearLayout
                            android:id="@+id/box_add_member"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_margin="@dimen/chat_margin_small"
                            android:orientation="horizontal"
                            android:paddingBottom="@dimen/chat_padding_small"
                            android:paddingEnd="@dimen/chat_padding_small"
                            android:paddingStart="@dimen/chat_padding_small"
                            android:visibility="gone">

                            <ImageView
                                android:id="@+id/add_member_icon"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:src="@drawable/ic_add_member_grey_36dp" />

                            <LinearLayout
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:layout_gravity="center_vertical"
                                android:layout_marginStart="@dimen/chat_margin_small"
                                android:orientation="vertical"
                                android:paddingEnd="@dimen/chat_padding_small"
                                android:paddingStart="@dimen/chat_padding_small">

                                <TextView
                                    android:id="@+id/add_member_title"
                                    android:layout_width="match_parent"
                                    android:layout_height="wrap_content"
                                    android:text="@string/activity_group_admin_panel_add_member_title"
                                    android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
                            </LinearLayout>
                        </LinearLayout>

                        <!--line separator-->
                        <View
                            android:focusableInTouchMode="true"
                            android:layout_width="match_parent"
                            android:layout_height="0.5dp"
                            android:background="@color/grey_300"></View>

                        <android.support.v7.widget.RecyclerView
                            android:id="@+id/members"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content" />
                    </LinearLayout>

                    <LinearLayout
                        android:id="@+id/box_unavailable_members"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="vertical"
                        android:visibility="gone">

                        <TextView
                            style="@style/TextAppearance.AppCompat.Medium"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:padding="@dimen/chat_padding_normal"
                            android:text="@string/activity_group_admin_panel_not_available_members_label" />
                    </LinearLayout>
                </LinearLayout>
            </android.support.v7.widget.CardView>

            <!--created by and when-->
            <android.support.v7.widget.CardView
                android:id="@+id/cardview_created_by_on"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                app:cardUseCompatPadding="true">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:paddingBottom="@dimen/chat_padding_normal"
                    android:paddingLeft="@dimen/chat_padding_normal"
                    android:paddingRight="@dimen/chat_padding_normal"
                    android:paddingTop="@dimen/chat_padding_normal">

                    <!--<TextView-->
                    <!--android:id="@+id/created_by"-->
                    <!--style="@style/TextAppearance.AppCompat.Medium"-->
                    <!--android:layout_width="wrap_content"-->
                    <!--android:layout_height="wrap_content" />-->

                    <!--<TextView-->
                    <!--android:id="@+id/created_on"-->
                    <!--style="@style/TextAppearance.AppCompat.Medium"-->
                    <!--android:layout_width="wrap_content"-->
                    <!--android:layout_height="wrap_content" />-->

                    <!--<TextView-->
                    <!--android:id="@+id/group_id"-->
                    <!--style="@style/TextAppearance.AppCompat.Medium"-->
                    <!--android:layout_width="wrap_content"-->
                    <!--android:layout_height="wrap_content" />-->

                    <!--created by-->
                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="horizontal"
                        android:paddingTop="@dimen/chat_padding_xx_small">

                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="@string/activity_group_admin_panel_created_by_label"
                            android:textAppearance="@style/TextAppearance.AppCompat.Title"
                            android:textSize="@dimen/chat_activity_group_admin_created_by_text_size" />

                        <TextView
                            android:id="@+id/created_by"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginStart="@dimen/chat_margin_normal"
                            android:textAppearance="@style/TextAppearance.AppCompat.Medium"
                            android:textSize="@dimen/chat_activity_group_admin_created_by_text_size" />
                    </LinearLayout>

                    <!--created on-->
                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="horizontal">

                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="@string/activity_group_admin_panel_created_on_label"
                            android:textAppearance="@style/TextAppearance.AppCompat.Title"
                            android:textSize="@dimen/chat_activity_group_admin_created_on_text_size" />

                        <TextView
                            android:id="@+id/created_on"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginStart="@dimen/chat_margin_normal"
                            android:textAppearance="@style/TextAppearance.AppCompat.Medium"
                            android:textSize="@dimen/chat_activity_group_admin_created_on_text_size" />
                    </LinearLayout>

                    <!--group id-->
                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="horizontal"
                        android:paddingBottom="@dimen/chat_padding_xx_small">

                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="@string/activity_group_admin_panel_group_id_label"
                            android:textAppearance="@style/TextAppearance.AppCompat.Title"
                            android:textSize="@dimen/chat_activity_group_admin_group_id_text_size" />

                        <TextView
                            android:id="@+id/group_id"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginStart="@dimen/chat_margin_normal"
                            android:textAppearance="@style/TextAppearance.AppCompat.Medium"
                            android:textSize="@dimen/chat_activity_group_admin_group_id_text_size" />
                    </LinearLayout>
                </LinearLayout>
            </android.support.v7.widget.CardView>
        </LinearLayout>
    </android.support.v4.widget.NestedScrollView>
</android.support.design.widget.CoordinatorLayout>