<?xml version="1.0" encoding="utf-8"?>
<!--
 Copyright 2019 Jeremy Jamet / Kunzisoft.
     
 This file is part of KeePassDX.

  KeePassDX 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.

  KeePassDX 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 KeePassDX.  If not, see <http://www.gnu.org/licenses/>.
-->
<androidx.constraintlayout.widget.ConstraintLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:fitsSystemWindows="true"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:filterTouchesWhenObscured="true"
    android:orientation="vertical">

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

    <androidx.core.widget.NestedScrollView
        android:layout_width="match_parent"
        android:layout_height="0dp"
        app:layout_constraintTop_toBottomOf="@id/toolbar"
        app:layout_constraintBottom_toTopOf="@+id/screenshot_mode_banner">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                app:layout_constraintWidth_percent="@dimen/content_percent"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                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">

                    <androidx.appcompat.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:layout_toEndOf="@+id/activity_about_icon"
                        android:layout_toRightOf="@+id/activity_about_icon"
                        android:orientation="vertical">

                        <TextView
                            android:id="@+id/activity_about_app_name"
                            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" />

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

                <TextView
                    android:id="@+id/activity_about_description"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="8dp"
                    android:text="@string/about_description"/>

                <TextView
                    android:id="@+id/activity_about_about_title"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="16dp"
                    android:text="@string/info"
                    style="@style/KeepassDXStyle.Title"/>
                <TextView
                    android:id="@+id/activity_about_licence_text"
                    android:layout_marginTop="8dp"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"/>
                <TextView
                    android:id="@+id/activity_about_privacy_text"
                    android:layout_marginTop="8dp"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"/>
                <TextView
                    android:id="@+id/activity_about_contribution_text"
                    android:layout_marginTop="8dp"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"/>

                <TextView
                    android:id="@+id/activity_about_contact_title"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="16dp"
                    android:text="@string/contact"
                    style="@style/KeepassDXStyle.Title"/>

                <TextView
                    android:id="@+id/activity_about_homepage_subtitle"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="8dp"
                    android:text="@string/homepage"
                    style="@style/KeepassDXStyle.SubTitle"/>
                <TextView
                    android:id="@+id/activity_about_homepage_link"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:autoLink="web"
                    android:text="@string/homepage_url"/>

                <TextView
                    android:id="@+id/activity_about_feedback_subtitle"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="8dp"
                    android:text="@string/feedback"
                    style="@style/KeepassDXStyle.SubTitle"/>
                <TextView
                    android:id="@+id/activity_about_feedback_link"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/issues_url"
                    android:autoLink="web"/>

                <TextView
                    android:id="@+id/activity_about_contribution_subtitle"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="8dp"
                    android:text="@string/contribution"
                    style="@style/KeepassDXStyle.SubTitle"/>
                <TextView
                    android:id="@+id/activity_about_contribution_link"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/contribution_url"
                    android:autoLink="web"/>

            </LinearLayout>
        </androidx.constraintlayout.widget.ConstraintLayout>
    </androidx.core.widget.NestedScrollView>

    <include layout="@layout/view_screenshot_mode_banner" />
</androidx.constraintlayout.widget.ConstraintLayout>
