feat: 优化

pull/209/head
kunfei 5 years ago
parent 455418ecaa
commit 86f6be1488
  1. 5
      app/src/main/java/io/legado/app/ui/about/AboutActivity.kt

@ -26,9 +26,10 @@ class AboutActivity : BaseActivity(R.layout.activity_about) {
tv_app_summary.post { tv_app_summary.post {
val span = ForegroundColorSpan(accentColor) val span = ForegroundColorSpan(accentColor)
val spannableString = SpannableString(tv_app_summary.text) val spannableString = SpannableString(tv_app_summary.text)
val start = spannableString.indexOf(getString(R.string.legado_gzh)) val gzh = getString(R.string.legado_gzh)
val start = spannableString.indexOf(gzh)
spannableString.setSpan( spannableString.setSpan(
span, start, start + 6, span, start, start + gzh.length,
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE Spannable.SPAN_EXCLUSIVE_EXCLUSIVE
) )
tv_app_summary.text = spannableString tv_app_summary.text = spannableString

Loading…
Cancel
Save