|
@@ -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)
|
|
|
}
|