Package com.cheetahdigital.uikit.widget
Class TypeFaceSpan
- java.lang.Object
-
- android.text.style.CharacterStyle
-
- android.text.style.MetricAffectingSpan
-
- com.cheetahdigital.uikit.widget.TypeFaceSpan
-
- All Implemented Interfaces:
android.text.style.UpdateAppearance
,android.text.style.UpdateLayout
public class TypeFaceSpan extends android.text.style.MetricAffectingSpan
Style aSpannable
with a customTypeface
. https://gist.github.com/twaddington/b91341ea5615698b53b8
-
-
Constructor Summary
Constructors Constructor Description TypeFaceSpan(android.content.Context context, java.lang.String typefaceName)
Load theTypeface
and apply to aSpannable
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
updateDrawState(android.text.TextPaint tp)
Update the Draw Statesvoid
updateMeasureState(android.text.TextPaint p)
Updated the Measure State
-
-
-
Method Detail
-
updateMeasureState
public void updateMeasureState(android.text.TextPaint p)
Updated the Measure State- Specified by:
updateMeasureState
in classandroid.text.style.MetricAffectingSpan
- Parameters:
p
-TextPaint
to be modified
-
updateDrawState
public void updateDrawState(android.text.TextPaint tp)
Update the Draw States- Specified by:
updateDrawState
in classandroid.text.style.CharacterStyle
- Parameters:
tp
-TextPaint
to be modified
-
-