Reader PR (with vertical sidebar) (#216)
* Reader PR * Dealt with conflicts + updates * Adeed missing import
This commit is contained in:
parent
0c150694e7
commit
2e1cf49d99
@ -25,6 +25,10 @@ object PreferenceKeys {
|
|||||||
|
|
||||||
const val showPageNumber = "pref_show_page_number_key"
|
const val showPageNumber = "pref_show_page_number_key"
|
||||||
|
|
||||||
|
const val landscapeVerticalSeekbar = "pref_show_vert_seekbar_landscape"
|
||||||
|
|
||||||
|
const val leftVerticalSeekbar = "pref_left_handed_vertical_seekbar"
|
||||||
|
|
||||||
const val dualPageSplit = "pref_dual_page_split"
|
const val dualPageSplit = "pref_dual_page_split"
|
||||||
|
|
||||||
const val dualPageInvert = "pref_dual_page_invert"
|
const val dualPageInvert = "pref_dual_page_invert"
|
||||||
|
@ -460,4 +460,8 @@ class PreferencesHelper(val context: Context) {
|
|||||||
fun extensionRepos() = flowPrefs.getStringSet(Keys.extensionRepos, emptySet())
|
fun extensionRepos() = flowPrefs.getStringSet(Keys.extensionRepos, emptySet())
|
||||||
|
|
||||||
fun cropBordersContinuesVertical() = flowPrefs.getBoolean(Keys.cropBordersContinuesVertical, false)
|
fun cropBordersContinuesVertical() = flowPrefs.getBoolean(Keys.cropBordersContinuesVertical, false)
|
||||||
|
|
||||||
|
fun landscapeVerticalSeekbar() = flowPrefs.getBoolean(Keys.landscapeVerticalSeekbar, false)
|
||||||
|
|
||||||
|
fun leftVerticalSeekbar() = flowPrefs.getBoolean(Keys.leftVerticalSeekbar, false)
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ import android.app.ProgressDialog
|
|||||||
import android.content.ClipData
|
import android.content.ClipData
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
|
import android.content.res.Configuration
|
||||||
import android.graphics.Bitmap
|
import android.graphics.Bitmap
|
||||||
import android.graphics.Color
|
import android.graphics.Color
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
@ -17,6 +18,7 @@ import android.view.View
|
|||||||
import android.view.WindowManager
|
import android.view.WindowManager
|
||||||
import android.view.animation.Animation
|
import android.view.animation.Animation
|
||||||
import android.view.animation.AnimationUtils
|
import android.view.animation.AnimationUtils
|
||||||
|
import android.widget.RelativeLayout
|
||||||
import android.widget.SeekBar
|
import android.widget.SeekBar
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.core.view.ViewCompat
|
import androidx.core.view.ViewCompat
|
||||||
@ -387,36 +389,81 @@ class ReaderActivity : BaseRxActivity<ReaderActivityBinding, ReaderPresenter>()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SY -->
|
||||||
// Init listeners on bottom menu
|
// Init listeners on bottom menu
|
||||||
binding.pageSeekbar.setOnSeekBarChangeListener(
|
val listener = object : SimpleSeekBarListener() {
|
||||||
object : SimpleSeekBarListener() {
|
override fun onProgressChanged(seekBar: SeekBar, value: Int, fromUser: Boolean) {
|
||||||
override fun onProgressChanged(seekBar: SeekBar, value: Int, fromUser: Boolean) {
|
if (viewer != null && fromUser) {
|
||||||
if (viewer != null && fromUser) {
|
moveToPageIndex(value)
|
||||||
moveToPageIndex(value)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
// Extra menu buttons
|
|
||||||
|
|
||||||
binding.leftChapter.setOnClickListener {
|
|
||||||
if (viewer != null) {
|
|
||||||
if (viewer is R2LPagerViewer) {
|
|
||||||
loadNextChapter()
|
|
||||||
} else {
|
|
||||||
loadPreviousChapter()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
binding.rightChapter.setOnClickListener {
|
listOf(binding.pageSeekbar, binding.pageSeekbarVert)
|
||||||
if (viewer != null) {
|
.forEach {
|
||||||
if (viewer is R2LPagerViewer) {
|
it.setOnSeekBarChangeListener(listener)
|
||||||
loadPreviousChapter()
|
|
||||||
} else {
|
|
||||||
loadNextChapter()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// SY <--
|
||||||
|
|
||||||
|
// Extra menu buttons
|
||||||
|
|
||||||
|
// SY -->
|
||||||
|
listOf(binding.leftChapter, binding.aboveChapter).forEach {
|
||||||
|
it.clicks()
|
||||||
|
.onEach {
|
||||||
|
if (viewer != null) {
|
||||||
|
if (viewer is R2LPagerViewer) {
|
||||||
|
loadNextChapter()
|
||||||
|
} else {
|
||||||
|
loadPreviousChapter()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.launchIn(lifecycleScope)
|
||||||
|
}
|
||||||
|
listOf(binding.rightChapter, binding.belowChapter).forEach {
|
||||||
|
it.clicks()
|
||||||
|
.onEach {
|
||||||
|
if (viewer != null) {
|
||||||
|
if (viewer is R2LPagerViewer) {
|
||||||
|
loadPreviousChapter()
|
||||||
|
} else {
|
||||||
|
loadNextChapter()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.launchIn(lifecycleScope)
|
||||||
|
}
|
||||||
|
// SY <--
|
||||||
|
|
||||||
|
/*binding.actionRotation.setOnClickListener {
|
||||||
|
val newOrientation = OrientationType.getNextOrientation(preferences.rotation().get(), resources)
|
||||||
|
|
||||||
|
preferences.rotation().set(newOrientation.prefValue)
|
||||||
|
setOrientation(newOrientation.flag)
|
||||||
|
|
||||||
|
rotationToast?.cancel()
|
||||||
|
rotationToast = toast(newOrientation.stringRes)
|
||||||
|
}
|
||||||
|
preferences.rotation().asImmediateFlow { updateRotationShortcut(it) }
|
||||||
|
.onEach {
|
||||||
|
updateRotationShortcut(it)
|
||||||
|
}
|
||||||
|
.launchIn(lifecycleScope)
|
||||||
|
*/
|
||||||
|
|
||||||
|
binding.actionCustomFilter.setOnClickListener {
|
||||||
|
val sheet = ReaderColorFilterSheet(this)
|
||||||
|
// Remove dimmed backdrop so changes can be previewed
|
||||||
|
.apply { window?.setDimAmount(0f) }
|
||||||
|
|
||||||
|
// Hide toolbars while sheet is open for better preview
|
||||||
|
sheet.setOnDismissListener { setMenuVisibility(true) }
|
||||||
|
setMenuVisibility(false)
|
||||||
|
|
||||||
|
sheet.show()
|
||||||
|
}
|
||||||
|
binding.actionSettings.setOnClickListener {
|
||||||
|
ReaderSettingsSheet(this).show()
|
||||||
}
|
}
|
||||||
|
|
||||||
/*binding.actionRotation.setOnClickListener {
|
/*binding.actionRotation.setOnClickListener {
|
||||||
@ -666,6 +713,14 @@ class ReaderActivity : BaseRxActivity<ReaderActivityBinding, ReaderPresenter>()
|
|||||||
binding.header.startAnimation(toolbarAnimation)
|
binding.header.startAnimation(toolbarAnimation)
|
||||||
// EXH <--
|
// EXH <--
|
||||||
|
|
||||||
|
val vertAnimation = AnimationUtils.loadAnimation(this, R.anim.fade_in_side)
|
||||||
|
val vertAnimationLeft = AnimationUtils.loadAnimation(this, R.anim.fade_in_side_left)
|
||||||
|
if (preferences.leftVerticalSeekbar().get() && binding.readerNavVert.isVisible) {
|
||||||
|
binding.seekbarVertContainer.startAnimation(vertAnimationLeft)
|
||||||
|
} else {
|
||||||
|
binding.seekbarVertContainer.startAnimation(vertAnimation)
|
||||||
|
}
|
||||||
|
|
||||||
val bottomAnimation = AnimationUtils.loadAnimation(this, R.anim.enter_from_bottom)
|
val bottomAnimation = AnimationUtils.loadAnimation(this, R.anim.enter_from_bottom)
|
||||||
binding.readerMenuBottom.startAnimation(bottomAnimation)
|
binding.readerMenuBottom.startAnimation(bottomAnimation)
|
||||||
}
|
}
|
||||||
@ -693,6 +748,14 @@ class ReaderActivity : BaseRxActivity<ReaderActivityBinding, ReaderPresenter>()
|
|||||||
binding.header.startAnimation(toolbarAnimation)
|
binding.header.startAnimation(toolbarAnimation)
|
||||||
// EXH <--
|
// EXH <--
|
||||||
|
|
||||||
|
val vertAnimation = AnimationUtils.loadAnimation(this, R.anim.fade_out_side)
|
||||||
|
val vertAnimationLeft = AnimationUtils.loadAnimation(this, R.anim.fade_out_side_left)
|
||||||
|
if (preferences.leftVerticalSeekbar().get() && binding.readerNavVert.isVisible) {
|
||||||
|
binding.seekbarVertContainer.startAnimation(vertAnimationLeft)
|
||||||
|
} else {
|
||||||
|
binding.seekbarVertContainer.startAnimation(vertAnimation)
|
||||||
|
}
|
||||||
|
|
||||||
val bottomAnimation = AnimationUtils.loadAnimation(this, R.anim.exit_to_bottom)
|
val bottomAnimation = AnimationUtils.loadAnimation(this, R.anim.exit_to_bottom)
|
||||||
binding.readerMenuBottom.startAnimation(bottomAnimation)
|
binding.readerMenuBottom.startAnimation(bottomAnimation)
|
||||||
}
|
}
|
||||||
@ -765,6 +828,31 @@ class ReaderActivity : BaseRxActivity<ReaderActivityBinding, ReaderPresenter>()
|
|||||||
showReadingModeSnackbar(presenter.getMangaViewer())
|
showReadingModeSnackbar(presenter.getMangaViewer())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SY -->
|
||||||
|
|
||||||
|
// --> Vertical seekbar hide on landscape
|
||||||
|
|
||||||
|
if (((resources.configuration.orientation == Configuration.ORIENTATION_LANDSCAPE && preferences.landscapeVerticalSeekbar().get()) || resources.configuration.orientation == Configuration.ORIENTATION_PORTRAIT) && (viewer is WebtoonViewer || viewer is VerticalPagerViewer)) {
|
||||||
|
binding.readerNavVert.isVisible = true
|
||||||
|
binding.readerNavHorz.isVisible = false
|
||||||
|
} else {
|
||||||
|
binding.readerNavVert.isVisible = false
|
||||||
|
binding.readerNavHorz.isVisible = true
|
||||||
|
}
|
||||||
|
|
||||||
|
// <-- Vertical seekbar hide on landscape
|
||||||
|
|
||||||
|
// --> Left-handed vertical seekbar
|
||||||
|
|
||||||
|
val params = binding.readerNavVert.layoutParams as RelativeLayout.LayoutParams
|
||||||
|
if (preferences.leftVerticalSeekbar().get() && binding.readerNavVert.isVisible) {
|
||||||
|
params.removeRule(RelativeLayout.ALIGN_PARENT_END)
|
||||||
|
binding.readerNavVert.layoutParams = params
|
||||||
|
}
|
||||||
|
|
||||||
|
// <-- Left-handed vertical seekbar
|
||||||
|
|
||||||
|
// SY <--
|
||||||
binding.toolbar.title = manga.title
|
binding.toolbar.title = manga.title
|
||||||
|
|
||||||
binding.pageSeekbar.isRTL = newViewer is R2LPagerViewer
|
binding.pageSeekbar.isRTL = newViewer is R2LPagerViewer
|
||||||
@ -872,8 +960,18 @@ class ReaderActivity : BaseRxActivity<ReaderActivityBinding, ReaderPresenter>()
|
|||||||
binding.leftPageText.text = "${pages.size}"
|
binding.leftPageText.text = "${pages.size}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SY -->
|
||||||
|
binding.abovePageText.text = "${page.number}"
|
||||||
|
binding.belowPageText.text = "${pages.size}"
|
||||||
|
// SY <--
|
||||||
|
|
||||||
binding.pageSeekbar.max = pages.lastIndex
|
binding.pageSeekbar.max = pages.lastIndex
|
||||||
binding.pageSeekbar.progress = page.index
|
binding.pageSeekbar.progress = page.index
|
||||||
|
|
||||||
|
// SY -->
|
||||||
|
binding.pageSeekbarVert.max = pages.lastIndex
|
||||||
|
binding.pageSeekbarVert.progress = page.index
|
||||||
|
// SY <--
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -67,6 +67,8 @@ class ReaderSettingsSheet(private val activity: ReaderActivity) : BaseBottomShee
|
|||||||
binding.rotationMode.bindToPreference(preferences.rotation(), 1)
|
binding.rotationMode.bindToPreference(preferences.rotation(), 1)
|
||||||
binding.backgroundColor.bindToIntPreference(preferences.readerTheme(), R.array.reader_themes_values)
|
binding.backgroundColor.bindToIntPreference(preferences.readerTheme(), R.array.reader_themes_values)
|
||||||
binding.showPageNumber.bindToPreference(preferences.showPageNumber())
|
binding.showPageNumber.bindToPreference(preferences.showPageNumber())
|
||||||
|
binding.landscapeVerticalSeekbar.bindToPreference(preferences.landscapeVerticalSeekbar())
|
||||||
|
binding.leftVerticalSeekbar.bindToPreference(preferences.leftVerticalSeekbar())
|
||||||
binding.fullscreen.bindToPreference(preferences.fullscreen())
|
binding.fullscreen.bindToPreference(preferences.fullscreen())
|
||||||
binding.dualPageSplit.bindToPreference(preferences.dualPageSplit())
|
binding.dualPageSplit.bindToPreference(preferences.dualPageSplit())
|
||||||
binding.keepscreen.bindToPreference(preferences.keepScreenOn())
|
binding.keepscreen.bindToPreference(preferences.keepScreenOn())
|
||||||
|
@ -50,6 +50,18 @@ class SettingsReaderController : SettingsController() {
|
|||||||
summaryRes = R.string.pref_show_reading_mode_summary
|
summaryRes = R.string.pref_show_reading_mode_summary
|
||||||
defaultValue = true
|
defaultValue = true
|
||||||
}
|
}
|
||||||
|
switchPreference {
|
||||||
|
key = Keys.landscapeVerticalSeekbar
|
||||||
|
titleRes = R.string.pref_show_vert_seekbar_landscape
|
||||||
|
summaryRes = R.string.pref_show_vert_seekbar_landscape_summary
|
||||||
|
defaultValue = false
|
||||||
|
}
|
||||||
|
switchPreference {
|
||||||
|
key = Keys.leftVerticalSeekbar
|
||||||
|
titleRes = R.string.pref_left_handed_vertical_seekbar
|
||||||
|
summaryRes = R.string.pref_left_handed_vertical_seekbar_summary
|
||||||
|
defaultValue = false
|
||||||
|
}
|
||||||
switchPreference {
|
switchPreference {
|
||||||
key = Keys.dualPageSplit
|
key = Keys.dualPageSplit
|
||||||
titleRes = R.string.pref_dual_page_split
|
titleRes = R.string.pref_dual_page_split
|
||||||
|
16
app/src/main/res/anim/fade_in_side.xml
Normal file
16
app/src/main/res/anim/fade_in_side.xml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<alpha
|
||||||
|
android:duration="175"
|
||||||
|
android:fillAfter="true"
|
||||||
|
android:fromAlpha="0.0"
|
||||||
|
android:interpolator="@android:anim/accelerate_interpolator"
|
||||||
|
android:toAlpha="1.0" />
|
||||||
|
|
||||||
|
<translate
|
||||||
|
android:duration="200"
|
||||||
|
android:fromXDelta="4%"
|
||||||
|
android:interpolator="@android:anim/accelerate_interpolator"
|
||||||
|
android:toXDelta="0%"
|
||||||
|
/>
|
||||||
|
</set>
|
16
app/src/main/res/anim/fade_in_side_left.xml
Normal file
16
app/src/main/res/anim/fade_in_side_left.xml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<alpha
|
||||||
|
android:duration="175"
|
||||||
|
android:fillAfter="true"
|
||||||
|
android:fromAlpha="0.0"
|
||||||
|
android:interpolator="@android:anim/accelerate_interpolator"
|
||||||
|
android:toAlpha="1.0" />
|
||||||
|
|
||||||
|
<translate
|
||||||
|
android:duration="200"
|
||||||
|
android:fromXDelta="-4%"
|
||||||
|
android:interpolator="@android:anim/accelerate_interpolator"
|
||||||
|
android:toXDelta="0%"
|
||||||
|
/>
|
||||||
|
</set>
|
15
app/src/main/res/anim/fade_out_side.xml
Normal file
15
app/src/main/res/anim/fade_out_side.xml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<alpha
|
||||||
|
android:duration="175"
|
||||||
|
android:fillAfter="true"
|
||||||
|
android:fromAlpha="1.0"
|
||||||
|
android:interpolator="@android:anim/accelerate_interpolator"
|
||||||
|
android:toAlpha="0.0" />
|
||||||
|
|
||||||
|
<translate
|
||||||
|
android:duration="200"
|
||||||
|
android:fromXDelta="0%"
|
||||||
|
android:toXDelta="4%"
|
||||||
|
/>
|
||||||
|
</set>
|
16
app/src/main/res/anim/fade_out_side_left.xml
Normal file
16
app/src/main/res/anim/fade_out_side_left.xml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<set xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<alpha
|
||||||
|
android:duration="175"
|
||||||
|
android:fillAfter="true"
|
||||||
|
android:fromAlpha="1.0"
|
||||||
|
android:interpolator="@android:anim/accelerate_interpolator"
|
||||||
|
android:toAlpha="0.0" />
|
||||||
|
|
||||||
|
<translate
|
||||||
|
android:duration="200"
|
||||||
|
android:fromXDelta="0%"
|
||||||
|
android:interpolator="@android:anim/accelerate_interpolator"
|
||||||
|
android:toXDelta="-4%"
|
||||||
|
/>
|
||||||
|
</set>
|
@ -1,11 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
|
|
||||||
<corners
|
|
||||||
android:topLeftRadius="10dp"
|
|
||||||
android:topRightRadius="10dp" />
|
|
||||||
|
|
||||||
<solid android:color="?attr/colorPrimary" />
|
|
||||||
|
|
||||||
</shape>
|
|
@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
<corners android:radius="1000dp" />
|
|
||||||
<solid android:color="?attr/colorPrimary" />
|
|
||||||
</shape>
|
|
@ -44,7 +44,7 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
<FrameLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/reader_menu"
|
android:id="@+id/reader_menu"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
@ -58,7 +58,10 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:animateLayoutChanges="true"
|
android:animateLayoutChanges="true"
|
||||||
android:background="?attr/colorPrimary"
|
android:background="?attr/colorPrimary"
|
||||||
app:elevation="0dp">
|
app:elevation="0dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<com.google.android.material.appbar.MaterialToolbar
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
@ -150,17 +153,144 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="0dp"
|
android:padding="0dp"
|
||||||
app:srcCompat="@drawable/ic_keyboard_arrow_down_white_32dp" />
|
app:srcCompat="@drawable/ic_keyboard_arrow_down_white_32dp" />
|
||||||
|
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
</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="40dp"
|
||||||
|
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="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
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/material_layout_keylines_screen_edge_margin"
|
||||||
|
android:rotation="90"
|
||||||
|
app:srcCompat="@drawable/ic_skip_previous_24dp"
|
||||||
|
app:tint="?attr/colorOnPrimary" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
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/colorOnPrimary"
|
||||||
|
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/colorOnPrimary"
|
||||||
|
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="40dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
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/material_layout_keylines_screen_edge_margin"
|
||||||
|
android:rotation="90"
|
||||||
|
app:srcCompat="@drawable/ic_skip_next_24dp"
|
||||||
|
app:tint="?attr/colorOnPrimary" />
|
||||||
|
|
||||||
|
</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.9"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/reader_menu_bottom"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/reader_menu_bottom"
|
android:id="@+id/reader_menu_bottom"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="bottom"
|
android:layout_gravity="bottom"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/reader_nav"
|
android:id="@+id/reader_nav_horz"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="8dp"
|
android:layout_marginStart="8dp"
|
||||||
@ -174,7 +304,7 @@
|
|||||||
android:layout_width="48dp"
|
android:layout_width="48dp"
|
||||||
android:layout_height="48dp"
|
android:layout_height="48dp"
|
||||||
android:layout_marginEnd="8dp"
|
android:layout_marginEnd="8dp"
|
||||||
android:background="@drawable/reader_seekbar_background"
|
android:background="@drawable/reader_seekbar_button"
|
||||||
android:contentDescription="@string/action_previous_chapter"
|
android:contentDescription="@string/action_previous_chapter"
|
||||||
android:padding="@dimen/material_layout_keylines_screen_edge_margin"
|
android:padding="@dimen/material_layout_keylines_screen_edge_margin"
|
||||||
app:srcCompat="@drawable/ic_skip_previous_24dp"
|
app:srcCompat="@drawable/ic_skip_previous_24dp"
|
||||||
@ -185,7 +315,7 @@
|
|||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:background="@drawable/reader_seekbar_button"
|
android:background="@drawable/reader_seekbar_background"
|
||||||
android:paddingStart="8dp"
|
android:paddingStart="8dp"
|
||||||
android:paddingEnd="8dp">
|
android:paddingEnd="8dp">
|
||||||
|
|
||||||
@ -207,8 +337,8 @@
|
|||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:maxHeight="?attr/actionBarSize"
|
android:maxHeight="40dp"
|
||||||
android:minHeight="?attr/actionBarSize" />
|
android:minHeight="40dp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/right_page_text"
|
android:id="@+id/right_page_text"
|
||||||
@ -223,8 +353,8 @@
|
|||||||
|
|
||||||
<ImageButton
|
<ImageButton
|
||||||
android:id="@+id/right_chapter"
|
android:id="@+id/right_chapter"
|
||||||
android:layout_width="48dp"
|
android:layout_width="40dp"
|
||||||
android:layout_height="48dp"
|
android:layout_height="40dp"
|
||||||
android:layout_marginStart="8dp"
|
android:layout_marginStart="8dp"
|
||||||
android:background="@drawable/reader_seekbar_button"
|
android:background="@drawable/reader_seekbar_button"
|
||||||
android:contentDescription="@string/action_next_chapter"
|
android:contentDescription="@string/action_next_chapter"
|
||||||
@ -296,7 +426,7 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</FrameLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/brightness_overlay"
|
android:id="@+id/brightness_overlay"
|
||||||
|
@ -122,13 +122,29 @@
|
|||||||
android:textColor="?android:attr/textColorSecondary"
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
app:layout_constraintTop_toBottomOf="@id/background_color" />
|
app:layout_constraintTop_toBottomOf="@id/background_color" />
|
||||||
|
|
||||||
|
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||||
|
android:id="@+id/landscape_vertical_seekbar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/pref_show_vert_seekbar_landscape"
|
||||||
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/show_page_number" />
|
||||||
|
|
||||||
|
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||||
|
android:id="@+id/left_vertical_seekbar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/pref_left_handed_vertical_seekbar"
|
||||||
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/landscape_vertical_seekbar" />
|
||||||
|
|
||||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||||
android:id="@+id/fullscreen"
|
android:id="@+id/fullscreen"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/pref_fullscreen"
|
android:text="@string/pref_fullscreen"
|
||||||
android:textColor="?android:attr/textColorSecondary"
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
app:layout_constraintTop_toBottomOf="@id/show_page_number" />
|
app:layout_constraintTop_toBottomOf="@id/left_vertical_seekbar" />
|
||||||
|
|
||||||
<com.google.android.material.switchmaterial.SwitchMaterial
|
<com.google.android.material.switchmaterial.SwitchMaterial
|
||||||
android:id="@+id/dual_page_split"
|
android:id="@+id/dual_page_split"
|
||||||
|
@ -262,6 +262,10 @@
|
|||||||
<string name="pref_show_page_number">Show page number</string>
|
<string name="pref_show_page_number">Show page number</string>
|
||||||
<string name="pref_show_reading_mode">Show reading mode</string>
|
<string name="pref_show_reading_mode">Show reading mode</string>
|
||||||
<string name="pref_show_reading_mode_summary">Briefly show current mode when reader is opened</string>
|
<string name="pref_show_reading_mode_summary">Briefly show current mode when reader is opened</string>
|
||||||
|
<string name="pref_show_vert_seekbar_landscape">Show vertical seekbar in landscape</string>
|
||||||
|
<string name="pref_show_vert_seekbar_landscape_summary">Enables vertical seekbar when in landscape</string>
|
||||||
|
<string name="pref_left_handed_vertical_seekbar">Left-handed vertical seekbar</string>
|
||||||
|
<string name="pref_left_handed_vertical_seekbar_summary">Switches which side the seekbar is on</string>
|
||||||
<string name="pref_true_color">32-bit color</string>
|
<string name="pref_true_color">32-bit color</string>
|
||||||
<string name="pref_true_color_summary">Reduces banding, but impacts performance</string>
|
<string name="pref_true_color_summary">Reduces banding, but impacts performance</string>
|
||||||
<string name="pref_crop_borders">Crop borders</string>
|
<string name="pref_crop_borders">Crop borders</string>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user