<?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:layout_width="match_parent"
    android:background="@color/windowBackground"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <!-- toolbar -->
    <android.support.design.widget.AppBarLayout
        android:id="@+id/appbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:fitsSystemWindows="true"
        android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">

        <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="@color/colorPrimary" />
    </android.support.design.widget.AppBarLayout>

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

        <!--nestedscrollview unique child-->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

            <!--header-->
            <!--todo-->
            <android.support.v7.widget.CardView
                android:layout_width="match_parent"
                android:visibility="gone"
                android:layout_height="wrap_content"
                android:layout_marginBottom="@dimen/chat_margin_normal"
                android:background="@color/cardview_light_background"
                app:cardCornerRadius="@dimen/cardview_default_radius">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:padding="@dimen/chat_padding_normal">

                    <TextView
                        android:id="@+id/message"
                        style="@style/Base.TextAppearance.AppCompat.Medium"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:padding="@dimen/chat_padding_x_small" />

                    <!--add group box-->
                    <RelativeLayout
                        android:id="@+id/group_icon_box"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center_horizontal"
                        android:orientation="vertical">

                        <ImageView
                            android:id="@+id/group_icon"
                            style="@style/Base.TextAppearance.AppCompat.Small"
                            android:layout_width="@dimen/chat_activity_new_group_recipient_picture_size"
                            android:layout_height="@dimen/chat_activity_new_group_recipient_picture_size"
                            android:layout_centerHorizontal="true"
                            android:layout_marginTop="@dimen/chat_margin_normal"
                            android:visibility="gone" />

                        <TextView
                            android:id="@+id/group_icon_label"
                            style="@style/Base.TextAppearance.AppCompat.Small"
                            android:layout_width="@dimen/chat_activity_new_group_group_icon_label_width"
                            android:layout_height="@dimen/chat_activity_new_group_group_icon_label_height"
                            android:layout_centerHorizontal="true"
                            android:layout_marginTop="@dimen/chat_margin_normal"
                            android:gravity="center"
                            android:text="@string/activity_new_group_icon_label" />
                    </RelativeLayout>
                </LinearLayout>
            </android.support.v7.widget.CardView>

            <android.support.v7.widget.CardView
                android:id="@+id/cardview_group_name"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="@color/cardview_light_background"
                android:paddingBottom="@dimen/chat_padding_normal"
                app:cardCornerRadius="@dimen/cardview_default_radius">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:padding="@dimen/chat_padding_normal">

                    <android.support.design.widget.TextInputLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:paddingBottom="@dimen/chat_padding_normal">

                        <EditText
                            android:id="@+id/group_name"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:hint="@string/activity_new_group_group_name_hint_label" />
                    </android.support.design.widget.TextInputLayout>
                </LinearLayout>
            </android.support.v7.widget.CardView>
        </LinearLayout>
    </android.support.v4.widget.NestedScrollView>
</android.support.design.widget.CoordinatorLayout>