mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-10 05:05:08 +01:00
parent
0a1c036cc9
commit
31800027a1
@ -459,6 +459,14 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>(),
|
|||||||
viewer = newViewer
|
viewer = newViewer
|
||||||
viewer_container.addView(newViewer.getView())
|
viewer_container.addView(newViewer.getView())
|
||||||
|
|
||||||
|
viewer_container.setBackgroundColor(
|
||||||
|
if (viewer is WebtoonViewer) {
|
||||||
|
Color.BLACK
|
||||||
|
} else {
|
||||||
|
getResourceColor(android.R.attr.colorBackground)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
toolbar.title = manga.title
|
toolbar.title = manga.title
|
||||||
|
|
||||||
page_seekbar.isRTL = newViewer is R2LPagerViewer
|
page_seekbar.isRTL = newViewer is R2LPagerViewer
|
||||||
|
@ -92,12 +92,8 @@ class ReaderSettingsSheet(private val activity: ReaderActivity) :
|
|||||||
is WebtoonViewer -> initWebtoonPreferences()
|
is WebtoonViewer -> initWebtoonPreferences()
|
||||||
}
|
}
|
||||||
|
|
||||||
val bottomEdgeView = when (activity.viewer is PagerViewer) {
|
setBottomEdge(page_transitions, activity)
|
||||||
true -> page_transitions
|
setBottomEdge(webtoon_side_padding, activity)
|
||||||
false -> webtoon_side_padding
|
|
||||||
}
|
|
||||||
|
|
||||||
setBottomEdge(bottomEdgeView, activity)
|
|
||||||
|
|
||||||
close_button.setOnClickListener {
|
close_button.setOnClickListener {
|
||||||
dismiss()
|
dismiss()
|
||||||
@ -117,6 +113,13 @@ class ReaderSettingsSheet(private val activity: ReaderActivity) :
|
|||||||
private fun initGeneralPreferences() {
|
private fun initGeneralPreferences() {
|
||||||
viewer.onItemSelectedListener = IgnoreFirstSpinnerListener { position ->
|
viewer.onItemSelectedListener = IgnoreFirstSpinnerListener { position ->
|
||||||
activity.presenter.setMangaViewer(position)
|
activity.presenter.setMangaViewer(position)
|
||||||
|
|
||||||
|
val mangaViewer = activity.presenter.getMangaViewer()
|
||||||
|
if (mangaViewer == ReaderActivity.WEBTOON || mangaViewer == ReaderActivity.VERTICAL_PLUS) {
|
||||||
|
initWebtoonPreferences()
|
||||||
|
} else {
|
||||||
|
initPagerPreferences()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
viewer.setSelection(activity.presenter.manga?.viewer ?: 0, false)
|
viewer.setSelection(activity.presenter.manga?.viewer ?: 0, false)
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package eu.kanade.tachiyomi.ui.reader.viewer.webtoon
|
package eu.kanade.tachiyomi.ui.reader.viewer.webtoon
|
||||||
|
|
||||||
|
import android.graphics.Color
|
||||||
import android.graphics.Typeface
|
import android.graphics.Typeface
|
||||||
import android.text.SpannableStringBuilder
|
import android.text.SpannableStringBuilder
|
||||||
import android.text.Spanned
|
import android.text.Spanned
|
||||||
@ -38,6 +39,7 @@ class WebtoonTransitionHolder(
|
|||||||
*/
|
*/
|
||||||
private var textView = TextView(context).apply {
|
private var textView = TextView(context).apply {
|
||||||
textSize = 17.5F
|
textSize = 17.5F
|
||||||
|
setTextColor(Color.WHITE)
|
||||||
wrapContent()
|
wrapContent()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package eu.kanade.tachiyomi.ui.reader.viewer.webtoon
|
package eu.kanade.tachiyomi.ui.reader.viewer.webtoon
|
||||||
|
|
||||||
|
import android.graphics.Color
|
||||||
import android.view.KeyEvent
|
import android.view.KeyEvent
|
||||||
import android.view.MotionEvent
|
import android.view.MotionEvent
|
||||||
import android.view.View
|
import android.view.View
|
||||||
@ -64,6 +65,7 @@ class WebtoonViewer(val activity: ReaderActivity, val isContinuous: Boolean = tr
|
|||||||
val subscriptions = CompositeSubscription()
|
val subscriptions = CompositeSubscription()
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
recycler.setBackgroundColor(Color.BLACK)
|
||||||
recycler.visibility = View.GONE // Don't let the recycler layout yet
|
recycler.visibility = View.GONE // Don't let the recycler layout yet
|
||||||
recycler.layoutParams = ViewGroup.LayoutParams(MATCH_PARENT, MATCH_PARENT)
|
recycler.layoutParams = ViewGroup.LayoutParams(MATCH_PARENT, MATCH_PARENT)
|
||||||
recycler.itemAnimator = null
|
recycler.itemAnimator = null
|
||||||
|
@ -81,6 +81,7 @@
|
|||||||
app:layout_constraintTop_toBottomOf="@id/viewer" />
|
app:layout_constraintTop_toBottomOf="@id/viewer" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/background_color_label"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/background_color"
|
android:text="@string/background_color"
|
||||||
@ -272,7 +273,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:constraint_referenced_ids="pager_prefs,scale_type,scale_type_text,
|
app:constraint_referenced_ids="pager_prefs,scale_type,scale_type_text,
|
||||||
zoom_start_text,zoom_start,crop_borders,page_transitions"
|
zoom_start_text,zoom_start,crop_borders,page_transitions,background_color,background_color_label"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Group
|
<androidx.constraintlayout.widget.Group
|
||||||
|
Loading…
Reference in New Issue
Block a user