<?xml version="1.0" encoding="utf-8"?>
<!--
 Copyright 2017 Brian Pellin, Jeremy Jamet / Kunzisoft.
     
 This file is part of KeePass DX.

  KeePass DX is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  KeePass DX 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 KeePass DX.  If not, see <http://www.gnu.org/licenses/>.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical">

    <include
        android:id="@+id/toolbar"
        layout="@layout/toolbar_default" />

    <ScrollView
        android:layout_below="@+id/toolbar"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:isScrollContainer="true"
            android:orientation="vertical"
            android:paddingBottom="16dp"
            android:paddingLeft="16dp"
            android:paddingRight="16dp"
            android:paddingTop="16dp"
            android:scrollbars="vertical">

            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="horizontal">

                <android.support.v7.widget.AppCompatImageView
                    android:id="@+id/activity_about_icon"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="top"
                    android:layout_marginRight="10dp"
                    android:layout_marginEnd="10dp"
                    android:src="@mipmap/ic_launcher" />

                <LinearLayout
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:layout_toRightOf="@+id/activity_about_icon"
                    android:layout_toEndOf="@+id/activity_about_icon">

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="@string/app_name"
                        android:textSize="18sp"
                        android:textStyle="bold" />

                    <TextView
                        android:id="@+id/activity_about_version"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:textAppearance="@android:style/TextAppearance.Small" />
                </LinearLayout>
            </RelativeLayout>

            <TextView android:id="@+id/about_title"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:gravity="center"
                android:text="@string/AboutText"/>

            <TextView android:id="@+id/homepage"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:text="@string/about_homepage"
                style="@style/KeepassDXStyle.TextAppearance.SmallTitle"/>
            <TextView
                android:id="@+id/textView"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="18dp"
                android:layout_marginStart="18dp"
                android:autoLink="web"
                android:text="@string/homepage" />

            <TextView android:id="@+id/feedback"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="8dp"
                android:text="@string/about_feedback"
                style="@style/KeepassDXStyle.TextAppearance.SmallTitle"/>
            <TextView android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="18dp"
                android:layout_marginStart="18dp"
                android:text="@string/issues"
                android:autoLink="web"/>

        </LinearLayout>
    </ScrollView>

    <TextView android:id="@+id/disclaimer"
        android:padding="20dp"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:layout_alignParentBottom="true"
        android:text="@string/disclaimer_formal"
        style="@style/KeepassDXStyle.TextAppearance.TinyText"/>
</RelativeLayout>