Android examples for java.lang:String Shorten
cut String to length and show ...
public class Main{ public static String cutString(String value, int length) { if (value == null || value.length() <= 0) { value = "..."; } else if (value.length() <= length) { ;//w w w . j av a2 s. c om } else { value = value.substring(0, length) + "..."; } return value; } }