Search in sources :

Example 41 with StyleSpan

use of android.text.style.StyleSpan in project android_frameworks_base by ResurrectionRemix.

the class NotificationTests method BOLD.

static SpannableStringBuilder BOLD(CharSequence str) {
    final SpannableStringBuilder ssb = new SpannableStringBuilder(str);
    ssb.setSpan(new StyleSpan(Typeface.BOLD), 0, ssb.length(), 0);
    return ssb;
}
Also used : StyleSpan(android.text.style.StyleSpan) SpannableStringBuilder(android.text.SpannableStringBuilder)

Example 42 with StyleSpan

use of android.text.style.StyleSpan in project ETSMobile-Android2 by ApplETS.

the class CourseTodayDecorator method decorate.

@Override
public void decorate(DayViewFacade view) {
    view.setBackgroundDrawable(ContextCompat.getDrawable(context, R.drawable.calendar_course_today_circle));
    view.addSpan(new StyleSpan(Typeface.BOLD));
}
Also used : StyleSpan(android.text.style.StyleSpan)

Example 43 with StyleSpan

use of android.text.style.StyleSpan in project ETSMobile-Android2 by ApplETS.

the class EventDecorator method decorate.

@Override
public void decorate(DayViewFacade view) {
    view.addSpan(new StyleSpan(Typeface.BOLD));
    view.addSpan(new TriangleSpan(color));
}
Also used : StyleSpan(android.text.style.StyleSpan)

Example 44 with StyleSpan

use of android.text.style.StyleSpan in project ETSMobile-Android2 by ApplETS.

the class FinalExamDecorator method decorate.

@Override
public void decorate(DayViewFacade view) {
    view.setBackgroundDrawable(ContextCompat.getDrawable(context, R.drawable.calendar_exam_circle));
    view.addSpan(new StyleSpan(Typeface.BOLD));
}
Also used : StyleSpan(android.text.style.StyleSpan)

Example 45 with StyleSpan

use of android.text.style.StyleSpan in project ETSMobile-Android2 by ApplETS.

the class TodayDecorator method decorate.

@Override
public void decorate(DayViewFacade view) {
    view.setBackgroundDrawable(ContextCompat.getDrawable(context, R.drawable.calendar_today_circle));
    view.addSpan(new StyleSpan(Typeface.BOLD));
}
Also used : StyleSpan(android.text.style.StyleSpan)

Aggregations

StyleSpan (android.text.style.StyleSpan)145 SpannableString (android.text.SpannableString)56 SpannableStringBuilder (android.text.SpannableStringBuilder)36 RelativeSizeSpan (android.text.style.RelativeSizeSpan)32 ForegroundColorSpan (android.text.style.ForegroundColorSpan)25 View (android.view.View)18 TextView (android.widget.TextView)17 UnderlineSpan (android.text.style.UnderlineSpan)16 Spannable (android.text.Spannable)14 StrikethroughSpan (android.text.style.StrikethroughSpan)13 TypefaceSpan (android.text.style.TypefaceSpan)12 TypedArray (android.content.res.TypedArray)10 TextPaint (android.text.TextPaint)10 SubscriptSpan (android.text.style.SubscriptSpan)10 SuperscriptSpan (android.text.style.SuperscriptSpan)10 Handler (android.os.Handler)9 Message (android.os.Message)9 URLSpan (android.text.style.URLSpan)8 JustifiedSpan (com.bluejamesbond.text.style.JustifiedSpan)8 ArticleBuilder (com.bluejamesbond.text.util.ArticleBuilder)8