<?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"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/activity_account"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    android:orientation="vertical">

    <android.support.design.widget.AppBarLayout
        android:id="@+id/account_app_bar_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:theme="@style/AppTheme.Account.AppBarLayout">

        <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/toolbar_background_color"
            app:layout_scrollFlags="scroll|exitUntilCollapsed"
            app:titleEnabled="false">

            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="?attr/account_header_background_color">

                <ImageView
                    android:id="@+id/account_header"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_alignBottom="@+id/account_header_info"
                    android:layout_alignTop="@+id/account_header_info"
                    android:background="@drawable/account_header_default"
                    android:contentDescription="@null"
                    android:fitsSystemWindows="true"
                    android:scaleType="centerCrop"
                    app:layout_collapseMode="pin" />

                <android.support.constraint.ConstraintLayout
                    android:id="@+id/account_header_info"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:background="@drawable/account_header_gradient"
                    android:paddingLeft="16dp"
                    android:paddingRight="16dp"
                    android:paddingTop="?attr/actionBarSize"
                    app:layout_collapseMode="parallax">

                    <com.pkmmte.view.CircularImageView
                        android:id="@+id/account_avatar"
                        android:layout_width="80dp"
                        android:layout_height="80dp"
                        android:layout_marginEnd="10dp"
                        android:layout_marginRight="10dp"
                        android:src="@drawable/avatar_default"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent"
                        app:shadow="true" />

                    <Button
                        android:id="@+id/follow_btn"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginTop="6dp"
                        android:textSize="?attr/status_text_large"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintTop_toTopOf="parent" />

                    <TextView
                        android:id="@+id/account_follows_you"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginEnd="10dp"
                        android:layout_marginRight="10dp"
                        android:textSize="?attr/status_text_medium"
                        android:text="@string/follows_you"
                        android:textColor="?android:textColorPrimary"
                        app:layout_constraintEnd_toEndOf="@id/follow_btn"
                        app:layout_constraintTop_toBottomOf="@id/follow_btn" />

                    <TextView
                        android:id="@+id/account_display_name"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:ellipsize="end"
                        android:maxLines="1"
                        android:textColor="?android:textColorPrimary"
                        android:textSize="?attr/status_text_large"
                        android:textStyle="normal|bold"
                        app:layout_constraintTop_toBottomOf="@id/account_avatar"
                        tools:text="Tusky Mastodon Client" />

                    <TextView
                        android:id="@+id/account_username"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:ellipsize="end"
                        android:maxLines="1"
                        android:textSize="?attr/status_text_medium"
                        android:textColor="?android:textColorSecondary"
                        app:layout_constraintTop_toBottomOf="@id/account_display_name"
                        tools:text="\@Tusky" />

                    <ImageView
                        android:id="@+id/account_locked"
                        android:layout_width="16sp"
                        android:layout_height="16sp"
                        android:layout_marginLeft="4dp"
                        android:layout_marginStart="4dp"
                        android:contentDescription="@string/description_account_locked"
                        android:tint="?android:textColorSecondary"
                        android:visibility="gone"
                        app:layout_constraintBottom_toBottomOf="@id/account_username"
                        app:layout_constraintLeft_toRightOf="@id/account_username"
                        app:srcCompat="@drawable/reblog_disabled_light"
                        tools:visibility="visible" />

                    <TextView
                        android:id="@+id/account_note"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_below="@id/account_username"
                        android:paddingBottom="16dp"
                        android:paddingTop="10dp"
                        android:textSize="?attr/status_text_medium"
                        android:textColor="?android:textColorTertiary"
                        app:layout_constraintTop_toBottomOf="@id/account_username"
                        tools:text="This is a test description" />

                    <TextView
                        android:id="@+id/followers_tv"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginBottom="8dp"
                        android:background="@android:color/transparent"
                        android:textColor="@color/account_tab_font_color"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintHorizontal_bias="0"
                        app:layout_constraintStart_toStartOf="parent"
                        android:textSize="?attr/status_text_medium"
                        app:layout_constraintTop_toBottomOf="@id/account_note"
                        tools:text="3000 Followers" />

                    <TextView
                        android:id="@+id/following_tv"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:textColor="@color/account_tab_font_color"
                        app:layout_constraintBottom_toBottomOf="@id/followers_tv"
                        app:layout_constraintEnd_toStartOf="@id/statuses_btn"
                        app:layout_constraintHorizontal_bias="0"
                        app:layout_constraintStart_toEndOf="@id/followers_tv"
                        android:textSize="?attr/status_text_medium"
                        app:layout_constraintTop_toTopOf="@id/followers_tv"
                        tools:text="500 Following" />

                    <TextView
                        android:id="@+id/statuses_btn"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:textColor="@color/account_tab_font_color"
                        app:layout_constraintEnd_toEndOf="parent"
                        android:textSize="?attr/status_text_medium"
                        app:layout_constraintHorizontal_bias="0"
                        app:layout_constraintStart_toEndOf="@id/following_tv"
                        app:layout_constraintTop_toTopOf="@id/followers_tv"
                        tools:text="3000 Posts" />

                </android.support.constraint.ConstraintLayout>

            </RelativeLayout>

            <android.support.v7.widget.Toolbar
                android:id="@+id/toolbar"
                android:layout_width="match_parent"
                android:layout_height="?attr/actionBarSize"
                android:layout_alignParentTop="true"
                android:layout_gravity="top"
                android:background="@android:color/transparent"
                app:layout_collapseMode="pin"
                app:popupTheme="?attr/account_toolbar_popup_theme" />

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

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

    <android.support.v4.view.ViewPager
        android:id="@+id/pager"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior">

        <android.support.design.widget.TabLayout
            android:id="@+id/tab_layout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="?android:colorBackground"
            app:tabGravity="fill"
            app:tabMaxWidth="0dp"
            app:tabTextAppearance="@style/TuskyTabAppearance"
            app:tabSelectedTextColor="?attr/colorAccent">

            <android.support.design.widget.TabItem
                android:layout_width="wrap_content"
                android:layout_height="wrap_content" />

            <android.support.design.widget.TabItem
                android:layout_width="wrap_content"
                android:layout_height="wrap_content" />

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

    </android.support.v4.view.ViewPager>

    <View
        android:id="@+id/tab_bottom_shadow"
        android:layout_width="match_parent"
        android:layout_height="2dp"
        android:background="@drawable/material_drawer_shadow_bottom"
        android:visibility="visible"
        app:layout_anchor="@id/tab_layout"
        app:layout_anchorGravity="bottom" />

    <android.support.design.widget.FloatingActionButton
        android:id="@+id/floating_btn"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom|end"
        android:layout_margin="16dp"
        android:contentDescription="@string/action_mention"
        app:srcCompat="@drawable/ic_create_24dp" />

    <FrameLayout
        android:id="@+id/overlay_fragment_container"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

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