mardi 8 décembre 2015

Set data from SQLite db into textView on multiple lines

I have a SQLite database, in which i add the following columns (name, description, price) respectively.

 db.addRestaurant(new Restaurant("Greek Salad", "tomatoes, sliced cucumbers, 
onion, feta cheese, olives, olive oil", "20"));

It am setting these data in textViews in a listView. My problem is that the description doesn't fit into one line; so the rest of the description (food ingredients) doesn't show.

I want to know how can it set the TextView to multiple lines ?!

I tried to add a \n in the description, but .setText() couldn't parse it automatically.

Aucun commentaire:

Enregistrer un commentaire