Code example for DynamicLayout

Methods: draw

0
    public void draw(Canvas canvas) {
        if (mTextPath == null) {
            //Allow the layout to draw the text 
            canvas.translate(5f, 5f); // dejamos un pequenio margen
            //Log.i("tttt","canvas size" + canvas.getWidth()); 
            mTextLayout.draw(canvas);
        } else { 
            //Draw directly on the canvas using the supplied path 
            canvas.drawTextOnPath(mText.toString(), mTextPath, 0, 0, mTextPaint);
        } 
    } 
 
    @Override 
    public void setAlpha(int alpha) {
        if (mTextPaint.getAlpha() != alpha) {
            mTextPaint.setAlpha(alpha);
        } 
    } 
 
    @Override 
    public int getOpacity() {