reader_activity.xml 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  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. <eu.kanade.tachiyomi.ui.reader.ReaderNavigationOverlayView
  40. android:id="@+id/navigation_overlay"
  41. android:layout_width="match_parent"
  42. android:layout_height="match_parent"
  43. android:visibility="gone" />
  44. <FrameLayout
  45. android:id="@+id/reader_menu"
  46. android:layout_width="match_parent"
  47. android:layout_height="match_parent"
  48. android:theme="?attr/actionBarTheme"
  49. android:visibility="invisible"
  50. tools:visibility="visible">
  51. <com.google.android.material.appbar.MaterialToolbar
  52. android:id="@+id/toolbar"
  53. android:layout_width="match_parent"
  54. android:layout_height="?attr/actionBarSize"
  55. android:background="?attr/colorPrimary" />
  56. <LinearLayout
  57. android:id="@+id/reader_menu_bottom"
  58. android:layout_width="match_parent"
  59. android:layout_height="wrap_content"
  60. android:layout_gravity="bottom"
  61. android:orientation="vertical">
  62. <LinearLayout
  63. android:id="@+id/reader_nav"
  64. android:layout_width="match_parent"
  65. android:layout_height="wrap_content"
  66. android:layout_marginStart="8dp"
  67. android:layout_marginEnd="8dp"
  68. android:layout_marginBottom="16dp"
  69. android:layoutDirection="ltr"
  70. android:orientation="horizontal">
  71. <ImageButton
  72. android:id="@+id/left_chapter"
  73. android:layout_width="48dp"
  74. android:layout_height="48dp"
  75. android:layout_marginEnd="8dp"
  76. android:background="@drawable/reader_seekbar_button"
  77. android:contentDescription="@string/action_previous_chapter"
  78. android:padding="@dimen/material_layout_keylines_screen_edge_margin"
  79. app:srcCompat="@drawable/ic_skip_previous_24dp"
  80. app:tint="?attr/colorOnPrimary" />
  81. <LinearLayout
  82. android:id="@+id/reader_seekbar"
  83. android:layout_width="0dp"
  84. android:layout_height="match_parent"
  85. android:layout_weight="1"
  86. android:background="@drawable/reader_seekbar_background"
  87. android:paddingStart="8dp"
  88. android:paddingEnd="8dp">
  89. <TextView
  90. android:id="@+id/left_page_text"
  91. android:layout_width="32dp"
  92. android:layout_height="match_parent"
  93. android:gravity="center"
  94. android:textColor="?attr/colorOnPrimary"
  95. android:textSize="15sp"
  96. tools:text="1" />
  97. <!--
  98. Wonky way of setting height due to issues with horizontally centering the thumb in Android 5.
  99. See https://stackoverflow.com/questions/15701767/android-thumb-is-not-centered-in-seekbar
  100. -->
  101. <eu.kanade.tachiyomi.ui.reader.ReaderSeekBar
  102. android:id="@+id/page_seekbar"
  103. android:layout_width="0dp"
  104. android:layout_height="wrap_content"
  105. android:layout_weight="1"
  106. android:maxHeight="?attr/actionBarSize"
  107. android:minHeight="?attr/actionBarSize" />
  108. <TextView
  109. android:id="@+id/right_page_text"
  110. android:layout_width="32dp"
  111. android:layout_height="match_parent"
  112. android:gravity="center"
  113. android:textColor="?attr/colorOnPrimary"
  114. android:textSize="15sp"
  115. tools:text="15" />
  116. </LinearLayout>
  117. <ImageButton
  118. android:id="@+id/right_chapter"
  119. android:layout_width="48dp"
  120. android:layout_height="48dp"
  121. android:layout_marginStart="8dp"
  122. android:background="@drawable/reader_seekbar_button"
  123. android:contentDescription="@string/action_next_chapter"
  124. android:padding="@dimen/material_layout_keylines_screen_edge_margin"
  125. app:srcCompat="@drawable/ic_skip_next_24dp"
  126. app:tint="?attr/colorOnPrimary" />
  127. </LinearLayout>
  128. <androidx.constraintlayout.widget.ConstraintLayout
  129. android:layout_width="match_parent"
  130. android:layout_height="?attr/actionBarSize"
  131. android:layout_gravity="bottom"
  132. android:background="?attr/colorPrimary">
  133. <ImageButton
  134. android:id="@+id/action_reader_mode"
  135. android:layout_width="wrap_content"
  136. android:layout_height="match_parent"
  137. android:background="?selectableItemBackgroundBorderless"
  138. android:contentDescription="@string/viewer"
  139. android:padding="@dimen/material_layout_keylines_screen_edge_margin"
  140. app:layout_constraintEnd_toStartOf="@id/action_rotation"
  141. app:layout_constraintStart_toStartOf="parent"
  142. app:layout_constraintTop_toTopOf="parent"
  143. app:srcCompat="@drawable/ic_reader_default_24dp"
  144. app:tint="?attr/colorOnPrimary" />
  145. <ImageButton
  146. android:id="@+id/action_rotation"
  147. android:layout_width="wrap_content"
  148. android:layout_height="match_parent"
  149. android:background="?selectableItemBackgroundBorderless"
  150. android:contentDescription="@string/pref_rotation_type"
  151. android:padding="@dimen/material_layout_keylines_screen_edge_margin"
  152. app:layout_constraintEnd_toStartOf="@id/action_crop_borders"
  153. app:layout_constraintStart_toEndOf="@+id/action_reader_mode"
  154. app:layout_constraintTop_toTopOf="parent"
  155. app:srcCompat="@drawable/ic_screen_rotation_24dp"
  156. app:tint="?attr/colorOnPrimary" />
  157. <ImageButton
  158. android:id="@+id/action_crop_borders"
  159. android:layout_width="wrap_content"
  160. android:layout_height="match_parent"
  161. android:background="?selectableItemBackgroundBorderless"
  162. android:contentDescription="@string/pref_crop_borders"
  163. android:padding="@dimen/material_layout_keylines_screen_edge_margin"
  164. app:layout_constraintEnd_toStartOf="@id/action_settings"
  165. app:layout_constraintStart_toEndOf="@+id/action_rotation"
  166. app:layout_constraintTop_toTopOf="parent"
  167. app:srcCompat="@drawable/ic_crop_free_24dp"
  168. app:tint="?attr/colorOnPrimary" />
  169. <ImageButton
  170. android:id="@+id/action_settings"
  171. android:layout_width="wrap_content"
  172. android:layout_height="match_parent"
  173. android:background="?selectableItemBackgroundBorderless"
  174. android:contentDescription="@string/action_settings"
  175. android:padding="@dimen/material_layout_keylines_screen_edge_margin"
  176. app:layout_constraintEnd_toEndOf="parent"
  177. app:layout_constraintStart_toEndOf="@id/action_crop_borders"
  178. app:layout_constraintTop_toTopOf="parent"
  179. app:srcCompat="@drawable/ic_settings_24dp"
  180. app:tint="?attr/colorOnPrimary" />
  181. </androidx.constraintlayout.widget.ConstraintLayout>
  182. </LinearLayout>
  183. </FrameLayout>
  184. <View
  185. android:id="@+id/brightness_overlay"
  186. android:layout_width="match_parent"
  187. android:layout_height="match_parent"
  188. android:visibility="gone" />
  189. </androidx.coordinatorlayout.widget.CoordinatorLayout>