<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->

<androidx.core.widget.NestedScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/about_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fillViewport="true"
    tools:context="org.mozilla.fenix.settings.about.AboutFragment">

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

        <ImageView
            android:id="@+id/wordmark"
            android:layout_width="0dp"
            android:layout_height="@dimen/about_header_fenix_logo_height"
            android:layout_marginStart="@dimen/about_header_icon_margin_start_end"
            android:layout_marginTop="@dimen/about_header_icon_margin_top"
            android:layout_marginEnd="@dimen/about_header_icon_margin_start_end"
            android:contentDescription="@string/app_name"
            android:importantForAccessibility="no"
            app:srcCompat="?fenixLogo"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintWidth_percent="0.75" />

        <TextView
            android:id="@+id/about_content"
            style="@style/Header16TextStyle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/about_header_title_margin_top"
            android:paddingStart="@dimen/about_header_title_padding_start_end"
            android:paddingEnd="@dimen/about_header_title_padding_start_end"
            android:textAlignment="center"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/wordmark"
            app:layout_constraintWidth_percent="0.8"
            tools:text="@string/about_content" />

        <TextView
            android:id="@+id/about_text"
            style="@style/AboutHeaderContentText"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="@dimen/about_header_build_info_margin_top"
            android:textAlignment="center"
            android:textIsSelectable="true"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/about_content"
            app:layout_constraintWidth_percent="0.8"
            tools:text="1.0.x (Build #x), 0d7383fd2\nAC: 1.0.0, 96ae23b628\nGV: 69.x-x\nAS: 1.0.0" />

        <TextView
            android:id="@+id/build_date"
            style="@style/AboutHeaderContentText"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:paddingTop="@dimen/about_header_build_date_padding_top"
            android:paddingBottom="@dimen/about_header_build_date_padding_bottom"
            android:textAlignment="center"
            android:textIsSelectable="true"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/about_text"
            app:layout_constraintWidth_percent="0.8"
            tools:text="Monday 1/2 @ 5:00 PM" />

        <Space
            android:id="@+id/space"
            android:layout_width="0dp"
            android:layout_height="0dp"
            app:layout_constraintBottom_toTopOf="@+id/divider"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/build_date"/>

        <View
            android:id="@+id/divider"
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:layout_marginTop="@dimen/about_list_margin_top"
            android:background="?android:attr/listDivider"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/space"
            app:layout_constraintBottom_toTopOf="@+id/about_list"/>

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/about_list"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:nestedScrollingEnabled="false"
            app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/divider"
            tools:listitem="@layout/about_list_item" />

    </androidx.constraintlayout.widget.ConstraintLayout>

</androidx.core.widget.NestedScrollView>
