<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013, Redsolution LTD. All rights reserved.

     This file is part of Xabber project; you can redistribute it and/or
     modify it under the terms of the GNU General Public License, Version 3.

     Xabber is distributed in the hope that it will be useful, but
     WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     See the GNU General Public License for more details.

     You should have received a copy of the GNU General Public License,
     along with this program. If not, see http://www.gnu.org/licenses/.
-->
<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/main_content"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true">

    <android.support.design.widget.AppBarLayout
        android:id="@+id/appbar"
        android:layout_width="match_parent"
        android:layout_height="192dp"
        android:background="#212122"
        android:elevation="8dp"
        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:elevation="8dp"
            android:fitsSystemWindows="true"
            app:collapsedTitleTextAppearance="@style/ToolbarTitle"
            app:contentScrim="#212122"
            app:expandedTitleMarginBottom="56dp"
            app:expandedTitleMarginEnd="64dp"
            app:expandedTitleMarginStart="88dp"
            app:expandedTitleTextAppearance="@style/CollapsingToolbarTitle"
            app:layout_scrollFlags="scroll|exitUntilCollapsed">

            <FrameLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:fitsSystemWindows="true"
                app:layout_collapseMode="parallax">

                <ImageView
                    android:id="@+id/backdrop"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:fitsSystemWindows="true"
                    android:scaleType="centerCrop"

                    />

                <ImageView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="bottom"
                    android:paddingBottom="16dp"
                    android:paddingLeft="16dp"
                    android:src="@drawable/ic_connect" />

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="bottom"
                    android:layout_marginBottom="36dp"
                    android:layout_marginLeft="88dp"
                    android:shadowColor="@color/grey_700"
                    android:shadowDx="1"
                    android:shadowDy="1"
                    android:shadowRadius="2"
                    android:text="@string/about_open_source_xmpp_client"
                    android:textColor="@color/green_50" />

                <TextView
                    android:id="@+id/about_version"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="bottom|right"
                    android:padding="4dp"
                    android:text="Xabber Beta 1.0.16"
                    android:textSize="12sp" />

            </FrameLayout>

            <android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
                xmlns:app="http://schemas.android.com/apk/res-auto"
                android:id="@+id/toolbar_default"
                android:layout_width="match_parent"
                android:layout_height="?attr/actionBarSize"
                android:elevation="8dp"
                android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
                app:layout_collapseMode="pin"
                app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
        </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="wrap_content"
            android:orientation="vertical"
            android:padding="16dp">

            <Space
                android:layout_width="match_parent"
                android:layout_height="8dp" />

            <TextView
                android:id="@+id/about_header_about"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/about_header_about"
                android:textAppearance="?android:attr/textAppearanceLarge" />

            <Space
                android:layout_width="match_parent"
                android:layout_height="16dp" />

            <TextView
                android:id="@+id/about_text_about"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/about_text_about"
                android:textAppearance="?android:attr/textAppearanceMedium" />

            <Space
                android:layout_width="match_parent"
                android:layout_height="16dp" />

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

                <TextView
                    android:id="@+id/about_xabber_site"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:autoLink="web"
                    android:text="@string/about_xabber_url"
                    android:textAppearance="?android:attr/textAppearanceSmall"
                    android:textColorLink="@color/white" />

                <Space
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1" />

                <TextView
                    android:id="@+id/about_xabber_email"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:autoLink="email"
                    android:text="@string/about_xabber_email"
                    android:textAppearance="?android:attr/textAppearanceSmall"
                    android:textColorLink="@color/white" />
            </LinearLayout>

            <Space
                android:layout_width="match_parent"
                android:layout_height="24dp" />

            <TextView
                android:id="@+id/about_header_xmpp_protocol"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/about_header_xmpp"
                android:textAppearance="?android:attr/textAppearanceLarge" />

            <Space
                android:layout_width="match_parent"
                android:layout_height="16dp" />

            <TextView
                android:id="@+id/about_text_xmpp_protocol"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/about_text_xmpp"
                android:textAppearance="?android:attr/textAppearanceMedium" />

            <Space
                android:layout_width="match_parent"
                android:layout_height="24dp" />

            <TextView
                android:id="@+id/about_header_xmpp_extension_protocols"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/about_header_xep"
                android:textAppearance="?android:attr/textAppearanceLarge" />

            <Space
                android:layout_width="match_parent"
                android:layout_height="16dp" />

            <TextView
                android:id="@+id/about_text_xmpp_extension_protocols"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/about_text_xep"
                android:textAppearance="?android:attr/textAppearanceMedium" />

            <Space
                android:layout_width="match_parent"
                android:layout_height="24dp" />

            <TextView
                android:id="@+id/about_header_developers"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/about_header_developers"
                android:textAppearance="?android:attr/textAppearanceLarge" />

            <Space
                android:layout_width="match_parent"
                android:layout_height="16dp" />

            <TextView
                android:id="@+id/about_text_developers"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/about_text_developers"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:textColorLink="@color/white" />

            <Space
                android:layout_width="match_parent"
                android:layout_height="16dp" />

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="center_vertical">

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

                <Space
                    android:layout_width="16dp"
                    android:layout_height="match_parent" />

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

                <Space
                    android:layout_width="16dp"
                    android:layout_height="match_parent" />

                <ImageView
                    android:id="@+id/about_github"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:src="@drawable/ic_github" />
            </LinearLayout>

            <Space
                android:layout_width="match_parent"
                android:layout_height="24dp" />

            <TextView
                android:id="@+id/about_header_translators"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/about_header_translators"
                android:textAppearance="?android:attr/textAppearanceLarge" />

            <Space
                android:layout_width="match_parent"
                android:layout_height="16dp" />

            <TextView
                android:id="@+id/about_text_translators"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/about_text_translators"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:textColorLink="@color/white" />

            <Space
                android:layout_width="match_parent"
                android:layout_height="24dp" />

            <TextView
                android:id="@+id/about_header_license"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/about_header_license"
                android:textAppearance="?android:attr/textAppearanceLarge" />

            <Space
                android:layout_width="match_parent"
                android:layout_height="16dp" />

            <TextView
                android:id="@+id/about_text_license"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/about_text_license"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:textColorLink="@color/white" />

        </LinearLayout>

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

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