<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/reader_v2_canvas"
    android:theme="@style/ThemeOverlay.Aletheia.ReaderV2">

    <WebView
        android:id="@+id/reader_web_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginTop="25dp"
        android:layout_marginBottom="2dp"
        android:background="@color/reader_v2_canvas"
        android:contentDescription="@string/a11y_reader_content" />

    <LinearLayout
        android:id="@+id/page_header"
        android:layout_width="match_parent"
        android:layout_height="25dp"
        android:layout_gravity="top"
        android:background="@color/reader_v2_canvas"
        android:gravity="center_vertical"
        android:orientation="horizontal"
        android:paddingStart="12dp"
        android:paddingEnd="12dp">

        <TextView
            android:id="@+id/page_header_title"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:ellipsize="end"
            android:maxLines="1"
            android:text="@string/reader_v2_book_title_placeholder"
            android:textColor="@color/reader_v2_secondary"
            android:textSize="11sp" />

        <TextView
            android:id="@+id/page_header_remaining"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="12dp"
            android:maxLines="1"
            android:text="@string/reader_v2_remaining_placeholder"
            android:textColor="@color/reader_v2_secondary"
            android:textSize="11sp" />
    </LinearLayout>

    <com.google.android.material.progressindicator.LinearProgressIndicator
        android:id="@+id/reader_persistent_progress"
        android:layout_width="match_parent"
        android:layout_height="2dp"
        android:layout_gravity="bottom"
        android:elevation="0dp"
        android:importantForAccessibility="no"
        android:max="10000"
        android:progress="0"
        app:indicatorColor="@color/reader_v2_accent"
        app:trackColor="@android:color/transparent"
        app:trackCornerRadius="0dp"
        app:trackThickness="2dp" />

    <FrameLayout
        android:id="@+id/reader_loading_overlay"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginTop="25dp"
        android:background="@color/reader_v2_canvas"
        android:clickable="true"
        android:focusable="false"
        android:importantForAccessibility="no">

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:gravity="center"
            android:orientation="vertical"
            android:padding="24dp">

            <com.google.android.material.progressindicator.CircularProgressIndicator
                android:layout_width="36dp"
                android:layout_height="36dp"
                android:indeterminate="true"
                app:indicatorColor="@color/reader_v2_accent"
                app:trackColor="@color/reader_v2_separator" />

            <TextView
                android:id="@+id/reader_loading_text"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="16dp"
                android:text="@string/reader_v2_loading"
                android:textColor="@color/reader_v2_primary"
                android:textSize="15sp" />

            <TextView
                android:id="@+id/reader_error_text"
                android:layout_width="280dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="12dp"
                android:gravity="center"
                android:text="@string/reader_v2_load_error"
                android:textColor="@color/reader_v2_primary"
                android:textSize="14sp"
                android:visibility="gone" />

            <com.google.android.material.button.MaterialButton
                android:id="@+id/reader_retry_button"
                android:layout_width="wrap_content"
                android:layout_height="48dp"
                android:layout_marginTop="16dp"
                android:text="@string/reader_v2_retry"
                android:textAllCaps="false"
                android:textColor="@color/reader_v2_canvas"
                android:visibility="gone"
                app:backgroundTint="@color/reader_v2_accent"
                app:cornerRadius="2dp" />
        </LinearLayout>
    </FrameLayout>

    <FrameLayout
        android:id="@+id/reader_system_bar_backgrounds"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:clickable="false"
        android:focusable="false"
        android:importantForAccessibility="no"
        android:visibility="gone">

        <View
            android:id="@+id/reader_status_bar_background"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_gravity="top"
            android:background="@color/reader_v2_chrome" />

        <View
            android:id="@+id/reader_navigation_bar_bottom_background"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_gravity="bottom"
            android:background="@android:color/white" />

        <View
            android:id="@+id/reader_navigation_bar_left_background"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_gravity="start"
            android:background="@android:color/white" />

        <View
            android:id="@+id/reader_navigation_bar_right_background"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_gravity="end"
            android:background="@android:color/white" />
    </FrameLayout>

    <FrameLayout
        android:id="@+id/reader_controls_overlay"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:visibility="gone">

        <LinearLayout
            android:id="@+id/reader_top_controls_panel"
            android:layout_width="match_parent"
            android:layout_height="56dp"
            android:layout_gravity="top"
            android:background="@color/reader_v2_chrome"
            android:clickable="true"
            android:elevation="3dp"
            android:focusable="false"
            android:gravity="center_vertical"
            android:importantForAccessibility="no"
            android:orientation="horizontal">

            <ImageButton
                android:id="@+id/reader_back_button"
                android:layout_width="56dp"
                android:layout_height="match_parent"
                android:background="?attr/selectableItemBackgroundBorderless"
                android:contentDescription="@string/reader_v2_back"
                android:padding="17dp"
                android:src="@drawable/ic_reader_v2_back" />

            <Space
                android:layout_width="0dp"
                android:layout_height="1dp"
                android:layout_weight="1" />

            <ImageButton
                android:id="@+id/reader_voice_button"
                android:layout_width="48dp"
                android:layout_height="48dp"
                android:layout_gravity="center_vertical"
                android:background="?attr/selectableItemBackgroundBorderless"
                android:contentDescription="@string/reader_v2_voice"
                android:padding="12dp"
                android:src="@drawable/ic_reader_v2_voice" />

            <ImageButton
                android:id="@+id/reader_search_button"
                android:layout_width="48dp"
                android:layout_height="48dp"
                android:layout_gravity="center_vertical"
                android:background="?attr/selectableItemBackgroundBorderless"
                android:contentDescription="@string/reader_v2_search"
                android:padding="11dp"
                android:src="@drawable/ic_reader_v2_search" />

            <ImageButton
                android:id="@+id/reader_settings_button"
                android:layout_width="48dp"
                android:layout_height="48dp"
                android:layout_gravity="center_vertical"
                android:background="?attr/selectableItemBackgroundBorderless"
                android:contentDescription="@string/reader_v2_settings"
                android:padding="11dp"
                android:src="@drawable/ic_reader_v2_settings" />

            <ImageButton
                android:id="@+id/reader_contents_button"
                android:layout_width="48dp"
                android:layout_height="48dp"
                android:layout_gravity="center_vertical"
                android:background="?attr/selectableItemBackgroundBorderless"
                android:contentDescription="@string/reader_v2_contents"
                android:padding="11dp"
                android:src="@drawable/ic_reader_v2_contents" />

            <ImageButton
                android:id="@+id/reader_bookmark_button"
                android:layout_width="56dp"
                android:layout_height="48dp"
                android:layout_gravity="center_vertical"
                android:background="?attr/selectableItemBackgroundBorderless"
                android:contentDescription="@string/reader_v2_bookmark"
                android:padding="11dp"
                android:src="@drawable/ic_reader_v2_bookmark" />
        </LinearLayout>

        <LinearLayout
            android:id="@+id/reader_bottom_controls_panel"
            android:layout_width="match_parent"
            android:layout_height="95dp"
            android:layout_gravity="bottom"
            android:background="@color/reader_v2_chrome"
            android:clickable="true"
            android:elevation="4dp"
            android:focusable="false"
            android:importantForAccessibility="no"
            android:orientation="vertical"
            android:paddingTop="18dp">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="19dp"
                android:gravity="center_vertical"
                android:orientation="horizontal"
                android:paddingStart="15dp"
                android:paddingEnd="15dp">

                <TextView
                    android:id="@+id/reader_bottom_title"
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:ellipsize="end"
                    android:gravity="center_vertical"
                    android:maxLines="1"
                    android:text="@string/reader_v2_book_title_placeholder"
                    android:textColor="@color/reader_v2_primary"
                    android:textSize="15sp" />

                <TextView
                    android:id="@+id/reader_page_count"
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"
                    android:layout_marginStart="12dp"
                    android:gravity="center_vertical"
                    android:text="@string/reader_v2_page_count_placeholder"
                    android:textColor="@color/reader_v2_primary"
                    android:textSize="15sp" />
            </LinearLayout>

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="19dp"
                android:layout_marginTop="7dp"
                android:gravity="center_vertical"
                android:orientation="horizontal"
                android:paddingStart="15dp"
                android:paddingEnd="15dp">

                <TextView
                    android:id="@+id/reader_bottom_chapter"
                    android:layout_width="0dp"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:ellipsize="end"
                    android:gravity="center_vertical"
                    android:maxLines="1"
                    android:text="@string/reader_v2_chapter_placeholder"
                    android:textColor="@color/reader_v2_primary"
                    android:textSize="14sp" />

                <TextView
                    android:id="@+id/reader_chapter_remaining"
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent"
                    android:layout_marginStart="12dp"
                    android:gravity="center_vertical"
                    android:text="@string/reader_v2_remaining_placeholder"
                    android:textColor="@color/reader_v2_primary"
                    android:textSize="14sp" />
            </LinearLayout>

            <com.google.android.material.slider.Slider
                android:id="@+id/reader_progress_slider"
                android:layout_width="match_parent"
                android:layout_height="32dp"
                android:contentDescription="@string/reader_v2_reading_progress"
                android:valueFrom="0"
                android:valueTo="100"
                app:haloColor="@android:color/transparent"
                app:thumbColor="@color/reader_v2_primary"
                app:thumbRadius="5dp"
                app:trackColorActive="@color/reader_v2_primary"
                app:trackColorInactive="@color/reader_v2_secondary_on_light"
                app:trackHeight="1dp" />
        </LinearLayout>
    </FrameLayout>

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/reader_settings_overlay"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:visibility="gone">

        <View
            android:id="@+id/settings_scrim"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:background="@android:color/transparent"
            android:clickable="true"
            android:contentDescription="@string/reader_v2_close_settings"
            android:focusable="true"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <androidx.constraintlayout.widget.Guideline
            android:id="@+id/settings_sheet_guideline"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            app:layout_constraintGuide_percent="0.529" />

        <LinearLayout
            android:id="@+id/settings_panel"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:background="@drawable/bg_reader_v2_sheet"
            android:clickable="true"
            android:elevation="2dp"
            android:focusable="false"
            android:importantForAccessibility="no"
            android:orientation="vertical"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="@id/settings_sheet_guideline">

            <LinearLayout
                android:id="@+id/settings_header"
                android:layout_width="match_parent"
                android:layout_height="48dp"
                android:background="@drawable/bg_reader_v2_row"
                android:gravity="center_vertical"
                android:orientation="horizontal">

                <ImageButton
                    android:id="@+id/settings_back_button"
                    android:layout_width="48dp"
                    android:layout_height="match_parent"
                    android:background="?attr/selectableItemBackgroundBorderless"
                    android:contentDescription="@string/reader_v2_back"
                    android:padding="13dp"
                    android:src="@drawable/ic_reader_v2_back"
                    android:visibility="gone" />

                <TextView
                    android:id="@+id/settings_title"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="16dp"
                    android:layout_weight="1"
                    android:text="@string/reader_v2_settings"
                    android:textColor="@color/reader_v2_text"
                    android:textSize="18sp" />

                <ImageButton
                    android:id="@+id/settings_close_button"
                    android:layout_width="48dp"
                    android:layout_height="match_parent"
                    android:background="?attr/selectableItemBackgroundBorderless"
                    android:contentDescription="@string/reader_v2_close"
                    android:padding="13dp"
                    android:src="@drawable/ic_reader_v2_close" />
            </LinearLayout>

            <FrameLayout
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:layout_weight="1">

                <View
                    android:id="@+id/settings_shadow"
                    android:layout_width="match_parent"
                    android:layout_height="2dp"
                    android:layout_gravity="top"
                    android:background="@color/reader_v2_separator"
                    android:tag="reader_v2_separator" />

                <LinearLayout
                    android:id="@+id/quick_settings_container"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_marginTop="2dp"
                    android:orientation="vertical">

                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="50dp"
                            android:background="@drawable/bg_reader_v2_row"
                            android:gravity="center_vertical"
                            android:orientation="horizontal"
                            android:paddingStart="16dp"
                            android:paddingEnd="12dp"
                            android:tag="reader_v2_row">

                            <ImageView
                                android:layout_width="34dp"
                                android:layout_height="34dp"
                                android:contentDescription="@null"
                                android:importantForAccessibility="no"
                                android:padding="4dp"
                                android:src="@drawable/ic_reader_v2_brightness" />

                            <com.google.android.material.slider.Slider
                                android:id="@+id/brightness_slider"
                                android:layout_width="0dp"
                                android:layout_height="48dp"
                                android:layout_marginStart="18dp"
                                android:layout_weight="1"
                                android:contentDescription="@string/reader_v2_brightness"
                                android:value="50"
                                android:valueFrom="10"
                                android:valueTo="100"
                                app:haloColor="@android:color/transparent"
                                app:thumbColor="@color/reader_v2_primary"
                                app:thumbRadius="6dp"
                                app:trackColorActive="@color/reader_v2_primary"
                                app:trackColorInactive="@color/reader_v2_secondary_on_light"
                                app:trackHeight="1dp" />
                        </LinearLayout>

                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="51dp"
                            android:background="@drawable/bg_reader_v2_row"
                            android:gravity="center_vertical"
                            android:orientation="horizontal"
                            android:paddingStart="12dp"
                            android:tag="reader_v2_row">

                            <TextView
                                android:layout_width="0dp"
                                android:layout_height="19dp"
                                android:layout_weight="1"
                                android:ellipsize="end"
                                android:gravity="center_vertical"
                                android:maxLines="1"
                                android:singleLine="true"
                                android:text="@string/reader_v2_system_brightness"
                                android:textColor="@color/reader_v2_text"
                                android:textSize="15sp" />

                            <com.google.android.material.materialswitch.MaterialSwitch
                                android:id="@+id/system_brightness_switch"
                                android:layout_width="59dp"
                                android:layout_height="48dp"
                                android:gravity="center"
                                android:scaleX="0.72"
                                android:scaleY="0.72" />
                        </LinearLayout>

                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="50dp"
                            android:background="@drawable/bg_reader_v2_row"
                            android:gravity="center"
                            android:orientation="horizontal"
                            android:paddingStart="12dp"
                            android:paddingTop="7dp"
                            android:paddingEnd="12dp"
                            android:paddingBottom="7dp"
                            android:tag="reader_v2_row">

                            <com.google.android.material.button.MaterialButton
                                android:id="@+id/theme_light_button"
                                android:layout_width="0dp"
                                android:layout_height="match_parent"
                                android:layout_marginEnd="2dp"
                                android:layout_weight="1"
                                android:background="@drawable/bg_reader_v2_theme_light"
                                android:minWidth="0dp"
                                android:fontFamily="sans"
                                android:maxLines="1"
                                android:singleLine="true"
                                android:paddingStart="8dp"
                                android:paddingEnd="8dp"
                                android:text="@string/reader_v2_theme_white"
                                android:textAllCaps="false"
                                android:textColor="@color/reader_v2_text"
                                android:textSize="15sp"
                                app:backgroundTint="@null"
                                app:cornerRadius="2dp"
                                app:icon="@drawable/ic_reader_v2_option_marker"
                                app:iconPadding="4dp"
                                app:iconSize="18dp"
                                app:iconTint="@color/reader_v2_accent"
                                app:strokeWidth="0dp" />

                            <com.google.android.material.button.MaterialButton
                                android:id="@+id/theme_sepia_button"
                                android:layout_width="0dp"
                                android:layout_height="match_parent"
                                android:layout_marginStart="2dp"
                                android:layout_marginEnd="2dp"
                                android:layout_weight="1"
                                android:background="@drawable/bg_reader_v2_theme_sepia"
                                android:minWidth="0dp"
                                android:fontFamily="sans"
                                android:maxLines="1"
                                android:singleLine="true"
                                android:paddingStart="8dp"
                                android:paddingEnd="8dp"
                                android:text="@string/reader_v2_theme_sepia"
                                android:textAllCaps="false"
                                android:textColor="#66452E"
                                android:textSize="15sp"
                                app:backgroundTint="@null"
                                app:cornerRadius="2dp"
                                app:icon="@drawable/ic_reader_v2_option_marker"
                                app:iconPadding="4dp"
                                app:iconSize="18dp"
                                app:iconTint="@color/reader_v2_accent"
                                app:strokeWidth="0dp" />

                            <com.google.android.material.button.MaterialButton
                                android:id="@+id/theme_dark_button"
                                android:layout_width="0dp"
                                android:layout_height="match_parent"
                                android:layout_marginStart="2dp"
                                android:layout_weight="1"
                                android:background="@drawable/bg_reader_v2_theme_dark"
                                android:minWidth="0dp"
                                android:fontFamily="sans"
                                android:maxLines="1"
                                android:singleLine="true"
                                android:paddingStart="8dp"
                                android:paddingEnd="8dp"
                                android:text="@string/reader_v2_theme_dark"
                                android:textAllCaps="false"
                                android:textColor="@color/reader_v2_canvas"
                                android:textSize="15sp"
                                app:backgroundTint="@null"
                                app:cornerRadius="2dp"
                                app:icon="@drawable/ic_reader_v2_option_marker"
                                app:iconPadding="4dp"
                                app:iconSize="18dp"
                                app:iconTint="@color/reader_v2_accent"
                                app:strokeWidth="0dp" />
                        </LinearLayout>

                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="50dp"
                            android:background="@drawable/bg_reader_v2_row"
                            android:gravity="center_vertical"
                            android:orientation="horizontal"
                            android:paddingStart="12dp"
                            android:tag="reader_v2_row">

                            <TextView
                                android:layout_width="0dp"
                                android:layout_height="19dp"
                                android:layout_weight="1"
                                android:ellipsize="end"
                                android:gravity="center_vertical"
                                android:maxLines="1"
                                android:singleLine="true"
                                android:text="@string/reader_v2_font_size"
                                android:textColor="@color/reader_v2_text"
                                android:textSize="15sp" />

                            <TextView
                                android:id="@+id/font_size_value"
                                android:layout_width="58dp"
                                android:layout_height="19dp"
                                android:gravity="center"
                                android:text="@string/reader_v2_font_size_value"
                                android:textColor="@color/reader_v2_text"
                                android:textSize="15sp" />

                            <FrameLayout
                                android:id="@+id/font_size_minus_button"
                                android:layout_width="72dp"
                                android:layout_height="50dp"
                                android:background="?attr/selectableItemBackgroundBorderless"
                                android:clickable="true"
                                android:contentDescription="@string/reader_v2_decrease_font_size"
                                android:focusable="true">

                                <ImageView
                                    android:layout_width="44dp"
                                    android:layout_height="44dp"
                                    android:layout_gravity="center"
                                    android:background="@drawable/bg_reader_v2_control"
                                    android:contentDescription="@null"
                                    android:importantForAccessibility="no"
                                    android:padding="6dp"
                                    android:src="@drawable/ic_reader_v2_minus"
                                    android:tag="reader_v2_control" />
                            </FrameLayout>

                            <FrameLayout
                                android:id="@+id/font_size_plus_button"
                                android:layout_width="72dp"
                                android:layout_height="50dp"
                                android:background="?attr/selectableItemBackgroundBorderless"
                                android:clickable="true"
                                android:contentDescription="@string/reader_v2_increase_font_size"
                                android:focusable="true">

                                <ImageView
                                    android:layout_width="44dp"
                                    android:layout_height="44dp"
                                    android:layout_gravity="center"
                                    android:background="@drawable/bg_reader_v2_control"
                                    android:contentDescription="@null"
                                    android:importantForAccessibility="no"
                                    android:padding="6dp"
                                    android:src="@drawable/ic_reader_v2_plus"
                                    android:tag="reader_v2_control" />
                            </FrameLayout>
                        </LinearLayout>

                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="50dp"
                            android:background="@drawable/bg_reader_v2_row"
                            android:gravity="center_vertical"
                            android:orientation="horizontal"
                            android:paddingStart="12dp"
                            android:tag="reader_v2_row">

                            <TextView
                                android:layout_width="0dp"
                                android:layout_height="19dp"
                                android:layout_weight="1"
                                android:ellipsize="end"
                                android:gravity="center_vertical"
                                android:maxLines="1"
                                android:singleLine="true"
                                android:text="@string/reader_v2_font"
                                android:textColor="@color/reader_v2_text"
                                android:textSize="15sp" />

                            <FrameLayout
                                android:layout_width="115dp"
                                android:layout_height="match_parent">

                                <com.google.android.material.textfield.MaterialAutoCompleteTextView
                                    android:id="@+id/font_family_dropdown"
                                    android:layout_width="match_parent"
                                    android:layout_height="match_parent"
                                    android:background="@android:color/transparent"
                                    android:gravity="center_vertical|end"
                                    android:inputType="none"
                                    android:ellipsize="end"
                                    android:maxLines="1"
                                    android:singleLine="true"
                                    android:paddingStart="4dp"
                                    android:paddingEnd="25dp"
                                    android:text="@string/reader_v2_font_default"
                                    android:textColor="@color/reader_v2_secondary_on_light"
                                    android:textSize="15sp" />

                                <ImageView
                                    android:layout_width="24dp"
                                    android:layout_height="24dp"
                                    android:layout_gravity="end|center_vertical"
                                    android:contentDescription="@null"
                                    android:importantForAccessibility="no"
                                    android:padding="5dp"
                                    android:src="@drawable/ic_reader_v2_chevron_down" />
                            </FrameLayout>
                        </LinearLayout>

                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="51dp"
                            android:background="@drawable/bg_reader_v2_row"
                            android:gravity="center_vertical"
                            android:orientation="horizontal"
                            android:paddingStart="12dp"
                            android:tag="reader_v2_row">

                            <TextView
                                android:layout_width="0dp"
                                android:layout_height="19dp"
                                android:layout_weight="1"
                                android:ellipsize="end"
                                android:gravity="center_vertical"
                                android:maxLines="1"
                                android:singleLine="true"
                                android:text="@string/reader_v2_vertical_scroll"
                                android:textColor="@color/reader_v2_text"
                                android:textSize="15sp" />

                            <com.google.android.material.materialswitch.MaterialSwitch
                                android:id="@+id/vertical_scroll_switch"
                                android:layout_width="59dp"
                                android:layout_height="48dp"
                                android:gravity="center"
                                android:scaleX="0.72"
                                android:scaleY="0.72" />
                        </LinearLayout>

                        <TextView
                            android:id="@+id/all_settings_button"
                            android:layout_width="match_parent"
                            android:layout_height="48dp"
                            android:background="@drawable/bg_reader_v2_row"
                            android:fontFamily="sans"
                            android:gravity="center"
                            android:maxLines="1"
                            android:singleLine="true"
                            android:tag="reader_v2_row"
                            android:text="@string/reader_v2_all_settings"
                            android:textColor="@color/reader_v2_accent"
                            android:textSize="16sp" />
                </LinearLayout>

                <androidx.core.widget.NestedScrollView
                    android:id="@+id/full_settings_container"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_marginTop="2dp"
                    android:fillViewport="true"
                    android:overScrollMode="never"
                    android:visibility="gone">

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="vertical">

                        <TextView
                            android:layout_width="match_parent"
                            android:layout_height="48dp"
                            android:background="@drawable/bg_reader_v2_row"
                            android:ellipsize="end"
                            android:gravity="center_vertical"
                            android:maxLines="1"
                            android:paddingStart="12dp"
                            android:singleLine="true"
                            android:tag="reader_v2_row"
                            android:text="@string/reader_v2_text_settings"
                            android:textColor="@color/reader_v2_text"
                            android:textSize="18sp" />

                        <View
                            android:layout_width="match_parent"
                            android:layout_height="2dp"
                            android:background="@color/reader_v2_separator"
                            android:tag="reader_v2_separator" />

                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="50dp"
                            android:background="@drawable/bg_reader_v2_row"
                            android:gravity="center_vertical"
                            android:orientation="horizontal"
                            android:paddingStart="12dp"
                            android:tag="reader_v2_row">

                            <TextView
                                android:layout_width="0dp"
                                android:layout_height="wrap_content"
                                android:layout_weight="1"
                                android:ellipsize="end"
                                android:maxLines="1"
                                android:singleLine="true"
                                android:text="@string/reader_v2_font_size"
                                android:textColor="@color/reader_v2_text"
                                android:textSize="15sp" />

                            <TextView
                                android:id="@+id/full_font_size_value"
                                android:layout_width="58dp"
                                android:layout_height="wrap_content"
                                android:gravity="center"
                                android:text="@string/reader_v2_font_size_value"
                                android:textColor="@color/reader_v2_text"
                                android:textSize="15sp" />

                            <FrameLayout
                                android:id="@+id/full_font_size_minus_button"
                                android:layout_width="72dp"
                                android:layout_height="50dp"
                                android:background="?attr/selectableItemBackgroundBorderless"
                                android:clickable="true"
                                android:contentDescription="@string/reader_v2_decrease_font_size"
                                android:focusable="true">

                                <ImageView
                                    android:layout_width="44dp"
                                    android:layout_height="44dp"
                                    android:layout_gravity="center"
                                    android:background="@drawable/bg_reader_v2_control"
                                    android:contentDescription="@null"
                                    android:importantForAccessibility="no"
                                    android:padding="6dp"
                                    android:src="@drawable/ic_reader_v2_minus"
                                    android:tag="reader_v2_control" />
                            </FrameLayout>

                            <FrameLayout
                                android:id="@+id/full_font_size_plus_button"
                                android:layout_width="72dp"
                                android:layout_height="50dp"
                                android:background="?attr/selectableItemBackgroundBorderless"
                                android:clickable="true"
                                android:contentDescription="@string/reader_v2_increase_font_size"
                                android:focusable="true">

                                <ImageView
                                    android:layout_width="44dp"
                                    android:layout_height="44dp"
                                    android:layout_gravity="center"
                                    android:background="@drawable/bg_reader_v2_control"
                                    android:contentDescription="@null"
                                    android:importantForAccessibility="no"
                                    android:padding="6dp"
                                    android:src="@drawable/ic_reader_v2_plus"
                                    android:tag="reader_v2_control" />
                            </FrameLayout>
                        </LinearLayout>

                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="50dp"
                            android:background="@drawable/bg_reader_v2_row"
                            android:gravity="center_vertical"
                            android:orientation="horizontal"
                            android:paddingStart="12dp"
                            android:tag="reader_v2_row">

                            <TextView
                                android:layout_width="0dp"
                                android:layout_height="wrap_content"
                                android:layout_weight="1"
                                android:ellipsize="end"
                                android:maxLines="1"
                                android:singleLine="true"
                                android:text="@string/reader_v2_font"
                                android:textColor="@color/reader_v2_text"
                                android:textSize="15sp" />

                            <com.google.android.material.textfield.TextInputLayout
                                android:layout_width="115dp"
                                android:layout_height="match_parent"
                                app:boxBackgroundColor="@android:color/transparent"
                                app:boxBackgroundMode="filled"
                                app:boxStrokeColor="@android:color/transparent"
                                app:boxStrokeWidth="0dp"
                                app:boxStrokeWidthFocused="0dp"
                                app:endIconMode="dropdown_menu"
                                app:endIconTint="@color/reader_v2_secondary_on_light">

                                <com.google.android.material.textfield.MaterialAutoCompleteTextView
                                    android:id="@+id/full_font_family_dropdown"
                                    android:layout_width="match_parent"
                                    android:layout_height="match_parent"
                                    android:gravity="center_vertical|end"
                                    android:inputType="none"
                                    android:ellipsize="end"
                                    android:maxLines="1"
                                    android:singleLine="true"
                                    android:paddingStart="4dp"
                                    android:paddingEnd="4dp"
                                    android:text="@string/reader_v2_font_default"
                                    android:textColor="@color/reader_v2_secondary_on_light"
                                    android:textSize="15sp" />
                            </com.google.android.material.textfield.TextInputLayout>
                        </LinearLayout>

                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="50dp"
                            android:background="@drawable/bg_reader_v2_row"
                            android:gravity="center_vertical"
                            android:orientation="horizontal"
                            android:paddingStart="12dp"
                            android:tag="reader_v2_row">

                            <TextView
                                android:layout_width="0dp"
                                android:layout_height="wrap_content"
                                android:layout_weight="1"
                                android:ellipsize="end"
                                android:maxLines="1"
                                android:singleLine="true"
                                android:text="@string/reader_v2_orientation"
                                android:textColor="@color/reader_v2_text"
                                android:textSize="15sp" />

                            <com.google.android.material.textfield.TextInputLayout
                                android:layout_width="149dp"
                                android:layout_height="match_parent"
                                app:boxBackgroundColor="@android:color/transparent"
                                app:boxBackgroundMode="filled"
                                app:boxStrokeColor="@android:color/transparent"
                                app:boxStrokeWidth="0dp"
                                app:boxStrokeWidthFocused="0dp"
                                app:endIconMode="dropdown_menu"
                                app:endIconTint="@color/reader_v2_secondary_on_light">

                                <com.google.android.material.textfield.MaterialAutoCompleteTextView
                                    android:id="@+id/orientation_dropdown"
                                    android:layout_width="match_parent"
                                    android:layout_height="match_parent"
                                    android:gravity="center_vertical|end"
                                    android:inputType="none"
                                    android:ellipsize="end"
                                    android:maxLines="1"
                                    android:singleLine="true"
                                    android:paddingStart="4dp"
                                    android:paddingEnd="4dp"
                                    android:text="@string/reader_v2_orientation_auto"
                                    android:textColor="@color/reader_v2_secondary_on_light"
                                    android:textSize="15sp" />
                            </com.google.android.material.textfield.TextInputLayout>
                        </LinearLayout>

                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="50dp"
                            android:background="@drawable/bg_reader_v2_row"
                            android:gravity="center_vertical"
                            android:orientation="horizontal"
                            android:paddingStart="12dp"
                            android:tag="reader_v2_row">

                            <TextView
                                android:layout_width="0dp"
                                android:layout_height="wrap_content"
                                android:layout_weight="1"
                                android:ellipsize="end"
                                android:maxLines="1"
                                android:singleLine="true"
                                android:text="@string/reader_v2_alignment"
                                android:textColor="@color/reader_v2_text"
                                android:textSize="15sp" />

                            <FrameLayout
                                android:id="@+id/align_justify_button"
                                android:layout_width="68dp"
                                android:layout_height="50dp"
                                android:background="?attr/selectableItemBackgroundBorderless"
                                android:clickable="true"
                                android:contentDescription="@string/reader_v2_align_justify"
                                android:focusable="true">

                                <ImageView
                                    android:layout_width="56dp"
                                    android:layout_height="32dp"
                                    android:layout_gravity="center"
                                    android:background="@drawable/bg_reader_v2_option_selectable"
                                    android:contentDescription="@null"
                                    android:duplicateParentState="true"
                                    android:importantForAccessibility="no"
                                    android:padding="7dp"
                                    android:src="@drawable/ic_reader_v2_align_justify"
                                    android:tag="reader_v2_option" />
                            </FrameLayout>

                            <FrameLayout
                                android:id="@+id/align_left_button"
                                android:layout_width="68dp"
                                android:layout_height="50dp"
                                android:background="?attr/selectableItemBackgroundBorderless"
                                android:clickable="true"
                                android:contentDescription="@string/reader_v2_align_left"
                                android:focusable="true">

                                <ImageView
                                    android:layout_width="56dp"
                                    android:layout_height="32dp"
                                    android:layout_gravity="center"
                                    android:background="@drawable/bg_reader_v2_option_selectable"
                                    android:contentDescription="@null"
                                    android:duplicateParentState="true"
                                    android:importantForAccessibility="no"
                                    android:padding="7dp"
                                    android:src="@drawable/ic_reader_v2_align_left"
                                    android:tag="reader_v2_option" />
                            </FrameLayout>
                        </LinearLayout>

                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="50dp"
                            android:background="@drawable/bg_reader_v2_row"
                            android:gravity="center_vertical"
                            android:orientation="horizontal"
                            android:paddingStart="12dp"
                            android:tag="reader_v2_row">

                            <TextView
                                android:layout_width="0dp"
                                android:layout_height="wrap_content"
                                android:layout_weight="1"
                                android:ellipsize="end"
                                android:maxLines="1"
                                android:singleLine="true"
                                android:text="@string/reader_v2_line_height"
                                android:textColor="@color/reader_v2_text"
                                android:textSize="15sp" />

                            <FrameLayout
                                android:id="@+id/line_height_minus_button"
                                android:layout_width="68dp"
                                android:layout_height="50dp"
                                android:background="?attr/selectableItemBackgroundBorderless"
                                android:clickable="true"
                                android:contentDescription="@string/reader_v2_decrease_line_height"
                                android:focusable="true">

                                <ImageView
                                    android:layout_width="56dp"
                                    android:layout_height="32dp"
                                    android:layout_gravity="center"
                                    android:background="@drawable/bg_reader_v2_control"
                                    android:contentDescription="@null"
                                    android:importantForAccessibility="no"
                                    android:padding="6dp"
                                    android:src="@drawable/ic_reader_v2_line_tighter"
                                    android:tag="reader_v2_control" />
                            </FrameLayout>

                            <TextView
                                android:id="@+id/line_height_value"
                                android:layout_width="0dp"
                                android:layout_height="wrap_content"
                                android:gravity="center"
                                android:text="@string/reader_v2_line_height_value"
                                android:textColor="@color/reader_v2_primary"
                                android:textSize="13sp"
                                android:visibility="gone" />

                            <FrameLayout
                                android:id="@+id/line_height_plus_button"
                                android:layout_width="68dp"
                                android:layout_height="50dp"
                                android:background="?attr/selectableItemBackgroundBorderless"
                                android:clickable="true"
                                android:contentDescription="@string/reader_v2_increase_line_height"
                                android:focusable="true">

                                <ImageView
                                    android:layout_width="56dp"
                                    android:layout_height="32dp"
                                    android:layout_gravity="center"
                                    android:background="@drawable/bg_reader_v2_control"
                                    android:contentDescription="@null"
                                    android:importantForAccessibility="no"
                                    android:padding="6dp"
                                    android:src="@drawable/ic_reader_v2_line_looser"
                                    android:tag="reader_v2_control" />
                            </FrameLayout>
                        </LinearLayout>

                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="50dp"
                            android:background="@drawable/bg_reader_v2_row"
                            android:gravity="center_vertical"
                            android:orientation="horizontal"
                            android:paddingStart="12dp"
                            android:tag="reader_v2_row">

                            <TextView
                                android:layout_width="0dp"
                                android:layout_height="wrap_content"
                                android:layout_weight="1"
                                android:ellipsize="end"
                                android:maxLines="1"
                                android:singleLine="true"
                                android:text="@string/reader_v2_margins"
                                android:textColor="@color/reader_v2_text"
                                android:textSize="15sp" />

                            <FrameLayout
                                android:id="@+id/margin_minus_button"
                                android:layout_width="68dp"
                                android:layout_height="50dp"
                                android:background="?attr/selectableItemBackgroundBorderless"
                                android:clickable="true"
                                android:contentDescription="@string/reader_v2_decrease_margins"
                                android:focusable="true">

                                <ImageView
                                    android:layout_width="56dp"
                                    android:layout_height="32dp"
                                    android:layout_gravity="center"
                                    android:background="@drawable/bg_reader_v2_control"
                                    android:contentDescription="@null"
                                    android:importantForAccessibility="no"
                                    android:padding="6dp"
                                    android:src="@drawable/ic_reader_v2_margin_wider"
                                    android:tag="reader_v2_control" />
                            </FrameLayout>

                            <TextView
                                android:id="@+id/margin_value"
                                android:layout_width="0dp"
                                android:layout_height="wrap_content"
                                android:gravity="center"
                                android:text="@string/reader_v2_margin_value"
                                android:textColor="@color/reader_v2_primary"
                                android:textSize="12sp"
                                android:visibility="gone" />

                            <FrameLayout
                                android:id="@+id/margin_plus_button"
                                android:layout_width="68dp"
                                android:layout_height="50dp"
                                android:background="?attr/selectableItemBackgroundBorderless"
                                android:clickable="true"
                                android:contentDescription="@string/reader_v2_increase_margins"
                                android:focusable="true">

                                <ImageView
                                    android:layout_width="56dp"
                                    android:layout_height="32dp"
                                    android:layout_gravity="center"
                                    android:background="@drawable/bg_reader_v2_control"
                                    android:contentDescription="@null"
                                    android:importantForAccessibility="no"
                                    android:padding="6dp"
                                    android:src="@drawable/ic_reader_v2_margin_narrower"
                                    android:tag="reader_v2_control" />
                            </FrameLayout>
                        </LinearLayout>

                        <TextView
                            android:layout_width="match_parent"
                            android:layout_height="48dp"
                            android:background="@drawable/bg_reader_v2_row"
                            android:ellipsize="end"
                            android:gravity="center_vertical"
                            android:maxLines="1"
                            android:paddingStart="12dp"
                            android:singleLine="true"
                            android:tag="reader_v2_row"
                            android:text="@string/reader_v2_controls_and_gestures"
                            android:textColor="@color/reader_v2_primary"
                            android:textSize="14sp" />

                        <com.google.android.material.materialswitch.MaterialSwitch
                            android:id="@+id/full_vertical_scroll_switch"
                            android:layout_width="match_parent"
                            android:layout_height="51dp"
                            android:background="@drawable/bg_reader_v2_row"
                            android:gravity="center_vertical"
                            android:maxLines="1"
                            android:paddingStart="12dp"
                            android:paddingEnd="12dp"
                            android:singleLine="true"
                            android:tag="reader_v2_row"
                            android:text="@string/reader_v2_vertical_scroll"
                            android:textColor="@color/reader_v2_text"
                            android:textSize="15sp" />

                        <com.google.android.material.materialswitch.MaterialSwitch
                            android:id="@+id/volume_buttons_switch"
                            android:layout_width="match_parent"
                            android:layout_height="51dp"
                            android:background="@drawable/bg_reader_v2_row"
                            android:gravity="center_vertical"
                            android:maxLines="1"
                            android:paddingStart="12dp"
                            android:paddingEnd="12dp"
                            android:singleLine="true"
                            android:tag="reader_v2_row"
                            android:text="@string/reader_v2_volume_buttons"
                            android:textColor="@color/reader_v2_text"
                            android:textSize="15sp" />

                        <com.google.android.material.materialswitch.MaterialSwitch
                            android:id="@+id/invert_zones_switch"
                            android:layout_width="match_parent"
                            android:layout_height="58dp"
                            android:background="@drawable/bg_reader_v2_row"
                            android:gravity="center_vertical"
                            android:paddingStart="12dp"
                            android:paddingEnd="12dp"
                            android:tag="reader_v2_row"
                            android:text="@string/reader_v2_invert_zones"
                            android:textColor="@color/reader_v2_text"
                            android:textSize="15sp" />

                        <com.google.android.material.materialswitch.MaterialSwitch
                            android:id="@+id/brightness_gesture_switch"
                            android:layout_width="match_parent"
                            android:layout_height="51dp"
                            android:background="@drawable/bg_reader_v2_row"
                            android:gravity="center_vertical"
                            android:maxLines="1"
                            android:paddingStart="12dp"
                            android:paddingEnd="12dp"
                            android:singleLine="true"
                            android:tag="reader_v2_row"
                            android:text="@string/reader_v2_brightness_gesture"
                            android:textColor="@color/reader_v2_text"
                            android:textSize="15sp" />

                        <com.google.android.material.materialswitch.MaterialSwitch
                            android:id="@+id/keep_screen_on_switch"
                            android:layout_width="match_parent"
                            android:layout_height="51dp"
                            android:background="@drawable/bg_reader_v2_row"
                            android:gravity="center_vertical"
                            android:maxLines="1"
                            android:paddingStart="12dp"
                            android:paddingEnd="12dp"
                            android:singleLine="true"
                            android:tag="reader_v2_row"
                            android:text="@string/reader_v2_keep_screen_on"
                            android:textColor="@color/reader_v2_text"
                            android:textSize="15sp" />

                        <TextView
                            android:layout_width="match_parent"
                            android:layout_height="48dp"
                            android:background="@drawable/bg_reader_v2_row"
                            android:gravity="center_vertical"
                            android:ellipsize="end"
                            android:maxLines="1"
                            android:paddingStart="12dp"
                            android:singleLine="true"
                            android:tag="reader_v2_row"
                            android:text="@string/reader_v2_colors_and_brightness"
                            android:textColor="@color/reader_v2_primary"
                            android:textSize="14sp" />

                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="50dp"
                            android:background="@drawable/bg_reader_v2_row"
                            android:gravity="center_vertical"
                            android:orientation="horizontal"
                            android:paddingStart="16dp"
                            android:paddingEnd="12dp"
                            android:tag="reader_v2_row">

                            <ImageView
                                android:layout_width="34dp"
                                android:layout_height="34dp"
                                android:contentDescription="@null"
                                android:importantForAccessibility="no"
                                android:padding="4dp"
                                android:src="@drawable/ic_reader_v2_brightness" />

                            <com.google.android.material.slider.Slider
                                android:id="@+id/full_brightness_slider"
                                android:layout_width="0dp"
                                android:layout_height="48dp"
                                android:layout_marginStart="18dp"
                                android:layout_weight="1"
                                android:contentDescription="@string/reader_v2_brightness"
                                android:value="50"
                                android:valueFrom="10"
                                android:valueTo="100"
                                app:haloColor="@android:color/transparent"
                                app:thumbColor="@color/reader_v2_primary"
                                app:thumbRadius="6dp"
                                app:trackColorActive="@color/reader_v2_primary"
                                app:trackColorInactive="@color/reader_v2_secondary_on_light"
                                app:trackHeight="1dp" />
                        </LinearLayout>

                        <com.google.android.material.materialswitch.MaterialSwitch
                            android:id="@+id/full_system_brightness_switch"
                            android:layout_width="match_parent"
                            android:layout_height="51dp"
                            android:background="@drawable/bg_reader_v2_row"
                            android:gravity="center_vertical"
                            android:maxLines="1"
                            android:paddingStart="12dp"
                            android:paddingEnd="12dp"
                            android:singleLine="true"
                            android:tag="reader_v2_row"
                            android:text="@string/reader_v2_system_brightness"
                            android:textColor="@color/reader_v2_text"
                            android:textSize="15sp" />

                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="50dp"
                            android:background="@drawable/bg_reader_v2_row"
                            android:gravity="center"
                            android:orientation="horizontal"
                            android:paddingStart="12dp"
                            android:paddingTop="7dp"
                            android:paddingEnd="12dp"
                            android:paddingBottom="7dp"
                            android:tag="reader_v2_row">

                            <com.google.android.material.button.MaterialButton
                                android:id="@+id/full_theme_light_button"
                                android:layout_width="0dp"
                                android:layout_height="match_parent"
                                android:layout_marginEnd="2dp"
                                android:layout_weight="1"
                                android:background="@drawable/bg_reader_v2_theme_light"
                                android:fontFamily="sans"
                                android:maxLines="1"
                                android:minWidth="0dp"
                                android:singleLine="true"
                                android:paddingStart="8dp"
                                android:paddingEnd="8dp"
                                android:text="@string/reader_v2_theme_white"
                                android:textAllCaps="false"
                                android:textColor="@color/reader_v2_text"
                                android:textSize="15sp"
                                app:backgroundTint="@null"
                                app:cornerRadius="2dp"
                                app:icon="@drawable/ic_reader_v2_option_marker"
                                app:iconPadding="4dp"
                                app:iconSize="18dp"
                                app:iconTint="@color/reader_v2_accent"
                                app:strokeWidth="0dp" />

                            <com.google.android.material.button.MaterialButton
                                android:id="@+id/full_theme_sepia_button"
                                android:layout_width="0dp"
                                android:layout_height="match_parent"
                                android:layout_marginStart="2dp"
                                android:layout_marginEnd="2dp"
                                android:layout_weight="1"
                                android:background="@drawable/bg_reader_v2_theme_sepia"
                                android:fontFamily="sans"
                                android:maxLines="1"
                                android:minWidth="0dp"
                                android:singleLine="true"
                                android:paddingStart="8dp"
                                android:paddingEnd="8dp"
                                android:text="@string/reader_v2_theme_sepia"
                                android:textAllCaps="false"
                                android:textColor="#66452E"
                                android:textSize="15sp"
                                app:backgroundTint="@null"
                                app:cornerRadius="2dp"
                                app:icon="@drawable/ic_reader_v2_option_marker"
                                app:iconPadding="4dp"
                                app:iconSize="18dp"
                                app:iconTint="@color/reader_v2_accent"
                                app:strokeWidth="0dp" />

                            <com.google.android.material.button.MaterialButton
                                android:id="@+id/full_theme_dark_button"
                                android:layout_width="0dp"
                                android:layout_height="match_parent"
                                android:layout_marginStart="2dp"
                                android:layout_weight="1"
                                android:background="@drawable/bg_reader_v2_theme_dark"
                                android:fontFamily="sans"
                                android:maxLines="1"
                                android:minWidth="0dp"
                                android:singleLine="true"
                                android:paddingStart="8dp"
                                android:paddingEnd="8dp"
                                android:text="@string/reader_v2_theme_dark"
                                android:textAllCaps="false"
                                android:textColor="@color/reader_v2_canvas"
                                android:textSize="15sp"
                                app:backgroundTint="@null"
                                app:cornerRadius="2dp"
                                app:icon="@drawable/ic_reader_v2_option_marker"
                                app:iconPadding="4dp"
                                app:iconSize="18dp"
                                app:iconTint="@color/reader_v2_accent"
                                app:strokeWidth="0dp" />
                        </LinearLayout>

                        <TextView
                            android:layout_width="match_parent"
                            android:layout_height="52dp"
                            android:background="@drawable/bg_reader_v2_row"
                            android:gravity="center_vertical"
                            android:paddingStart="16dp"
                            android:text="@string/reader_v2_page_turn"
                            android:textColor="@color/reader_v2_primary"
                            android:textSize="14sp" />

                        <com.google.android.material.button.MaterialButton
                            android:id="@+id/page_turn_tap_swipe_button"
                            android:layout_width="match_parent"
                            android:layout_height="52dp"
                            android:background="@drawable/bg_reader_v2_mode_selectable"
                            android:minWidth="0dp"
                            android:text="@string/reader_v2_page_turn_tap_swipe"
                            android:textAllCaps="false"
                            android:textColor="@color/reader_v2_text"
                            app:backgroundTint="@null"
                            app:cornerRadius="0dp"
                            app:strokeWidth="0dp" />

                        <com.google.android.material.button.MaterialButton
                            android:id="@+id/page_turn_swipe_button"
                            android:layout_width="match_parent"
                            android:layout_height="52dp"
                            android:background="@drawable/bg_reader_v2_mode_selectable"
                            android:minWidth="0dp"
                            android:text="@string/reader_v2_page_turn_swipe"
                            android:textAllCaps="false"
                            android:textColor="@color/reader_v2_text"
                            app:backgroundTint="@null"
                            app:cornerRadius="0dp"
                            app:strokeWidth="0dp" />

                        <com.google.android.material.button.MaterialButton
                            android:id="@+id/page_turn_tap_button"
                            android:layout_width="match_parent"
                            android:layout_height="52dp"
                            android:background="@drawable/bg_reader_v2_mode_selectable"
                            android:minWidth="0dp"
                            android:text="@string/reader_v2_page_turn_tap"
                            android:textAllCaps="false"
                            android:textColor="@color/reader_v2_text"
                            app:backgroundTint="@null"
                            app:cornerRadius="0dp"
                            app:strokeWidth="0dp" />

                        <TextView
                            android:layout_width="match_parent"
                            android:layout_height="52dp"
                            android:background="@drawable/bg_reader_v2_row"
                            android:gravity="center_vertical"
                            android:paddingStart="16dp"
                            android:text="@string/reader_v2_show_on_page"
                            android:textColor="@color/reader_v2_primary"
                            android:textSize="14sp" />

                        <com.google.android.material.materialswitch.MaterialSwitch
                            android:id="@+id/show_title_switch"
                            android:layout_width="match_parent"
                            android:layout_height="58dp"
                            android:background="@drawable/bg_reader_v2_row"
                            android:checked="true"
                            android:gravity="center_vertical"
                            android:paddingStart="16dp"
                            android:paddingEnd="16dp"
                            android:text="@string/reader_v2_show_title"
                            android:textColor="@color/reader_v2_text"
                            android:textSize="15sp" />

                        <com.google.android.material.materialswitch.MaterialSwitch
                            android:id="@+id/show_status_switch"
                            android:layout_width="match_parent"
                            android:layout_height="58dp"
                            android:background="@drawable/bg_reader_v2_row"
                            android:gravity="center_vertical"
                            android:paddingStart="16dp"
                            android:paddingEnd="16dp"
                            android:text="@string/reader_v2_show_status"
                            android:textColor="@color/reader_v2_text"
                            android:textSize="15sp" />
                    </LinearLayout>
                </androidx.core.widget.NestedScrollView>
            </FrameLayout>
        </LinearLayout>
    </androidx.constraintlayout.widget.ConstraintLayout>

    <LinearLayout
        android:id="@+id/reader_contents_overlay"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/reader_v2_canvas"
        android:clickable="true"
        android:focusable="false"
        android:importantForAccessibility="no"
        android:orientation="vertical"
        android:visibility="gone">

        <LinearLayout
            android:id="@+id/contents_top_bar"
            android:layout_width="match_parent"
            android:layout_height="58dp"
            android:background="@color/reader_v2_chrome"
            android:gravity="center_vertical"
            android:orientation="horizontal">

            <com.google.android.material.button.MaterialButton
                android:id="@+id/tab_toc_button"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:background="@drawable/bg_reader_v2_tab"
                android:minWidth="0dp"
                android:text="@string/reader_v2_tab_toc"
                android:textColor="@color/reader_v2_text"
                android:textSize="12sp"
                app:backgroundTint="@null"
                app:cornerRadius="0dp" />

            <com.google.android.material.button.MaterialButton
                android:id="@+id/tab_bookmarks_button"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:background="@drawable/bg_reader_v2_tab"
                android:minWidth="0dp"
                android:text="@string/reader_v2_tab_bookmarks"
                android:textColor="@color/reader_v2_secondary_on_light"
                android:textSize="12sp"
                app:backgroundTint="@null"
                app:cornerRadius="0dp" />

            <com.google.android.material.button.MaterialButton
                android:id="@+id/tab_quotes_button"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:background="@drawable/bg_reader_v2_tab"
                android:minWidth="0dp"
                android:text="@string/reader_v2_tab_quotes"
                android:textColor="@color/reader_v2_secondary_on_light"
                android:textSize="12sp"
                app:backgroundTint="@null"
                app:cornerRadius="0dp" />

            <ImageButton
                android:id="@+id/contents_close_button"
                android:layout_width="48dp"
                android:layout_height="match_parent"
                android:background="?attr/selectableItemBackgroundBorderless"
                android:contentDescription="@string/reader_v2_close"
                android:padding="13dp"
                android:src="@drawable/ic_reader_v2_close" />
        </LinearLayout>

        <TextView
            android:id="@+id/contents_book_title"
            android:layout_width="match_parent"
            android:layout_height="50dp"
            android:background="@android:color/transparent"
            android:ellipsize="end"
            android:gravity="center_vertical"
            android:maxLines="1"
            android:paddingStart="12dp"
            android:paddingEnd="12dp"
            android:text="@string/reader_v2_book_title_placeholder"
            android:textColor="@color/reader_v2_accent_text"
            android:textSize="15sp" />

        <FrameLayout
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="1">

            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/toc_recycler"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@color/reader_v2_canvas"
                android:clipToPadding="false"
                android:overScrollMode="never"
                android:paddingBottom="16dp" />

            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/bookmarks_recycler"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@color/reader_v2_chrome"
                android:clipToPadding="false"
                android:overScrollMode="never"
                android:padding="12dp"
                android:visibility="gone" />

            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/quotes_recycler"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@color/reader_v2_chrome"
                android:clipToPadding="false"
                android:overScrollMode="never"
                android:padding="12dp"
                android:visibility="gone" />

            <TextView
                android:id="@+id/toc_empty_text"
                android:layout_width="280dp"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:gravity="center"
                android:text="@string/reader_v2_no_toc"
                android:textColor="@color/reader_v2_secondary"
                android:textSize="15sp"
                android:visibility="gone" />

            <TextView
                android:id="@+id/bookmarks_empty_text"
                android:layout_width="280dp"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:gravity="center"
                android:text="@string/reader_v2_no_bookmarks"
                android:textColor="@color/reader_v2_secondary"
                android:textSize="15sp"
                android:visibility="gone" />

            <TextView
                android:id="@+id/quotes_empty_text"
                android:layout_width="280dp"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:gravity="center"
                android:text="@string/reader_v2_no_quotes"
                android:textColor="@color/reader_v2_secondary"
                android:textSize="15sp"
                android:visibility="gone" />
        </FrameLayout>
    </LinearLayout>

    <FrameLayout
        android:id="@+id/reader_selection_overlay"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:visibility="gone">

        <View
            android:id="@+id/selection_scrim"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@color/reader_v2_scrim"
            android:clickable="true"
            android:contentDescription="@string/reader_v2_close_quote_actions"
            android:focusable="true" />

        <com.google.android.material.card.MaterialCardView
            android:id="@+id/selection_panel"
            android:layout_width="340dp"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:clickable="true"
            android:focusable="false"
            android:importantForAccessibility="no"
            app:cardBackgroundColor="@color/reader_v2_canvas"
            app:cardCornerRadius="2dp"
            app:cardElevation="10dp"
            app:strokeColor="@color/reader_v2_separator"
            app:strokeWidth="1dp">

            <androidx.core.widget.NestedScrollView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:fillViewport="false"
                android:overScrollMode="never">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="vertical">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="52dp"
                    android:background="@android:color/transparent"
                    android:gravity="center_vertical"
                    android:orientation="horizontal"
                    android:paddingStart="16dp">

                    <TextView
                        android:id="@+id/selection_title"
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:text="@string/reader_v2_quote_actions"
                        android:textColor="@color/reader_v2_secondary_on_light"
                        android:textSize="16sp" />

                    <ImageButton
                        android:id="@+id/selection_close_button"
                        android:layout_width="52dp"
                        android:layout_height="match_parent"
                        android:background="?attr/selectableItemBackgroundBorderless"
                        android:contentDescription="@string/reader_v2_close"
                        android:padding="14dp"
                        android:src="@drawable/ic_reader_v2_close" />
                </LinearLayout>

                <com.google.android.material.button.MaterialButton
                    android:id="@+id/selection_share_button"
                    android:layout_width="match_parent"
                    android:layout_height="56dp"
                    android:gravity="start|center_vertical"
                    android:minWidth="0dp"
                    android:paddingStart="20dp"
                    android:text="@string/reader_v2_share"
                    android:textAllCaps="false"
                    android:textColor="@color/reader_v2_primary"
                    android:textSize="16sp"
                    app:backgroundTint="@android:color/transparent"
                    app:cornerRadius="0dp"
                    app:icon="@drawable/ic_reader_v2_share"
                    app:iconGravity="textStart"
                    app:iconPadding="16dp"
                    app:iconTint="@color/reader_v2_secondary_on_light" />

                <View
                    android:layout_width="match_parent"
                    android:layout_height="1dp"
                    android:background="@color/reader_v2_separator" />

                <com.google.android.material.button.MaterialButton
                    android:id="@+id/selection_copy_button"
                    android:layout_width="match_parent"
                    android:layout_height="56dp"
                    android:gravity="start|center_vertical"
                    android:minWidth="0dp"
                    android:paddingStart="20dp"
                    android:text="@string/reader_v2_copy"
                    android:textAllCaps="false"
                    android:textColor="@color/reader_v2_primary"
                    android:textSize="16sp"
                    app:backgroundTint="@android:color/transparent"
                    app:cornerRadius="0dp"
                    app:icon="@drawable/ic_reader_v2_copy"
                    app:iconGravity="textStart"
                    app:iconPadding="16dp"
                    app:iconTint="@color/reader_v2_secondary_on_light" />

                <View
                    android:layout_width="match_parent"
                    android:layout_height="1dp"
                    android:background="@color/reader_v2_separator" />

                <com.google.android.material.button.MaterialButton
                    android:id="@+id/selection_note_button"
                    android:layout_width="match_parent"
                    android:layout_height="56dp"
                    android:gravity="start|center_vertical"
                    android:minWidth="0dp"
                    android:paddingStart="20dp"
                    android:text="@string/reader_v2_add_note"
                    android:textAllCaps="false"
                    android:textColor="@color/reader_v2_primary"
                    android:textSize="16sp"
                    app:backgroundTint="@android:color/transparent"
                    app:cornerRadius="0dp"
                    app:icon="@drawable/ic_reader_v2_note"
                    app:iconGravity="textStart"
                    app:iconPadding="16dp"
                    app:iconTint="@color/reader_v2_secondary_on_light" />

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="62dp"
                    android:background="@android:color/transparent"
                    android:gravity="center"
                    android:orientation="horizontal">

                    <ImageButton
                        android:id="@+id/color_none_button"
                        android:layout_width="48dp"
                        android:layout_height="48dp"
                        android:layout_marginStart="4dp"
                        android:layout_marginEnd="4dp"
                        android:background="@drawable/bg_reader_v2_color_circle"
                        android:backgroundTint="@color/reader_v2_selection_none"
                        android:contentDescription="@string/reader_v2_no_highlight"
                        android:padding="10dp"
                        android:src="@drawable/ic_reader_v2_option_marker" />

                    <ImageButton
                        android:id="@+id/color_yellow_button"
                        android:layout_width="48dp"
                        android:layout_height="48dp"
                        android:layout_marginStart="4dp"
                        android:layout_marginEnd="4dp"
                        android:background="@drawable/bg_reader_v2_color_circle"
                        android:backgroundTint="@color/reader_v2_selection_yellow"
                        android:contentDescription="@string/reader_v2_highlight_yellow"
                        android:padding="10dp"
                        android:src="@drawable/ic_reader_v2_option_marker" />

                    <ImageButton
                        android:id="@+id/color_green_button"
                        android:layout_width="48dp"
                        android:layout_height="48dp"
                        android:layout_marginStart="4dp"
                        android:layout_marginEnd="4dp"
                        android:background="@drawable/bg_reader_v2_color_circle"
                        android:backgroundTint="@color/reader_v2_selection_green"
                        android:contentDescription="@string/reader_v2_highlight_green"
                        android:padding="10dp"
                        android:src="@drawable/ic_reader_v2_option_marker" />

                    <ImageButton
                        android:id="@+id/color_blue_button"
                        android:layout_width="48dp"
                        android:layout_height="48dp"
                        android:layout_marginStart="4dp"
                        android:layout_marginEnd="4dp"
                        android:background="@drawable/bg_reader_v2_color_circle"
                        android:backgroundTint="@color/reader_v2_selection_blue"
                        android:contentDescription="@string/reader_v2_highlight_blue"
                        android:padding="10dp"
                        android:src="@drawable/ic_reader_v2_option_marker" />

                    <ImageButton
                        android:id="@+id/color_purple_button"
                        android:layout_width="48dp"
                        android:layout_height="48dp"
                        android:layout_marginStart="4dp"
                        android:layout_marginEnd="4dp"
                        android:background="@drawable/bg_reader_v2_color_circle"
                        android:backgroundTint="@color/reader_v2_selection_purple"
                        android:contentDescription="@string/reader_v2_highlight_purple"
                        android:padding="10dp"
                        android:src="@drawable/ic_reader_v2_option_marker" />

                    <ImageButton
                        android:id="@+id/color_pink_button"
                        android:layout_width="48dp"
                        android:layout_height="48dp"
                        android:layout_marginStart="4dp"
                        android:layout_marginEnd="4dp"
                        android:background="@drawable/bg_reader_v2_color_circle"
                        android:backgroundTint="@color/reader_v2_selection_pink"
                        android:contentDescription="@string/reader_v2_highlight_pink"
                        android:padding="10dp"
                        android:src="@drawable/ic_reader_v2_option_marker" />
                </LinearLayout>

                    <com.google.android.material.button.MaterialButton
                        android:id="@+id/save_quote_button"
                        android:layout_width="match_parent"
                        android:layout_height="56dp"
                        android:minWidth="0dp"
                        android:text="@string/reader_v2_save_quote"
                        android:textColor="@color/reader_v2_text"
                        android:textSize="16sp"
                        app:backgroundTint="@color/reader_v2_selection_none"
                        app:cornerRadius="0dp" />
                </LinearLayout>
            </androidx.core.widget.NestedScrollView>
        </com.google.android.material.card.MaterialCardView>
    </FrameLayout>

    <FrameLayout
        android:id="@+id/note_editor_overlay"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:visibility="gone">

        <View
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@color/reader_v2_dialog_scrim"
            android:clickable="true"
            android:focusable="false"
            android:importantForAccessibility="no" />

        <com.google.android.material.card.MaterialCardView
            android:layout_width="340dp"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:clickable="true"
            android:focusable="false"
            android:importantForAccessibility="no"
            app:cardBackgroundColor="@color/reader_v2_canvas"
            app:cardCornerRadius="2dp"
            app:cardElevation="12dp"
            app:strokeColor="@color/reader_v2_separator"
            app:strokeWidth="1dp">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:padding="16dp">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:gravity="center_vertical"
                    android:orientation="horizontal">

                    <ImageView
                        android:layout_width="24dp"
                        android:layout_height="24dp"
                        android:contentDescription="@null"
                        android:src="@drawable/ic_reader_v2_quote" />

                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_marginStart="8dp"
                        android:text="@string/reader_v2_note_title"
                        android:textColor="@color/reader_v2_secondary_on_light"
                        android:textSize="15sp" />
                </LinearLayout>

                <TextView
                    android:id="@+id/note_quote_text"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="12dp"
                    android:ellipsize="end"
                    android:maxLines="4"
                    android:textColor="@color/reader_v2_text"
                    android:textSize="16sp" />

                <com.google.android.material.textfield.TextInputLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="14dp"
                    android:hint="@string/reader_v2_note_hint"
                    app:boxBackgroundColor="@color/reader_v2_canvas"
                    app:boxBackgroundMode="outline"
                    app:boxStrokeColor="@color/reader_v2_secondary_on_light"
                    app:hintTextColor="@color/reader_v2_secondary_on_light">

                    <com.google.android.material.textfield.TextInputEditText
                        android:id="@+id/note_input"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:gravity="top|start"
                        android:inputType="textCapSentences|textMultiLine"
                        android:minHeight="96dp"
                        android:textColor="@color/reader_v2_text"
                        android:textColorHint="@color/reader_v2_secondary_on_light"
                        android:textSize="15sp" />
                </com.google.android.material.textfield.TextInputLayout>

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="50dp"
                    android:layout_marginTop="14dp"
                    android:orientation="horizontal">

                    <com.google.android.material.button.MaterialButton
                        android:id="@+id/note_cancel_button"
                        android:layout_width="0dp"
                        android:layout_height="match_parent"
                        android:layout_marginEnd="6dp"
                        android:layout_weight="1"
                        android:minWidth="0dp"
                        android:text="@string/reader_v2_cancel"
                        android:textColor="@color/reader_v2_primary"
                        app:backgroundTint="@color/reader_v2_separator"
                        app:cornerRadius="3dp" />

                    <com.google.android.material.button.MaterialButton
                        android:id="@+id/note_save_button"
                        android:layout_width="0dp"
                        android:layout_height="match_parent"
                        android:layout_marginStart="6dp"
                        android:layout_weight="1"
                        android:minWidth="0dp"
                        android:text="@string/reader_v2_save"
                        android:textColor="@color/reader_v2_canvas"
                        app:backgroundTint="@color/reader_v2_accent"
                        app:cornerRadius="3dp" />
                </LinearLayout>
            </LinearLayout>
        </com.google.android.material.card.MaterialCardView>
    </FrameLayout>
</FrameLayout>
