<?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:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    tools:context=".activities.BoardActivity">

    <android.support.design.widget.AppBarLayout
        android:id="@+id/appbar"
        android:layout_width="match_parent"
        android:layout_height="@dimen/app_bar_height"
        android:background="@color/colorPrimary"
        app:theme="@style/AppTheme.AppBarOverlay">

        <android.support.design.widget.CollapsingToolbarLayout
            android:id="@+id/toolbar_layout"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:fitsSystemWindows="true"
            android:background="@color/red"
            app:contentScrim="@color/transparent"
            app:layout_scrollFlags="scroll|exitUntilCollapsed"
            app:toolbarId="@+id/toolbar">

            <SurfaceView
                android:id="@+id/surface_view"
                android:layout_width="match_parent"
                android:layout_height="match_parent" />

            <cy.agorise.crystalwallet.views.natives.GIFView
                android:id="@+id/imagevieGIF"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                />

            <android.support.v7.widget.Toolbar
                android:id="@+id/toolbar"
                android:layout_width="match_parent"
                android:layout_height="?attr/actionBarSize"
                android:background="@color/transparent"
                android:layout_marginTop="8dp"
                android:layout_marginBottom="-20dp"
                app:layout_collapseMode="none"
                app:popupTheme="@style/AppTheme.PopupOverlay">

                <android.support.constraint.ConstraintLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent">

                    <ImageView
                        android:id="@+id/imageView"
                        android:layout_width="wrap_content"
                        android:layout_height="match_parent"
                        android:layout_marginStart="16dp"
                        android:adjustViewBounds="true"
                        android:src="@drawable/crystal_logo"
                        android:contentDescription="@string/crystal_logo"
                        app:layout_constraintStart_toStartOf="parent"
                        app:layout_constraintTop_toTopOf="parent" />

                    <de.hdodenhof.circleimageview.CircleImageView
                        android:id="@+id/toolbar_user_img"
                        android:layout_width="?attr/actionBarSize"
                        android:layout_height="?attr/actionBarSize"
                        android:layout_marginEnd="32dp"
                        android:src="@drawable/avatar_placeholder"
                        android:transitionName="gravatarTransition"
                        app:layout_constraintBottom_toBottomOf="parent"
                        app:layout_constraintEnd_toEndOf="parent"
                        app:layout_constraintTop_toTopOf="parent" />

                    <ImageView
                        android:id="@+id/lightning"
                        android:layout_width="16dp"
                        android:layout_height="30dp"
                        app:srcCompat="@drawable/ic_lightning_24dp"
                        android:transitionName="lightningTransition"
                        android:contentDescription="@string/lightning_icon"
                        app:layout_constraintStart_toStartOf="@id/toolbar_user_img"
                        app:layout_constraintBottom_toBottomOf="@id/toolbar_user_img"/>

                    <ImageView
                        android:id="@+id/triangle"
                        android:layout_width="20dp"
                        android:layout_height="20dp"
                        app:srcCompat="@drawable/ic_arrow_24dp"
                        android:transitionName="triangleTransition"
                        android:contentDescription="@string/small_triangle_icon"
                        app:layout_constraintEnd_toEndOf="@id/toolbar_user_img"
                        app:layout_constraintBottom_toBottomOf="@id/toolbar_user_img"/>

                </android.support.constraint.ConstraintLayout>


            </android.support.v7.widget.Toolbar>

            <android.support.design.widget.TabLayout
                android:id="@+id/tabLayout"
                android:layout_gravity="bottom"
                android:background="@color/transparent"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                app:tabSelectedTextColor="@color/white"
                app:layout_collapseMode="pin"
                app:tabIndicatorHeight="0dp"
                app:tabTextAppearance="@android:style/TextAppearance.Widget.TabWidget"
                app:tabTextColor="@color/lightGrayClear"
                android:animateLayoutChanges="true" />

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

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

    <!-- change height -->
    <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.FloatingActionButton
        android:id="@+id/fabReceive"
        android:layout_width="250dp"
        android:layout_height="250dp"
        android:layout_gravity="start|bottom"
        android:layout_marginBottom="-125dp"
        android:layout_marginStart="-125dp"
        app:backgroundTint="@color/white"
        app:srcCompat="@drawable/receive_icon" />

    <android.support.design.widget.FloatingActionButton
        android:id="@+id/fabSend"
        android:layout_width="250dp"
        android:layout_height="250dp"
        android:layout_gravity="end|bottom"
        android:layout_marginBottom="-125dp"
        android:layout_marginEnd="-125dp"
        app:backgroundTint="@color/white"
        app:srcCompat="@drawable/send_icon" />

    <android.support.design.widget.FloatingActionButton
        android:id="@+id/fabAddContact"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="end|bottom"
        android:layout_margin="@dimen/fab_margin"
        app:backgroundTint="@color/colorPrimary"
        app:srcCompat="@drawable/ic_person_add" />

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