Code example for StyleSpan

0
 
    static private Drawable sDefaultContactImage;
 
    // For posting UI update Runnables from other threads: 
    private Handler mHandler = new Handler();
 
    private Conversation mConversation;
 
    public static final StyleSpan STYLE_BOLD = new StyleSpan(Typeface.BOLD);
 
    public ConversationListItem(Context context) {
        super(context);
    } 
 
    public ConversationListItem(Context context, AttributeSet attrs) {
        super(context, attrs);
 
        if (sDefaultContactImage == null) {
            sDefaultContactImage = context.getResources().getDrawable(R.drawable.ic_contact_picture);
        } 
    }