TachiyomiSY-Plus/app/src/main/res/layout/reader_activity.xml
Ivan Iskandar 374ecde463 Use correct color for reader loading indicator (#5685)
* Revert "Revert "Use correct color for reader loading indicator (#5645)" (fixes #5669)"

This reverts commit a4eba50c

* Fix crash on older APIs

(cherry picked from commit 5e77ae208da1c21eb58f1eb092ac1e9f3151c14a)

# Conflicts:
#	app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonConfig.kt
2021-08-27 12:50:33 -04:00

500 lines
23 KiB
XML
Executable File

<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/reader_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center">
<FrameLayout
android:id="@+id/reader_container"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:id="@+id/viewer_container"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<eu.kanade.tachiyomi.ui.reader.PageIndicatorTextView
android:id="@+id/page_number"
style="@style/TextAppearance.Regular.Caption"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center_horizontal"
android:padding="4dp"
android:textDirection="ltr"
android:textStyle="bold" />
</FrameLayout>
<eu.kanade.tachiyomi.ui.reader.ReaderColorFilterView
android:id="@+id/color_overlay"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone" />
<eu.kanade.tachiyomi.ui.reader.ReaderNavigationOverlayView
android:id="@+id/navigation_overlay"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/reader_menu"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:theme="?attr/actionBarTheme"
android:visibility="invisible"
tools:visibility="visible">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:animateLayoutChanges="true"
app:elevation="0dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize" />
<LinearLayout
android:id="@+id/eh_utils"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:visibility="gone"
tools:visibility="visible">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<Switch
android:id="@+id/eh_autoscroll"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="8dp"
android:text="@string/eh_autoscroll" />
<EditText
android:id="@+id/eh_autoscroll_freq"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:layout_weight="0.2"
android:ems="10"
android:inputType="numberDecimal"
android:maxLength="10" />
<Button
android:id="@+id/eh_autoscroll_help"
style="?android:attr/borderlessButtonStyle"
android:layout_width="40dp"
android:layout_height="wrap_content"
android:text="\?" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="horizontal">
<Button
android:id="@+id/eh_retry_all"
style="?android:attr/borderlessButtonStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/eh_retry_all" />
<Button
android:id="@+id/eh_retry_all_help"
style="?android:attr/borderlessButtonStyle"
android:layout_width="40dp"
android:layout_height="wrap_content"
android:text="\?" />
<Button
android:id="@+id/eh_boost_page"
style="?android:attr/borderlessButtonStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/eh_boost_page" />
<Button
android:id="@+id/eh_boost_page_help"
style="?android:attr/borderlessButtonStyle"
android:layout_width="40dp"
android:layout_height="wrap_content"
android:text="\?" />
</LinearLayout>
</LinearLayout>
<ImageButton
android:id="@+id/expand_eh_button"
style="?android:attr/borderlessButtonStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="0dp"
app:srcCompat="@drawable/ic_keyboard_arrow_down_white_32dp" />
</com.google.android.material.appbar.AppBarLayout>
<androidx.constraintlayout.widget.Guideline
android:id="@+id/above_guideline"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0.3"
app:layout_constraintTop_toBottomOf="@id/header"/>
<RelativeLayout
android:id="@+id/seekbar_vert_container"
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="horizontal"
app:layout_constraintBottom_toTopOf="@id/below_guideline"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/above_guideline"
tools:ignore="NotSibling">
<LinearLayout
android:id="@+id/reader_nav_vert"
android:layout_width="48dp"
android:layout_height="match_parent"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:orientation="vertical"
android:gravity="center">
<ImageButton
android:id="@+id/above_chapter"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_gravity="center"
android:layout_marginTop="80dp"
android:layout_marginBottom="8dp"
android:background="@drawable/reader_seekbar_button"
android:contentDescription="@string/action_previous_chapter"
android:padding="@dimen/screen_edge_margin"
android:rotation="90"
app:srcCompat="@drawable/ic_skip_previous_24dp"
app:tint="?attr/colorOnToolbar" />
<LinearLayout
android:id="@+id/reader_seekbar_vert"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/reader_seekbar_background"
android:orientation="vertical">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/above_page_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:gravity="center"
android:textColor="?attr/colorOnToolbar"
android:textSize="15sp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
tools:text="1" />
<eu.kanade.tachiyomi.ui.reader.ReaderSeekBar
android:id="@+id/page_seekbar_vert"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginTop="27dp"
android:layout_marginBottom="27dp"
android:layout_gravity="center|top"
android:rotation="90"
android:progress="30"
app:layout_constraintDimensionRatio="1:1"
app:layout_constraintBottom_toTopOf="@id/below_page_text"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/above_page_text" />
<TextView
android:id="@+id/below_page_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="12dp"
android:gravity="center"
android:textColor="?attr/colorOnToolbar"
android:textSize="15sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
tools:text="15" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
<ImageButton
android:id="@+id/below_chapter"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_gravity="center"
android:layout_marginTop="8dp"
android:layout_marginBottom="80dp"
android:background="@drawable/reader_seekbar_button"
android:contentDescription="@string/action_next_chapter"
android:padding="@dimen/screen_edge_margin"
android:rotation="90"
app:srcCompat="@drawable/ic_skip_next_24dp"
app:tint="?attr/colorOnToolbar" />
</LinearLayout>
</RelativeLayout>
<androidx.constraintlayout.widget.Guideline
android:id="@+id/below_guideline"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_percent="0.85"
app:layout_constraintBottom_toTopOf="@id/reader_menu_bottom"/>
<LinearLayout
android:id="@+id/reader_menu_bottom"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<LinearLayout
android:id="@+id/reader_nav_horz"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="16dp"
android:layoutDirection="ltr"
android:orientation="horizontal">
<ImageButton
android:id="@+id/left_chapter"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginEnd="8dp"
android:background="@drawable/reader_seekbar_button"
android:contentDescription="@string/action_previous_chapter"
android:padding="@dimen/screen_edge_margin"
app:srcCompat="@drawable/ic_skip_previous_24dp"
app:tint="?attr/colorOnToolbar" />
<LinearLayout
android:id="@+id/reader_seekbar"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="@drawable/reader_seekbar_background"
android:clickable="true"
android:paddingStart="8dp"
android:paddingEnd="8dp"
tools:ignore="KeyboardInaccessibleWidget">
<TextView
android:id="@+id/left_page_text"
android:layout_width="32dp"
android:layout_height="match_parent"
android:gravity="center"
android:textColor="?attr/colorOnToolbar"
android:textSize="15sp"
tools:text="1" />
<!--
Wonky way of setting height due to issues with horizontally centering the thumb in Android 5.
See https://stackoverflow.com/questions/15701767/android-thumb-is-not-centered-in-seekbar
-->
<eu.kanade.tachiyomi.ui.reader.ReaderSeekBar
android:id="@+id/page_seekbar"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:maxHeight="?attr/actionBarSize"
android:minHeight="?attr/actionBarSize" />
<TextView
android:id="@+id/right_page_text"
android:layout_width="32dp"
android:layout_height="match_parent"
android:gravity="center"
android:textColor="?attr/colorOnToolbar"
android:textSize="15sp"
tools:text="15" />
</LinearLayout>
<ImageButton
android:id="@+id/right_chapter"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_marginStart="8dp"
android:background="@drawable/reader_seekbar_button"
android:contentDescription="@string/action_next_chapter"
android:padding="@dimen/screen_edge_margin"
app:srcCompat="@drawable/ic_skip_next_24dp"
app:tint="?attr/colorOnToolbar" />
</LinearLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/toolbar_bottom"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:layout_gravity="bottom"
android:background="?attr/colorToolbar"
android:clickable="true"
tools:ignore="KeyboardInaccessibleWidget">
<ImageButton
android:id="@+id/action_chapter_list"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/custom_filter"
android:padding="@dimen/screen_edge_margin"
app:layout_constraintEnd_toStartOf="@+id/action_web_view"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintHorizontal_chainStyle="spread"
app:srcCompat="@drawable/ic_format_list_numbered_24dp"
app:tint="?attr/colorOnToolbar" />
<ImageButton
android:id="@+id/action_web_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/custom_filter"
android:padding="@dimen/screen_edge_margin"
app:layout_constraintEnd_toStartOf="@id/action_reading_mode"
app:layout_constraintStart_toEndOf="@+id/action_chapter_list"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintHorizontal_chainStyle="spread"
app:srcCompat="@drawable/ic_public_24dp"
app:tint="?attr/colorOnToolbar" />
<ImageButton
android:id="@+id/action_reading_mode"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/viewer"
android:padding="@dimen/screen_edge_margin"
app:layout_constraintEnd_toStartOf="@id/action_crop_borders"
app:layout_constraintStart_toEndOf="@+id/action_web_view"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintHorizontal_chainStyle="spread"
app:srcCompat="@drawable/ic_reader_default_24dp"
app:tint="?attr/colorOnToolbar" />
<ImageButton
android:id="@+id/action_crop_borders"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/pref_crop_borders"
android:padding="@dimen/screen_edge_margin"
app:layout_constraintEnd_toStartOf="@id/action_rotation"
app:layout_constraintStart_toEndOf="@+id/action_reading_mode"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintHorizontal_chainStyle="spread"
app:srcCompat="@drawable/ic_crop_24dp"
app:tint="?attr/colorOnToolbar" />
<ImageButton
android:id="@+id/action_rotation"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/pref_rotation_type"
android:padding="@dimen/screen_edge_margin"
app:layout_constraintEnd_toStartOf="@id/double_page"
app:layout_constraintStart_toEndOf="@+id/action_crop_borders"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintHorizontal_chainStyle="spread"
app:srcCompat="@drawable/ic_screen_rotation_24dp"
app:tint="?attr/colorOnToolbar" />
<ImageButton
android:id="@+id/double_page"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/page_layout"
android:padding="@dimen/screen_edge_margin"
app:layout_constraintEnd_toStartOf="@id/shift_page_button"
app:layout_constraintStart_toEndOf="@+id/action_rotation"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintHorizontal_chainStyle="spread"
app:srcCompat="@drawable/ic_book_open_variant_24dp"
app:tint="?attr/colorOnToolbar" />
<ImageButton
android:id="@+id/shift_page_button"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/shift_double_pages"
android:padding="@dimen/screen_edge_margin"
app:layout_constraintEnd_toStartOf="@id/action_settings"
app:layout_constraintStart_toEndOf="@+id/double_page"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintHorizontal_chainStyle="spread"
app:srcCompat="@drawable/ic_page_next_outline_24dp"
app:tint="?attr/colorOnToolbar" />
<ImageButton
android:id="@+id/action_settings"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/action_settings"
android:padding="@dimen/screen_edge_margin"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/shift_page_button"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintHorizontal_chainStyle="spread"
app:srcCompat="@drawable/ic_settings_24dp"
app:tint="?attr/colorOnToolbar" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<View
android:id="@+id/brightness_overlay"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>