Search code examples
androidlayouttextview

How do I prepend a String to an Android TextView?


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).


Solution

  • Have you tried this

     textview.setText(" append string" + textView.getText());
    

    Though the spannables will get lost by this method.