<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ This file is part of FYReader.
  ~  FYReader is free software: you can redistribute it and/or modify
  ~  it under the terms of the GNU General Public License as published by
  ~  the Free Software Foundation, either version 3 of the License, or
  ~  (at your option) any later version.
  ~
  ~  FYReader is distributed in the hope that it will be useful,
  ~  but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  ~  GNU General Public License for more details.
  ~
  ~  You should have received a copy of the GNU General Public License
  ~  along with FYReader.  If not, see <https://www.gnu.org/licenses/>.
  ~
  ~  Copyright (C) 2020 - 2022 fengyuecanzhu
  -->

<androidx.drawerlayout.widget.DrawerLayout 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/dl_crash_drawer"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/colorBackground"
        android:orientation="vertical"
        android:paddingHorizontal="20dp"
        android:paddingVertical="10dp"
        tools:context=".ui.activity.CrashActivity">

        <LinearLayout
            android:id="@+id/ll_crash_bar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center_vertical"
            android:orientation="horizontal">

            <androidx.appcompat.widget.AppCompatImageView
                android:id="@+id/iv_crash_info"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:padding="5dp"
                android:layout_marginHorizontal="5dp"
                android:background="?android:attr/selectableItemBackground"
                app:srcCompat="@drawable/ic_info"
                app:tint="@color/textPrimary"/>

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/tv_crash_title"
                android:layout_width="0px"
                android:layout_height="wrap_content"
                android:layout_marginStart="30dp"
                android:layout_marginEnd="10dp"
                android:layout_weight="1"
                android:gravity="center_horizontal"
                android:lineSpacingExtra="5dp"
                android:text="应用程序发生崩溃"
                android:textSize="@dimen/text_medium_size"
                android:textStyle="bold"
                app:tint="@color/textPrimary"/>

            <androidx.appcompat.widget.AppCompatImageView
                android:id="@+id/iv_crash_share"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginHorizontal="5dp"
                android:padding="5dp"
                android:background="?android:attr/selectableItemBackground"
                app:srcCompat="@drawable/ic_share"
                app:tint="@color/textPrimary"/>

            <androidx.appcompat.widget.AppCompatImageView
                android:id="@+id/iv_crash_restart"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:padding="5dp"
                android:layout_marginHorizontal="5dp"
                android:background="?android:attr/selectableItemBackground"
                app:srcCompat="@drawable/ic_exit"
                app:tint="@color/textPrimary"/>

        </LinearLayout>

        <androidx.core.widget.NestedScrollView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginHorizontal="10dp"
            android:layout_marginTop="15dp">

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/tv_crash_message"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:lineSpacingExtra="5dp"
                android:textColor="#FF4444"
                android:textSize="16sp"
                tools:text="我是错误信息" />

        </androidx.core.widget.NestedScrollView>

    </LinearLayout>

    <androidx.core.widget.NestedScrollView
        android:layout_width="240dp"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        android:background="@color/colorBackground">

        <LinearLayout
            android:id="@+id/ll_crash_info"
            android:layout_width="240dp"
            android:layout_height="match_parent"
            android:gravity="center"
            android:orientation="vertical">

            <androidx.appcompat.widget.AppCompatTextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:layout_marginTop="10dp"
                android:text="详细信息"
                android:textColor="@color/textPrimary"
                android:textSize="16sp"
                android:textStyle="bold" />

            <androidx.appcompat.widget.AppCompatTextView
                android:id="@+id/tv_crash_info"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginVertical="15dp"
                android:lineSpacingExtra="5dp"
                android:textColor="@color/textSecondary"
                android:textSize="14sp" />

        </LinearLayout>

    </androidx.core.widget.NestedScrollView>

</androidx.drawerlayout.widget.DrawerLayout>