reader_activity.xml 9.4 KB

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