It is simple to do this:
int start = textView.getLayout().getLineStart(0);
int end = textView.getLayout().getLineEnd(textView.getLineCount() - 1);
String displayed = textView.getText().toString().substring(start, end);
More Related Contents:
- Create Passcode view in Android
- How to make links in a TextView clickable
- How to set the part of the text view is clickable
- Set color of TextView span in Android
- Auto-fit TextView for Android
- Put constant text inside EditText which should be non-editable – Android
- how to make a specific text on TextView BOLD
- Android selector & text color
- Android: Coloring part of a string using TextView.setText()?
- Different font size of strings in the same TextView
- Remove underline from links in TextView – Android
- Is it possible to write vertically in a textview in android?
- How to set emoji by unicode in a textview?
- How do I use a compound drawable instead of a LinearLayout that contains an ImageView and a TextView
- Android intercept paste\copy\cut on editText
- Custom cut/copy action bar for EditText that shows text selection handles
- Disabling Android O auto-fill service for an application
- auto-scrolling TextView in android to bring text into view
- Convert pixels to sp
- Android SpannableString set background behind part of text
- Change clickable TextView’s color on focus and click?
- How to add bulleted list to android application?
- textview.getLineCount always 0 in android
- Integer value in TextView
- Calculate text size according to width of text area
- Android how to identify item in listview with checkbox
- Android Api 23 Change Navigation View headerLayout textview
- Apply two different font styles to a TextView
- How to make the textview blinking
- How to use Font Awesome icon in android application?