<?xml version="1.0" encoding="utf-8"?><!--
  ~ Copyright (c) 2023 to present Androidacy and contributors. Names, logos, icons, and the Androidacy name are all trademarks of Androidacy and may not be used without license. See LICENSE for more information.
  -->

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/scroll_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_gravity="center"
    android:padding="4dp">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">
        <!-- first, app name -->
        <com.google.android.material.textview.MaterialTextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_margin="10dp"
            android:gravity="center"
            android:text="@string/app_name_v2"
            android:textSize="24sp"
            android:textStyle="bold" />

        <!-- second, crash icon -->
        <com.google.android.material.imageview.ShapeableImageView
            android:layout_width="101dp"
            android:layout_height="93dp"
            android:layout_gravity="center"
            android:layout_margin="8dp"
            android:contentDescription="@string/crash_icon"
            android:src="@drawable/ic_baseline_bug_report_24" />

        <!-- crash_text header -->
        <com.google.android.material.textview.MaterialTextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_margin="10dp"
            android:gravity="center"
            android:text="@string/crash_text"
            android:textSize="20sp"
            android:textStyle="bold" />

        <!-- textview suggesting user use the submit feedback button instead of manually copying the crash details -->
        <com.google.android.material.textview.MaterialTextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_margin="10dp"
            android:gravity="fill"
            android:text="@string/crash_details_suggestion_v2"
            android:textSize="14sp" />

        <!-- copyable crash_details body with copy button in top right corner -->
        <FrameLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <HorizontalScrollView
                android:id="@+id/crash_details_scroll"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

                <com.google.android.material.textview.MaterialTextView
                    android:id="@+id/crash_details"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginEnd="24dp"
                    android:fontFamily="monospace"
                    android:gravity="start"
                    android:minHeight="48dp"
                    android:padding="12dp"
                    android:scrollbars="vertical|horizontal"
                    android:scrollHorizontally="true"
                    android:text="@string/crash_details"
                    android:textIsSelectable="false"
                    android:textSize="16sp" />
            </HorizontalScrollView>

            <com.google.android.material.button.MaterialButton
                android:layout_width="36dp"
                android:layout_height="36dp"
                android:layout_gravity="top|end"
                android:layout_margin="10dp"
                android:background="@drawable/baseline_copy_all_24"
                android:contentDescription="@string/copy_button"
                android:onClick="copyCrashDetails"
                android:padding="4dp" />
        </FrameLayout>

        <!-- feedback form placeholder. just tell the user we've receive a report if they have crash reporting on -->
        <com.google.android.material.textview.MaterialTextView
            android:id="@+id/feedback_placeholder"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_margin="10dp"
            android:text="@string/feedback_placeholder"
            android:textSize="14sp" />


        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center|bottom"
            android:orientation="horizontal">

            <!-- restart button -->
            <com.google.android.material.button.MaterialButton
                android:id="@+id/restart"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_margin="10dp"
                android:text="@string/restart" />

            <com.google.android.material.button.MaterialButton
                android:id="@+id/reset"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_margin="10dp"
                android:text="@string/reset_app" />
        </LinearLayout>
    </LinearLayout>
</ScrollView>