This commit is contained in:
lixiaopeng
2020-08-13 16:29:48 +08:00
parent f5ac8eb6c6
commit 87b923ec02
6 changed files with 8 additions and 9 deletions

View File

@@ -181,7 +181,7 @@ public class V2XSurroundingFragment extends MvpFragment<SurroundingEventView, Su
SpannableString spannableString = new SpannableString(originStr);
spannableString.setSpan(new ForegroundColorSpan(Color.parseColor("#256BFF")), 7, originStr.length() - 5, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
//设置字体大小true表示前面的字体大小20单位为dip
spannableString.setSpan(new AbsoluteSizeSpan(40, true), 7, originStr.length() - 5, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
spannableString.setSpan(new AbsoluteSizeSpan(36, true), 7, originStr.length() - 5, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
spannableString.setSpan(new StyleSpan(android.graphics.Typeface.BOLD), 7, originStr.length() - 5, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
mTotalTv.setText(spannableString);
} else {