<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView 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">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginStart="32dp"
        android:layout_marginEnd="32dp"
        android:orientation="vertical"
        android:paddingBottom="32dp">

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="24dp"
            android:layout_marginBottom="16dp"
            android:fontFamily="@font/poppins_semi_bold"
            android:text="@string/reader_settings"
            android:textAlignment="center"
            android:textSize="16sp" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dp"
            android:layout_marginBottom="8dp"
            android:gravity="center"
            android:orientation="horizontal">

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

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:alpha="0.58"
                    android:fontFamily="@font/poppins_bold"
                    android:text="@string/layout" />

                <TextView
                    android:id="@+id/readerLayoutText"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:fontFamily="@font/poppins_bold"
                    android:textColor="?attr/colorSecondary"
                    tools:text="Continuous" />
            </LinearLayout>

            <androidx.cardview.widget.CardView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                app:cardBackgroundColor="@color/nav_bg_inv"
                app:cardCornerRadius="16dp"
                app:cardElevation="0dp">

                <ImageButton
                    android:id="@+id/readerPaged"
                    android:layout_width="48dp"
                    android:layout_height="48dp"
                    android:alpha="0.33"
                    android:background="?android:attr/selectableItemBackground"
                    android:scaleX="-1"
                    android:src="@drawable/ic_round_amp_stories_24"
                    app:tint="?attr/colorOnBackground"
                    tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
            </androidx.cardview.widget.CardView>

            <androidx.cardview.widget.CardView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                app:cardBackgroundColor="@color/nav_bg_inv"
                app:cardCornerRadius="16dp"
                app:cardElevation="0dp">

                <ImageButton
                    android:id="@+id/readerContinuousPaged"
                    android:layout_width="48dp"
                    android:layout_height="48dp"
                    android:alpha="0.33"
                    android:background="?android:attr/selectableItemBackground"
                    android:src="@drawable/ic_round_view_array_24"
                    app:tint="?attr/colorOnBackground"
                    tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck,DuplicateSpeakableTextCheck" />
            </androidx.cardview.widget.CardView>

            <androidx.cardview.widget.CardView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                app:cardBackgroundColor="@color/nav_bg_inv"
                app:cardCornerRadius="16dp"
                app:cardElevation="0dp">

                <ImageButton
                    android:id="@+id/readerContinuous"
                    android:layout_width="48dp"
                    android:layout_height="48dp"
                    android:alpha="0.33"
                    android:background="?android:attr/selectableItemBackground"
                    android:src="@drawable/ic_round_view_column_24"
                    app:tint="?attr/colorOnBackground"
                    tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
            </androidx.cardview.widget.CardView>

        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginTop="8dp"
            android:layout_marginBottom="8dp"
            android:gravity="center"
            android:orientation="horizontal">

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

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:alpha="0.58"
                    android:fontFamily="@font/poppins_bold"
                    android:text="@string/direction" />

                <TextView
                    android:id="@+id/readerDirectionText"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:fontFamily="@font/poppins_bold"
                    android:textColor="?attr/colorSecondary"
                    tools:text="Top to Bottom" />
            </LinearLayout>

            <androidx.cardview.widget.CardView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                app:cardBackgroundColor="@color/nav_bg_inv"
                app:cardCornerRadius="16dp"
                app:cardElevation="0dp">

                <ImageButton
                    android:id="@+id/readerDirection"
                    android:layout_width="48dp"
                    android:layout_height="48dp"
                    android:background="?android:attr/selectableItemBackground"
                    android:rotation="0"
                    android:src="@drawable/ic_round_swipe_up_alt_24"
                    app:tint="?attr/colorOnBackground"
                    tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
            </androidx.cardview.widget.CardView>

        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginTop="16dp"
            android:layout_marginBottom="8dp"
            android:gravity="center"
            android:orientation="horizontal">

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

                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:alpha="0.58"
                    android:fontFamily="@font/poppins_bold"
                    android:text="@string/dual_page" />

                <TextView
                    android:id="@+id/readerDualPageText"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:fontFamily="@font/poppins_bold"
                    android:textColor="?attr/colorSecondary"
                    tools:ignore="TextContrastCheck"
                    tools:text="Force" />
            </LinearLayout>

            <androidx.cardview.widget.CardView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                app:cardBackgroundColor="@color/nav_bg_inv"
                app:cardCornerRadius="16dp"
                app:cardElevation="0dp">

                <ImageButton
                    android:id="@+id/readerDualNo"
                    android:layout_width="48dp"
                    android:layout_height="48dp"
                    android:alpha="0.33"
                    android:background="?android:attr/selectableItemBackground"
                    android:scaleX="-1"
                    android:src="@drawable/ic_round_close_24"
                    app:tint="?attr/colorOnBackground"
                    tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
            </androidx.cardview.widget.CardView>

            <androidx.cardview.widget.CardView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                app:cardBackgroundColor="@color/nav_bg_inv"
                app:cardCornerRadius="16dp"
                app:cardElevation="0dp">

                <ImageButton
                    android:id="@+id/readerDualAuto"
                    android:layout_width="48dp"
                    android:layout_height="48dp"
                    android:alpha="0.33"
                    android:background="?android:attr/selectableItemBackground"
                    android:src="@drawable/ic_round_screen_rotation_24"
                    app:tint="?attr/colorOnBackground"
                    tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck,DuplicateSpeakableTextCheck" />
            </androidx.cardview.widget.CardView>

            <androidx.cardview.widget.CardView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                app:cardBackgroundColor="@color/nav_bg_inv"
                app:cardCornerRadius="16dp"
                app:cardElevation="0dp">

                <ImageButton
                    android:id="@+id/readerDualForce"
                    android:layout_width="48dp"
                    android:layout_height="48dp"
                    android:alpha="0.33"
                    android:background="?android:attr/selectableItemBackground"
                    android:src="@drawable/ic_round_menu_book_24"
                    app:tint="?attr/colorOnBackground"
                    tools:ignore="ContentDescription,SpeakableTextPresentCheck,ImageContrastCheck" />
            </androidx.cardview.widget.CardView>

        </LinearLayout>

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="-8dp"
            android:layout_marginBottom="8dp"
            android:alpha="0.58"
            android:fontFamily="@font/poppins_family"
            android:text="@string/dual_page_info"
            android:textSize="14sp" />

        <com.google.android.material.switchmaterial.SwitchMaterial
            android:id="@+id/readerOverscroll"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:checked="true"
            android:drawableStart="@drawable/ic_round_swipe_vertical_24"
            android:drawablePadding="16dp"
            android:elegantTextHeight="true"
            android:fontFamily="@font/poppins_bold"
            android:minHeight="64dp"
            android:text="@string/over_scroll"
            android:textAlignment="viewStart"
            android:textColor="?attr/colorOnBackground"
            app:cornerRadius="0dp"
            app:drawableTint="?attr/colorPrimary"
            app:showText="false"
            app:thumbTint="@color/button_switch_track" />

        <com.google.android.material.switchmaterial.SwitchMaterial
            android:id="@+id/readerTrueColors"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:checked="false"
            android:drawableStart="@drawable/ic_round_high_quality_24"
            android:drawablePadding="16dp"
            android:elegantTextHeight="true"
            android:fontFamily="@font/poppins_bold"
            android:minHeight="64dp"
            android:text="@string/true_colors"
            android:textAlignment="viewStart"
            android:textColor="?attr/colorOnBackground"
            app:cornerRadius="0dp"
            app:drawableTint="?attr/colorPrimary"
            app:showText="false"
            app:thumbTint="@color/button_switch_track" />

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="-8dp"
            android:layout_marginBottom="8dp"
            android:alpha="0.58"
            android:fontFamily="@font/poppins_family"
            android:text="@string/true_colors_info"
            android:textSize="14sp" />

        <com.google.android.material.switchmaterial.SwitchMaterial
            android:id="@+id/readerImageRotation"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:checked="true"
            android:drawableStart="@drawable/ic_round_screen_rotation_alt_24"
            android:drawablePadding="16dp"
            android:elegantTextHeight="true"
            android:fontFamily="@font/poppins_bold"
            android:minHeight="64dp"
            android:text="@string/image_rotation"
            android:textAlignment="viewStart"
            android:textColor="?attr/colorOnBackground"
            app:cornerRadius="0dp"
            app:drawableTint="?attr/colorPrimary"
            app:showText="false"
            app:thumbTint="@color/button_switch_track" />

        <com.google.android.material.switchmaterial.SwitchMaterial
            android:id="@+id/readerCropBorders"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:checked="false"
            android:drawableStart="@drawable/ic_round_auto_awesome_24"
            android:drawablePadding="16dp"
            android:elegantTextHeight="true"
            android:fontFamily="@font/poppins_bold"
            android:minHeight="64dp"
            android:text="@string/crop_borders"
            android:textAlignment="viewStart"
            android:textColor="?attr/colorOnBackground"
            app:cornerRadius="0dp"
            app:drawableTint="?attr/colorPrimary"
            app:showText="false"
            app:thumbTint="@color/button_switch_track"
            tools:ignore="TextContrastCheck" />

        <com.google.android.material.switchmaterial.SwitchMaterial
            android:id="@+id/readerPadding"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:checked="true"
            android:drawableStart="@drawable/ic_round_space_bar_24"
            android:drawablePadding="16dp"
            android:elegantTextHeight="true"
            android:fontFamily="@font/poppins_bold"
            android:minHeight="64dp"
            android:text="@string/spaced_pages"
            android:textAlignment="viewStart"
            android:textColor="?attr/colorOnBackground"
            app:cornerRadius="0dp"
            app:drawableTint="?attr/colorPrimary"
            app:showText="false"
            app:thumbTint="@color/button_switch_track" />

        <com.google.android.material.switchmaterial.SwitchMaterial
            android:id="@+id/readerHidePageNumbers"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:checked="false"
            android:drawableStart="@drawable/ic_page_numbering"
            android:drawablePadding="16dp"
            android:elegantTextHeight="true"
            android:fontFamily="@font/poppins_bold"
            android:minHeight="64dp"
            android:text="@string/hide_page_numbers"
            android:textAlignment="viewStart"
            android:textColor="?attr/colorOnBackground"
            app:cornerRadius="0dp"
            app:drawableTint="?attr/colorPrimary"
            app:showText="false"
            app:thumbTint="@color/button_switch_track" />

        <com.google.android.material.switchmaterial.SwitchMaterial
            android:id="@+id/readerHorizontalScrollBar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:checked="true"
            android:drawableStart="@drawable/ic_round_straighten_24"
            android:drawablePadding="16dp"
            android:elegantTextHeight="true"
            android:fontFamily="@font/poppins_bold"
            android:minHeight="64dp"
            android:text="@string/horizontal_scroll_bar"
            android:textAlignment="viewStart"
            android:textColor="?attr/colorOnBackground"
            app:cornerRadius="0dp"
            app:drawableTint="?attr/colorPrimary"
            app:showText="false"
            app:thumbTint="@color/button_switch_track" />

        <com.google.android.material.switchmaterial.SwitchMaterial
            android:id="@+id/readerKeepScreenOn"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:checked="false"
            android:drawableStart="@drawable/ic_baseline_screen_lock_portrait_24"
            android:drawablePadding="16dp"
            android:elegantTextHeight="true"
            android:fontFamily="@font/poppins_bold"
            android:minHeight="64dp"
            android:text="@string/keep_screen_on"
            android:textAlignment="viewStart"
            android:textColor="?attr/colorOnBackground"
            app:cornerRadius="0dp"
            app:drawableTint="?attr/colorPrimary"
            app:showText="false"
            app:thumbTint="@color/button_switch_track" />

        <com.google.android.material.switchmaterial.SwitchMaterial
            android:id="@+id/readerVolumeButton"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:checked="false"
            android:drawableStart="@drawable/ic_round_touch_app_24"
            android:drawablePadding="16dp"
            android:elegantTextHeight="true"
            android:fontFamily="@font/poppins_bold"
            android:minHeight="64dp"
            android:text="@string/volume_buttons"
            android:textAlignment="viewStart"
            android:textColor="?attr/colorOnBackground"
            app:cornerRadius="0dp"
            app:drawableTint="?attr/colorPrimary"
            app:showText="false"
            app:thumbTint="@color/button_switch_track" />

        <com.google.android.material.switchmaterial.SwitchMaterial
            android:id="@+id/readerWrapImage"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:checked="false"
            android:drawableStart="@drawable/ic_round_fullscreen_24"
            android:drawablePadding="16dp"
            android:elegantTextHeight="true"
            android:fontFamily="@font/poppins_bold"
            android:minHeight="64dp"
            android:text="@string/wrap_images"
            android:textAlignment="viewStart"
            android:textColor="?attr/colorOnBackground"
            app:cornerRadius="0dp"
            app:drawableTint="?attr/colorPrimary"
            app:showText="false"
            app:thumbTint="@color/button_switch_track" />

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="-8dp"
            android:alpha="0.58"
            android:fontFamily="@font/poppins_family"
            android:text="@string/wrap_images_info"
            android:textSize="14sp" />

        <com.google.android.material.switchmaterial.SwitchMaterial
            android:id="@+id/readerLongClickImage"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:checked="false"
            android:drawableStart="@drawable/ic_round_touch_app_24"
            android:drawablePadding="16dp"
            android:elegantTextHeight="true"
            android:fontFamily="@font/poppins_bold"
            android:minHeight="64dp"
            android:text="@string/image_long_clicking"
            android:textAlignment="viewStart"
            android:textColor="?attr/colorOnBackground"
            app:cornerRadius="0dp"
            app:drawableTint="?attr/colorPrimary"
            app:showText="false"
            app:thumbTint="@color/button_switch_track" />
    </LinearLayout>

</androidx.core.widget.NestedScrollView>