Android examples for android.text:SpannableString
set Absolute Size Span for SpannableString
import android.text.SpannableString; import android.text.style.AbsoluteSizeSpan; public class Main{ public static SpannableString setAbsoluteSizeSpan(String string, int textSize, int start, int end, int flags) { SpannableString spannableString = new SpannableString(string); AbsoluteSizeSpan span = new AbsoluteSizeSpan(textSize, true); spannableString.setSpan(span, start, end, flags); return spannableString; }//from w w w. jav a 2 s. com }