When I set a textView's string manually like below it works.
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="line 1 \n line 2"/>
However, when I try to show a String on this textView it doesn't go to a new line.
String sample = "line 1 \n line 2";
textView1.setText(sample);
Note: Actually I am getting the String from a SQLite database. But that shouldn't make a difference right? Beacause it's still a String!
sample = cursor.getString(DBAdapter.COL_sample);
textView1.setText(sample);
So, now my TextView shows "\n" or "\r\n" character instead of a line break.