sanaya
sanaya

Reputation: 3

Android textview that contain lot of text

Hy! I am working on Android app for Cars where I want to show news of car. So I have 50 lines of text, I want to put all that text in one activity so u can scroll and read that text. Should I use TextView or something else? Should I save that whole text in res/strings.xml ?

Upvotes: 0

Views: 183

Answers (3)

NyanMe
NyanMe

Reputation: 43

You can use TextView. However, i recommend use the following part in the .xml part:

<TextView
    android:text="@string/nameofthetext"
/>

nameofthetext should be save in the strings.xml file (You'll find in the values folder)

Upvotes: 0

Aswin P J
Aswin P J

Reputation: 561

You can use the TextView itself. To make it scrollable see this Stackoverflow answer. It is recommended to store strings in strings.xml

Upvotes: 1

Doug Stevenson
Doug Stevenson

Reputation: 317467

If you need scrolling content, the easiest thing to do is place the view to be scrolled in a ScrollView. This works for any type of view that does not scroll itself, including TextView.

Upvotes: 0

Related Questions