How to add a line break and space in TextView?
<p>I am setting following string as a input for my txtMessage :</p>

<pre><code>protected void onCreate(Bundle savedInstanceState) 
{
    super.onCreate(savedInstanceState);
    setContentView(R.layout.breaknotification);

    TextView txtMessage = (TextView)findViewById(R.id.txtMessage);
    String msg = "TIME   RECORD        VALUE\n" +
                 "10 AM    1            20\n"+
                 "11 AM    2            30\n"+
                 "12 PM    3            40";

    txtMessage.setText(msg);

}
</code></pre>

<p>my breaknotification.xml file is as per following:</p>

<pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" &gt;

&lt;TextView
    android:id="@+id/txtMessage"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginLeft="5dp"
    android:text=""
    android:textColor="#FFFFFF"
    android:textSize="21sp"
    android:textStyle="bold" /&gt;

&lt;/LinearLayout&gt;
</code></pre>

<p>and I want to print my string as per following format.</p>

<pre><code>TIME   RECORD     VALUE
10 AM     1        20
11 AM     2        30
12 PM     3        40
</code></pre>

<p>But it is not showing me exactly what I want; it shows me following in my message,</p>

<pre><code>TIME     RECORD      VALUE
`10 AM    1       20`
`11 AM    2       30`
`12 PM    3       40`
</code></pre>

<p>So how can I achieve it?</p>
