reader_activity.xml 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. <androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
  2. xmlns:app="http://schemas.android.com/apk/res-auto"
  3. xmlns:tools="http://schemas.android.com/tools"
  4. android:layout_width="match_parent"
  5. android:layout_height="match_parent"
  6. android:gravity="center">
  7. <FrameLayout
  8. android:id="@+id/reader_container"
  9. android:layout_width="match_parent"
  10. android:layout_height="match_parent">
  11. <FrameLayout
  12. android:id="@+id/viewer_container"
  13. android:layout_width="match_parent"
  14. android:layout_height="match_parent" />
  15. <com.google.android.material.progressindicator.CircularProgressIndicator
  16. android:id="@+id/please_wait"
  17. android:layout_width="wrap_content"
  18. android:layout_height="wrap_content"
  19. android:layout_gravity="center"
  20. android:indeterminate="true"
  21. android:visibility="gone"
  22. app:indicatorSize="56dp"
  23. tools:visibility="visible" />
  24. <eu.kanade.tachiyomi.ui.reader.PageIndicatorTextView
  25. android:id="@+id/page_number"
  26. style="@style/TextAppearance.Regular.Caption"
  27. android:layout_width="wrap_content"
  28. android:layout_height="wrap_content"
  29. android:layout_gravity="bottom|center_horizontal"
  30. android:padding="4dp"
  31. android:textDirection="ltr"
  32. android:textStyle="bold" />
  33. </FrameLayout>
  34. <eu.kanade.tachiyomi.ui.reader.ReaderColorFilterView
  35. android:id="@+id/color_overlay"
  36. android:layout_width="match_parent"
  37. android:layout_height="match_parent"
  38. android:visibility="gone" />
  39. <FrameLayout
  40. android:id="@+id/reader_menu"
  41. android:layout_width="match_parent"
  42. android:layout_height="match_parent"
  43. android:theme="?attr/actionBarTheme"
  44. android:visibility="invisible"
  45. tools:visibility="visible">
  46. <com.google.android.material.appbar.MaterialToolbar
  47. android:id="@+id/toolbar"
  48. android:layout_width="match_parent"
  49. android:layout_height="?attr/actionBarSize"
  50. android:background="?attr/colorPrimary" />
  51. <LinearLayout
  52. android:id="@+id/reader_menu_bottom"
  53. android:layout_width="match_parent"
  54. android:layout_height="wrap_content"
  55. android:layout_gravity="bottom"
  56. android:orientation="vertical">
  57. <LinearLayout
  58. android:id="@+id/reader_nav"
  59. android:layout_width="match_parent"
  60. android:layout_height="wrap_content"
  61. android:layout_marginStart="8dp"
  62. android:layout_marginEnd="8dp"
  63. android:layout_marginBottom="16dp"
  64. android:layoutDirection="ltr"
  65. android:orientation="horizontal">
  66. <ImageButton
  67. android:id="@+id/left_chapter"
  68. android:layout_width="48dp"
  69. android:layout_height="48dp"
  70. android:layout_marginEnd="8dp"
  71. android:background="@drawable/reader_seekbar_background"
  72. android:contentDescription="@string/action_previous_chapter"
  73. android:padding="@dimen/material_layout_keylines_screen_edge_margin"
  74. app:srcCompat="@drawable/ic_skip_previous_24dp"
  75. app:tint="?attr/colorOnPrimary" />
  76. <LinearLayout
  77. android:id="@+id/reader_seekbar"
  78. android:layout_width="0dp"
  79. android:layout_height="match_parent"
  80. android:layout_weight="1"
  81. android:background="@drawable/reader_seekbar_button"
  82. android:paddingStart="8dp"
  83. android:paddingEnd="8dp">
  84. <TextView
  85. android:id="@+id/left_page_text"
  86. android:layout_width="32dp"
  87. android:layout_height="match_parent"
  88. android:gravity="center"
  89. android:textColor="?attr/colorOnPrimary"
  90. android:textSize="15sp"
  91. tools:text="1" />
  92. <!--
  93. Wonky way of setting height due to issues with horizontally centering the thumb in Android 5.
  94. See https://stackoverflow.com/questions/15701767/android-thumb-is-not-centered-in-seekbar
  95. -->
  96. <eu.kanade.tachiyomi.ui.reader.ReaderSeekBar
  97. android:id="@+id/page_seekbar"
  98. android:layout_width="0dp"
  99. android:layout_height="wrap_content"
  100. android:layout_weight="1"
  101. android:maxHeight="?attr/actionBarSize"
  102. android:minHeight="?attr/actionBarSize" />
  103. <TextView
  104. android:id="@+id/right_page_text"
  105. android:layout_width="32dp"
  106. android:layout_height="match_parent"
  107. android:gravity="center"
  108. android:textColor="?attr/colorOnPrimary"
  109. android:textSize="15sp"
  110. tools:text="15" />
  111. </LinearLayout>
  112. <ImageButton
  113. android:id="@+id/right_chapter"
  114. android:layout_width="48dp"
  115. android:layout_height="48dp"
  116. android:layout_marginStart="8dp"
  117. android:background="@drawable/reader_seekbar_button"
  118. android:contentDescription="@string/action_next_chapter"
  119. android:padding="@dimen/material_layout_keylines_screen_edge_margin"
  120. app:srcCompat="@drawable/ic_skip_next_24dp"
  121. app:tint="?attr/colorOnPrimary" />
  122. </LinearLayout>
  123. <androidx.constraintlayout.widget.ConstraintLayout
  124. android:layout_width="match_parent"
  125. android:layout_height="?attr/actionBarSize"
  126. android:layout_gravity="bottom"
  127. android:background="?attr/colorPrimary">
  128. <ImageButton
  129. android:id="@+id/action_custom_filter"
  130. android:layout_width="wrap_content"
  131. android:layout_height="match_parent"
  132. android:background="?selectableItemBackgroundBorderless"
  133. android:contentDescription="@string/custom_filter"
  134. android:padding="@dimen/material_layout_keylines_screen_edge_margin"
  135. app:layout_constraintEnd_toStartOf="@id/action_settings"
  136. app:layout_constraintStart_toStartOf="parent"
  137. app:layout_constraintTop_toTopOf="parent"
  138. app:srcCompat="@drawable/ic_brightness_4_24dp"
  139. app:tint="?attr/colorOnPrimary" />
  140. <ImageButton
  141. android:id="@+id/action_settings"
  142. android:layout_width="wrap_content"
  143. android:layout_height="match_parent"
  144. android:background="?selectableItemBackgroundBorderless"
  145. android:contentDescription="@string/action_settings"
  146. android:padding="@dimen/material_layout_keylines_screen_edge_margin"
  147. app:layout_constraintEnd_toEndOf="parent"
  148. app:layout_constraintStart_toEndOf="@id/action_custom_filter"
  149. app:layout_constraintTop_toTopOf="parent"
  150. app:srcCompat="@drawable/ic_settings_24dp"
  151. app:tint="?attr/colorOnPrimary" />
  152. </androidx.constraintlayout.widget.ConstraintLayout>
  153. </LinearLayout>
  154. </FrameLayout>
  155. <View
  156. android:id="@+id/brightness_overlay"
  157. android:layout_width="match_parent"
  158. android:layout_height="match_parent"
  159. android:visibility="gone" />
  160. </androidx.coordinatorlayout.widget.CoordinatorLayout>