diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerTransitionHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerTransitionHolder.kt
index 716d99872c..ce33d09f07 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerTransitionHolder.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerTransitionHolder.kt
@@ -1,7 +1,11 @@
package eu.kanade.tachiyomi.ui.reader.viewer.pager
import android.annotation.SuppressLint
+import android.graphics.Typeface
import android.support.v7.widget.AppCompatTextView
+import android.text.SpannableStringBuilder
+import android.text.Spanned
+import android.text.style.StyleSpan
import android.view.Gravity
import android.view.View
import android.view.ViewGroup
@@ -85,8 +89,15 @@ class PagerTransitionHolder(
val nextChapter = transition.to
textView.text = if (nextChapter != null) {
- context.getString(R.string.transition_finished, transition.from.chapter.name) + "\n\n" +
- context.getString(R.string.transition_next, nextChapter.chapter.name) + "\n\n"
+ SpannableStringBuilder().apply {
+ append(context.getString(R.string.transition_finished))
+ setSpan(StyleSpan(Typeface.BOLD), 0, length, Spanned.SPAN_INCLUSIVE_EXCLUSIVE)
+ append("\n${transition.from.chapter.name}\n\n")
+ val currSize = length
+ append(context.getString(R.string.transition_next))
+ setSpan(StyleSpan(Typeface.BOLD), currSize, length, Spanned.SPAN_INCLUSIVE_EXCLUSIVE)
+ append("\n${nextChapter.chapter.name}\n\n")
+ }
} else {
context.getString(R.string.transition_no_next)
}
@@ -103,8 +114,15 @@ class PagerTransitionHolder(
val prevChapter = transition.to
textView.text = if (prevChapter != null) {
- context.getString(R.string.transition_current, transition.from.chapter.name) + "\n\n" +
- context.getString(R.string.transition_previous, prevChapter.chapter.name) + "\n\n"
+ SpannableStringBuilder().apply {
+ append(context.getString(R.string.transition_current))
+ setSpan(StyleSpan(Typeface.BOLD), 0, length, Spanned.SPAN_INCLUSIVE_EXCLUSIVE)
+ append("\n${transition.from.chapter.name}\n\n")
+ val currSize = length
+ append(context.getString(R.string.transition_previous))
+ setSpan(StyleSpan(Typeface.BOLD), currSize, length, Spanned.SPAN_INCLUSIVE_EXCLUSIVE)
+ append("\n${prevChapter.chapter.name}\n\n")
+ }
} else {
context.getString(R.string.transition_no_previous)
}
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonTransitionHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonTransitionHolder.kt
index 6bbed60089..4a1812c2c9 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonTransitionHolder.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/webtoon/WebtoonTransitionHolder.kt
@@ -1,7 +1,11 @@
package eu.kanade.tachiyomi.ui.reader.viewer.webtoon
+import android.graphics.Typeface
import android.support.v7.widget.AppCompatButton
import android.support.v7.widget.AppCompatTextView
+import android.text.SpannableStringBuilder
+import android.text.Spanned
+import android.text.style.StyleSpan
import android.view.Gravity
import android.view.ViewGroup.LayoutParams.MATCH_PARENT
import android.view.ViewGroup.LayoutParams.WRAP_CONTENT
@@ -85,8 +89,15 @@ class WebtoonTransitionHolder(
val nextChapter = transition.to
textView.text = if (nextChapter != null) {
- context.getString(R.string.transition_finished, transition.from.chapter.name) + "\n\n" +
- context.getString(R.string.transition_next, nextChapter.chapter.name)
+ SpannableStringBuilder().apply {
+ append(context.getString(R.string.transition_finished))
+ setSpan(StyleSpan(Typeface.BOLD), 0, length, Spanned.SPAN_INCLUSIVE_EXCLUSIVE)
+ append("\n${transition.from.chapter.name}\n\n")
+ val currSize = length
+ append(context.getString(R.string.transition_next))
+ setSpan(StyleSpan(Typeface.BOLD), currSize, length, Spanned.SPAN_INCLUSIVE_EXCLUSIVE)
+ append("\n${nextChapter.chapter.name}\n\n")
+ }
} else {
context.getString(R.string.transition_no_next)
}
@@ -103,8 +114,15 @@ class WebtoonTransitionHolder(
val prevChapter = transition.to
textView.text = if (prevChapter != null) {
- context.getString(R.string.transition_current, transition.from.chapter.name) + "\n\n" +
- context.getString(R.string.transition_previous, prevChapter.chapter.name)
+ SpannableStringBuilder().apply {
+ append(context.getString(R.string.transition_current))
+ setSpan(StyleSpan(Typeface.BOLD), 0, length, Spanned.SPAN_INCLUSIVE_EXCLUSIVE)
+ append("\n${transition.from.chapter.name}\n\n")
+ val currSize = length
+ append(context.getString(R.string.transition_previous))
+ setSpan(StyleSpan(Typeface.BOLD), currSize, length, Spanned.SPAN_INCLUSIVE_EXCLUSIVE)
+ append("\n${prevChapter.chapter.name}\n\n")
+ }
} else {
context.getString(R.string.transition_no_previous)
}
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index ddd00452a3..2ae703eaf2 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -420,14 +420,14 @@
Chapter %1$s
Next chapter not found
Previous chapter not found
- Image could not be loaded.\nTry changing the image decoder or with one of the options below
+ The image could not be decoded
Update last chapter read in enabled services to %1$d?
Do you want to set this image as the cover?
Viewer for this series
- Finished: %1$s
- Current: %1$s
- Next: %1$s
- Previous: %1$s
+ Finished:
+ Current:
+ Next:
+ Previous:
There\'s no next chapter
There\'s no previous chapter
Loading pages…