<?xml version="1.0" encoding="utf-8"?>
<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">

    <com.google.android.material.appbar.AppBarLayout
        android:id="@+id/appBarLayout"
        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="wrap_content"
            tools:title="@string/simple_exception" />
    </com.google.android.material.appbar.AppBarLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fillViewport="true"
        android:orientation="vertical"
        app:layout_behavior="@string/appbar_scrolling_view_behavior">

        <com.google.android.material.textview.MaterialTextView
            android:id="@+id/message"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:hint="@string/hint_error_appeared"
            android:paddingHorizontal="@dimen/spacer_2x"
            android:paddingVertical="@dimen/spacer_1x"
            app:drawableEndCompat="@drawable/ic_bug_report_24dp" />

        <androidx.core.widget.NestedScrollView
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:layout_weight="1"
                android:orientation="vertical">

                <androidx.recyclerview.widget.RecyclerView
                    android:id="@+id/tips"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical"
                    android:paddingHorizontal="@dimen/spacer_2x"
                    app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
                    tools:itemCount="2"
                    tools:listitem="@layout/item_tip" />

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:padding="@dimen/spacer_2x"
                    android:text="@string/error_dialog_we_need_info"
                    android:textAppearance="?attr/textAppearanceBody2" />

                <HorizontalScrollView
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_marginHorizontal="@dimen/spacer_2x"
                    android:layout_weight="1"
                    android:background="?attr/colorSurfaceVariant">

                    <TextView
                        android:id="@+id/stacktrace"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:padding="@dimen/spacer_1x"
                        android:textIsSelectable="true"
                        android:typeface="monospace"
                        tools:text="@string/android_get_accounts_permission_not_granted_exception_message" />
                </HorizontalScrollView>
            </LinearLayout>
        </androidx.core.widget.NestedScrollView>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:fitsSystemWindows="true"
            android:gravity="end"
            android:orientation="horizontal"
            android:padding="@dimen/spacer_2x"
            android:weightSum="1.0">

            <com.google.android.material.button.MaterialButton
                android:id="@+id/close"
                style="@style/Widget.Material3.Button.TextButton"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginEnd="@dimen/spacer_1x"
                android:layout_weight=".5"
                android:text="@string/simple_close" />

            <com.google.android.material.button.MaterialButton
                android:id="@+id/copy"
                style="@style/Widget.Material3.Button"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/spacer_1x"
                android:layout_weight=".5"
                android:text="@string/simple_copy" />

        </LinearLayout>
    </LinearLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>