FontMetricsInt fontMetrics = deletePaint.getFontMetricsInt();
        
        int baseline = rect.top + (rect.height() - (fontMetrics.bottom - fontMetrics.top))/2 - fontMetrics.top;
        
        deletePaint.setTextAlign(Paint.Align.CENTER);
        
        canvas.drawText(deleteText, rect.centerX(), baseline, deletePaint);
        

 

posted on 2015-09-16 00:06  猿类的进化史  阅读(1177)  评论(0编辑  收藏  举报