Extract the layout ( android.text.Layout ) from the TextView by calling mTextView.getLayout (); There you can, for example, use the getLineStart or getLineEnd methods to get the text offset. What combined with getText and used using regular String operations should be enough for u!
source share