<?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:fitsSystemWindows="true"
        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"
            android:fitsSystemWindows="true"
            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_public_profile_recipient_picture_size"
                android:fitsSystemWindows="true"
                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_toRightOf="@id/conversation_image"
                    android:orientation="vertical"
                    android:paddingBottom="2.0dip"
                    android:paddingLeft="4.0dip"
                    android:paddingRight="0.0dip"
                    android:paddingTop="0.0dip">

                    <TextView
                        android:id="@+id/toolbar_title"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="center_vertical"
                        android:layout_marginLeft="@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="@dimen/chat_activity_public_profile_toolbar_title_text_size" />

                    <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="@dimen/chat_activity_public_profile_toolbar_subtitle_text_size" />
                </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">

            <!--&lt;!&ndash;created by and when&ndash;&gt;-->
            <!--<android.support.v7.widget.CardView-->
            <!--android:id="@+id/cardview_presence"-->
            <!--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">-->

            <!--<TextView-->
            <!--android:id="@+id/presence"-->
            <!--style="@style/TextAppearance.AppCompat.Medium"-->
            <!--android:layout_width="wrap_content"-->
            <!--android:layout_height="wrap_content"-->
            <!--android:maxLines="1"-->
            <!--android:padding="@dimen/chat_padding_normal"-->
            <!--android:paddingLeft="2dp"-->
            <!--android:textSize="16dp" />-->
            <!--</LinearLayout>-->
            <!--</android.support.v7.widget.CardView>-->


            <android.support.v7.widget.CardView
                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">

                    <!--email-->
                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="horizontal"
                        android:paddingBottom="@dimen/chat_padding_small"
                        android:paddingLeft="@dimen/chat_padding_normal"
                        android:paddingRight="@dimen/chat_padding_normal"
                        android:paddingTop="@dimen/chat_padding_small">

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

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

                    <!--userid-->
                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="horizontal"
                        android:paddingBottom="@dimen/chat_padding_small"
                        android:paddingLeft="@dimen/chat_padding_normal"
                        android:paddingRight="@dimen/chat_padding_normal"
                        android:paddingTop="@dimen/chat_padding_small">

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

                        <TextView
                            android:id="@+id/userid"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:layout_marginLeft="@dimen/chat_margin_normal"
                            android:textAppearance="@style/TextAppearance.AppCompat.Medium"
                            android:textSize="@dimen/chat_activity_public_profile_id_text_size" />
                    </LinearLayout>
                </LinearLayout>
            </android.support.v7.widget.CardView>

        </LinearLayout>
    </android.support.v4.widget.NestedScrollView>

</android.support.design.widget.CoordinatorLayout>