Code example for RelativeSizeSpan

0
    public static SpannableString format(String title, int color, float size){
 
        SpannableString ok = new SpannableString(title);
        ok.setSpan(new ForegroundColorSpan(color),0,title.length(),0);
        /* Changes the size of the text in proportion to its original size */ 
        ok.setSpan(new RelativeSizeSpan(size),0,title.length(),0);
        return ok;
 
    } 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE