Code example for TextPaint

Methods: setColor, setTypeface, setUnderlineText

0
                }); 
            } 
        } 
         
        @Override public void updateDrawState(TextPaint paint){
            paint.setColor(0xFFB100C4);  //TODO:  Find a better way to set these values.
            paint.setUnderlineText(false);
            paint.setTypeface(Typeface.create((String)null,Typeface.BOLD));  //Have to add that cast to avoid ambiguity.
        } 
    } 
     
    /** 
     * @see roge.taekim.content.span.Span#parseSpan(CharSequence, int, int, SpanAttributes) 
     */ 
    @Override public CharSequence parseSpan(CharSequence string,int span_start,int span_end,SpanAttributes attributes){
        if(!attributes.hasAttribute("type")){
            Log.e("JP","The "+this.getTag()+" tag MUST have the \"type\" attribute set.");
             
            return string;
        }else{ 
            if(!(attributes.getAttribute("type").equals("file")||attributes.getAttribute("type").equals("resource"))){