0

I am creating an app in android and I am parsing text. After I parse the text, the text appears fine. However, I don't want all of the text to appear (i.e. all lines to appear together).

Example - Text that appears in app: A Turing machine is a device that manipulates symbols on a strip of tape according to a table of rules.

What I want to show: A Turing machine is a device that manipulates [more...].

So when the user taps on the [more...], the rest of the text will appear in a new window.

How do I incorporate the "[more...]" part?

Thanks =)

iSquared
  • 1
  • 1

2 Answers2

1

declare in your text view properties in the layout file

android:ellipsize="true"

that should do it.

Anurag Ramdasan
  • 4,189
  • 4
  • 31
  • 53
0

use android:singleLine = "true" and

fix the width of your textview like android:layout_width = "150dp", then append [more...] at the end of text and make it as link, which should be clickable

Refer to this, to do what you want...

Community
  • 1
  • 1
Arif Nadeem
  • 8,524
  • 7
  • 47
  • 78