1 /** 2 * 获取格式化的收益率 3 * 4 * @return 5 */ 6 public Spannable getFormattedGainsRate(String gainsRate) { 7 Spannable wordToSpan = new SpannableString(gainsRate); 8 wordToSpan.setSpan(new AbsoluteSizeSpan(18, true), 0, 2, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); 9 wordToSpan.setSpan(new AbsoluteSizeSpan(15, true), 2, gainsRate.length(), Spannable 10 .SPAN_EXCLUSIVE_EXCLUSIVE); 11 return wordToSpan; 12 }
时间: 2024-10-27 05:04:13