修改f/m 导航 周边事件 目的车友UI

This commit is contained in:
zhuangyan
2020-11-19 17:13:09 +08:00
parent 3019fcd7e4
commit 6a65e87be0
35 changed files with 123 additions and 56 deletions

View File

@@ -209,11 +209,13 @@ public class V2XSurroundingFragment extends MvpFragment<SurroundingEventView, Su
//总条数
String originStr = String.format(getContext().getResources().getString(R.string.v2x_surrounding_top_brief), exploreWayList.size());
SpannableString spannableString = new SpannableString(originStr);
spannableString.setSpan(new ForegroundColorSpan(Color.parseColor("#459DFF")), 7, originStr.length() - 5, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
spannableString.setSpan(new ForegroundColorSpan(Color.parseColor("#459DFF")),
7, originStr.length() - 5, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
//设置字体大小true表示前面的字体大小 dip
spannableString.setSpan(new AbsoluteSizeSpan((int) getContext().getResources().getDimension(R.dimen.module_v2x_surrounding_top), true),
7, originStr.length() - 5, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
spannableString.setSpan(new StyleSpan(Typeface.NORMAL), 7, originStr.length() - 5, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
spannableString.setSpan(new StyleSpan(Typeface.BOLD), 7,
originStr.length() - 5, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
mTotalTv.setText(spannableString);
} else {
mTopLayout.setVisibility(View.GONE);