Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.graphics.Paint;
import android.graphics.Rect;

public class Main {
    public static float getTextHeight(Paint paint) {
        Rect rectSizeText = new Rect();
        paint.getTextBounds("s", 0, "s".length(), rectSizeText);

        return paint.measureText("s");

    }
}