List of usage examples for android.text TextPaint getFlags
public int getFlags()
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/*www. j ava 2 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);//w w w . j av a2 s. 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);/* ww w . java2 s . com*/ // 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 www . j a va 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.adrianlesniak.gamerspot.extra.CustomTypefaceSpan.java
public void updateMeasureState1(TextPaint p) { p.setTypeface(mTypeface);//from w ww . j a va2s . 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);/*from w w w . 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:com.adrianlesniak.gamerspot.extra.CustomTypefaceSpan.java
public void updateDrawState(TextPaint tp) { tp.setTypeface(mTypeface);//from www .jav a2 s.co 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);/*from w w w. j a v a 2 s .co m*/ p.setTextSize(mTextSize); p.setColor(mColor); // Note: This flag is required for proper typeface rendering p.setFlags(p.getFlags() | Paint.SUBPIXEL_TEXT_FLAG); }