<?xml version="1.0" encoding="utf-8"?>

<!--  Copyright (c) MediaArea.net SARL. All Rights Reserved.

      Use of this source code is governed by a BSD-style license that can
      be found in the License.html file in the root of the source tree.
-->

<androidx.coordinatorlayout.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=".AboutActivity">

    <com.google.android.material.appbar.AppBarLayout
        android:background="?attr/colorSurfaceContainer"
        android:id="@+id/app_bar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:fitsSystemWindows="true">

        <com.google.android.material.appbar.MaterialToolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize" />

    </com.google.android.material.appbar.AppBarLayout>

    <ScrollView
        android:id="@+id/scroll_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior">

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

            <ImageView
                android:id="@+id/app_icon"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginEnd="8dp"
                android:layout_marginStart="8dp"
                android:layout_marginTop="8dp"
                android:adjustViewBounds="false"
                android:contentDescription="@string/logo_desc"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                app:srcCompat="@mipmap/ic_launcher_foreground" />

            <TextView
                android:id="@+id/about_about_textview"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_margin="@dimen/text_margin"
                android:text="@string/about_about_text"
                android:textAlignment="center"
                app:layout_constraintTop_toBottomOf="@+id/app_icon"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toRightOf="parent" />
            <TextView
                android:id="@+id/about_copyright_textview"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_margin="@dimen/text_margin"
                android:text="@string/about_copyright_text"
                android:textAlignment="center"
                app:layout_constraintTop_toBottomOf="@+id/about_about_textview"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toRightOf="parent" />
            <TextView
                android:id="@+id/about_description_textview"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_margin="@dimen/text_margin"
                android:text="@string/about_description_text"
                android:textAlignment="center"
                app:layout_constraintTop_toBottomOf="@+id/about_copyright_textview"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toRightOf="parent" />

            <LinearLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                app:layout_constraintTop_toBottomOf="@+id/about_description_textview"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintRight_toRightOf="parent">

                <Button
                    android:id="@+id/website_btn"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/website_text"
                    android:textAllCaps="true"
                    style="@style/Widget.Material3.Button.TextButton" />

                <Button
                    android:id="@+id/email_btn"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/email_text"
                    android:textAllCaps="true"
                    style="@style/Widget.Material3.Button.TextButton" />

            </LinearLayout>

        </androidx.constraintlayout.widget.ConstraintLayout>

    </ScrollView>

</androidx.coordinatorlayout.widget.CoordinatorLayout>