List of usage examples for android.text TextPaint setFlags
public void setFlags(int flags)
From source file:io.vit.vitio.Extras.TypeFaceSpan.java
@Override public void updateMeasureState(TextPaint p) { p.setTypeface(mTypeface); p.setFlags(p.getFlags() | Paint.SUBPIXEL_TEXT_FLAG); }
From source file:io.vit.vitio.Extras.TypeFaceSpan.java
@Override public void updateDrawState(TextPaint tp) { tp.setTypeface(mTypeface); tp.setFlags(tp.getFlags() | Paint.SUBPIXEL_TEXT_FLAG); }
From source file:com.gm.goldencity.util.Utils.java
/** * Apply typeface to a plane text and return spannableString * * @param text Text that you want to apply typeface * @param typeface Typeface that you want to apply to your text * @return spannableString//from www. j a va2 s. c o m */ public static SpannableString applyTypefaceToString(String text, final Typeface typeface) { SpannableString spannableString = new SpannableString(text); spannableString.setSpan(new MetricAffectingSpan() { @Override public void updateMeasureState(TextPaint p) { p.setTypeface(typeface); // Note: This flag is required for proper typeface rendering p.setFlags(p.getFlags() | Paint.SUBPIXEL_TEXT_FLAG); } @Override public void updateDrawState(TextPaint tp) { tp.setTypeface(typeface); // Note: This flag is required for proper typeface rendering tp.setFlags(tp.getFlags() | Paint.SUBPIXEL_TEXT_FLAG); } }, 0, spannableString.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); return spannableString; }
From source file:com.aniruddhc.acemusic.player.Utils.TypefaceSpan.java
@Override public void updateDrawState(TextPaint tp) { tp.setTypeface(mTypeface);//from w ww.ja va2s . c om // Note: This flag is required for proper typeface rendering tp.setFlags(tp.getFlags() | Paint.SUBPIXEL_TEXT_FLAG); }
From source file:com.beemindz.photogalley.util.TypefaceSpan.java
@Override public void updateMeasureState(TextPaint p) { p.setTypeface(mTypeface);/* w w w . ja v a 2 s.c o m*/ // Note: This flag is required for proper typeface rendering p.setFlags(p.getFlags() | Paint.SUBPIXEL_TEXT_FLAG); }
From source file:com.alcoapps.actionbarextras.TypefaceSpan.java
@Override public void updateMeasureState(TextPaint p) { p.setTypeface(mTypeface);//from ww w .j a v a2 s . c o m // Note: This flag is required for proper typeface rendering p.setFlags(p.getFlags() | Paint.SUBPIXEL_TEXT_FLAG); }
From source file:com.adrianlesniak.gamerspot.extra.CustomTypefaceSpan.java
public void updateMeasureState1(TextPaint p) { p.setTypeface(mTypeface);/*from w ww. ja v a 2 s . c om*/ // Note: This flag is required for proper typeface rendering p.setFlags(p.getFlags() | Paint.SUBPIXEL_TEXT_FLAG); }
From source file:com.alcoapps.actionbarextras.TypefaceSpan.java
@Override public void updateDrawState(TextPaint tp) { tp.setTypeface(mTypeface);/* w w w. j a va 2s. c o m*/ // Note: This flag is required for proper typeface rendering tp.setFlags(tp.getFlags() | Paint.SUBPIXEL_TEXT_FLAG); }
From source file:com.adrianlesniak.gamerspot.extra.CustomTypefaceSpan.java
public void updateDrawState(TextPaint tp) { tp.setTypeface(mTypeface);//from w ww .j av a2 s .c o m // Note: This flag is required for proper typeface rendering tp.setFlags(tp.getFlags() | Paint.SUBPIXEL_TEXT_FLAG); }
From source file:se.attentec.attenhome.TypefaceSpan.java
@Override public void updateMeasureState(TextPaint p) { p.setTypeface(mTypeface);// w w w .j a va 2 s. c om p.setTextSize(mTextSize); p.setColor(mColor); // Note: This flag is required for proper typeface rendering p.setFlags(p.getFlags() | Paint.SUBPIXEL_TEXT_FLAG); }