reader_activity.xml 9.9 KB

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