用的时候随便搜搜都乱七八糟的那么复杂
String temperatureStr = null;
if (weather != null) {
temperatureStr = weather.showapi_res_body.now.temperature + "℃";
Spannable sp = new SpannableString(temperatureStr);
sp.setSpan(new AbsoluteSizeSpan(15, true), temperatureStr.length() - 1, temperatureStr.length(),
Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
weather_temperature_tv.setText(sp);
网友评论