Reputation: 87
I have textView with 10 lines. TextView width is choosen in the way that next notification goes to next line. Problem is that I need that newest notification will be on highest position. So theoretically text should be added from left. For example if first notification is "up" and second (newest) is "down" then I wan't them listed in the way:
down
up
...
Is there easy way to do that? Thanks!
Upvotes: 1
Views: 52
Reputation: 157
If you want to show text on next line use end of line character '\n' use
textView.setText(newMessage+"\n"+textView.getText());
Upvotes: 3
Reputation: 3103
You can use Html.fromHtml()
for example
textView.setText(Html.fromHtml(text1 + "<br>" + text2));
Upvotes: 2