<?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/. -->

<RelativeLayout
    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:id="@+id/dialogLayout"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="?android:windowBackground"
    android:orientation="vertical"
    app:layout_constraintBottom_toBottomOf="parent">

    <androidx.appcompat.widget.AppCompatImageView
        android:id="@+id/icon"
        android:layout_width="32dp"
        android:layout_height="32dp"
        android:layout_alignParentTop="true"
        android:layout_marginStart="16dp"
        android:layout_marginTop="16dp"
        android:importantForAccessibility="no"
        android:scaleType="center"
        app:srcCompat="@drawable/mozac_feature_download_ic_download"
        app:tint="?android:attr/textColorPrimary" />

    <TextView
        android:id="@+id/title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignBaseline="@id/icon"
        android:layout_alignParentTop="true"
        android:layout_marginStart="3dp"
        android:layout_marginTop="16dp"
        android:layout_marginEnd="11dp"
        android:layout_toStartOf="@id/close_button"
        android:layout_toEndOf="@id/icon"
        android:paddingStart="5dp"
        android:paddingTop="4dp"
        android:paddingEnd="5dp"
        android:text="@string/mozac_feature_downloads_dialog_download"
        android:textColor="?android:attr/textColorPrimary"
        tools:text="Download (85.7 MB)"
        tools:textColor="#000000" />

    <androidx.appcompat.widget.AppCompatImageButton
        android:id="@+id/close_button"
        android:layout_width="48dp"
        android:layout_height="48dp"
        android:layout_alignBaseline="@id/icon"
        android:layout_alignParentTop="true"
        android:layout_alignParentEnd="true"
        android:layout_marginStart="3dp"
        android:scaleType="centerInside"
        android:background="@null"
        android:contentDescription="@string/mozac_feature_downloads_button_close"
        app:srcCompat="@drawable/mozac_ic_cross_24"
        app:tint="?android:attr/textColorPrimary"
        tools:textColor="#000000" />

    <TextView
        android:id="@+id/filename"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@id/title"
        android:layout_alignBaseline="@id/icon"
        android:layout_marginStart="3dp"
        android:layout_marginTop="16dp"
        android:layout_toEndOf="@id/icon"
        android:maxHeight="160dp"
        android:paddingStart="5dp"
        android:paddingTop="4dp"
        android:paddingEnd="5dp"
        android:scrollbars="vertical"
        android:textColor="?android:attr/textColorPrimary"
        tools:text="@tools:sample/lorem/random"
        tools:textColor="#000000" />

    <Button
        android:id="@+id/download_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@id/filename"
        android:layout_alignParentEnd="true"
        android:layout_marginStart="8dp"
        android:layout_marginTop="16dp"
        android:layout_marginEnd="16dp"
        android:layout_marginBottom="16dp"
        android:paddingStart="8dp"
        android:paddingEnd="8dp"
        android:text="@string/mozac_feature_downloads_dialog_download"
        android:textAlignment="center"
        android:background="@drawable/download_dialog_download_button_background"
        android:textColor="?attr/textOnColorPrimary"
        android:textAllCaps="false"
        tools:ignore="ButtonStyleXmlDetector" />
</RelativeLayout>
