List of usage examples for android.text Layout getDesiredWidth
public static float getDesiredWidth(CharSequence source, int start, int end, TextPaint paint)
From source file:Main.java
public static int getTextLen(TextView textView) { TextPaint paint = textView.getPaint(); return (int) Layout.getDesiredWidth(textView.getText().toString(), 0, textView.getText().length(), paint); }