Commit 2f50b157 authored by wanglei's avatar wanglei

...

parent 6cecd80c
...@@ -495,8 +495,8 @@ object DialogViews { ...@@ -495,8 +495,8 @@ object DialogViews {
val text = "RAM accounts for more than $percent%.\nAre you sure want to leave?" val text = "RAM accounts for more than $percent%.\nAre you sure want to leave?"
val spannableString = SpannableString(text) val spannableString = SpannableString(text)
val start = text.indexOf("$percent") val start = text.indexOf("$percent%")
val end = start + "$percent".length val end = start + "$percent%".length
spannableString.setSpan(ForegroundColorSpan(Color.RED), start, end, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); spannableString.setSpan(ForegroundColorSpan(Color.RED), start, end, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
binding.tvTip.text = spannableString binding.tvTip.text = spannableString
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment