Android examples for android.net:Uri
get Text Length during layout
import android.text.Layout; import android.text.TextPaint; import android.widget.TextView; public class Main { public static int getTextLen(TextView textView) { TextPaint paint = textView.getPaint(); return (int) Layout.getDesiredWidth(textView.getText().toString(), 0, textView.getText().length(), paint); }// w w w. java 2 s . co m }