Rob
Rob

Reputation: 15

LinearLayout new line instead of concatenate

I find this a stupid question to ask but I seem to be unable to find the answer online. I want to add 2 TextViews to a LinearLayout and want them to show the result below eachother, not concatenate.

ll.addView(textview);
ll.addView(textViewReply);

shows:

HelloHello to you too!

while I want it to be:

Hello
Hello to you too!

I thought that a linear layout could only store one object per line. Can someone explain this? :-)

Upvotes: 0

Views: 156

Answers (1)

clavio
clavio

Reputation: 1052

Try ll.setOrientation(LinearLayout.VERTICAL) before adding textview

Upvotes: 1

Related Questions