There's TextView.append(), but that adds the text to the end of the TextView. I want what I append to go in the beginning (ie, show up on the top of the TextView box).
Add Line Breaks to a TextView Just add a \n to your text. This can be done directly in your layout file, or in a string resource and will cleanly break the text in your TextView to the next line.
append. Appends the specified character sequence to this Appendable . Depending on which class implements the character sequence csq , the entire sequence may not be appended. For instance, if csq is a CharBuffer then the subsequence to append is defined by the buffer's position and limit.
Have you tried this
textview.setText(" append string" + textView.getText());
Though the spannables will get lost by this method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With