title: Android: TextView automatically truncate and replace last 3 char of String
body: <p>If a <code>String</code> is longer than the <code>TextView</code>'s width it automatically wraps onto the next line. I can avoid this by using <code>android:singleLine</code> (deprecated) or by setting <code>android:inputType="text"</code>. What I need now is something that replaces the last 3 characters of my <code>String</code> with "<strong>...</strong>". Since I'm not using a monospace font this will always be different depending on the letters used in my <code>String</code>. So I'm wondering what's the best way to get the last 3 characters of a String in a <code>TextView</code> and replace them. Maybe there's already something implemented in the Android framework, since this must be a common problem.</p>