title: android - TextViews with line break
body: <p>I have TextViews and I want have their in rows as with line break. TextViews are objects with some functions. Their are words in array separated by comas. I want show its in a sequence with line break.</p>
  
  <p><strong>This is my code:</strong></p>
  
  <pre><code>int i;
  String p = "one, two, three, four, five, six, seven, eight, ten";
  String[] array = p.split(",");
  
  LinearLayout groupLL = new LinearLayout(this);
  LinearLayout.LayoutParams gLLP = new LinearLayout.LayoutParams(
      new ViewGroup.MarginLayoutParams(
      LinearLayout.LayoutParams.WRAP_CONTENT,
      LinearLayout.LayoutParams.WRAP_CONTENT));
  
  LinearLayout.LayoutParams mlp = new LinearLayout.LayoutParams(
      new ViewGroup.MarginLayoutParams(
      LinearLayout.LayoutParams.FILL_PARENT,
      LinearLayout.LayoutParams.WRAP_CONTENT));
  mlp.setMargins(0, 0, 10, 0);
  
  for (i = 0; i &lt; array.length; i++) {
      TextView newTextView = new TextView(this);
      newTextView.setText(array[i]);
      newTextView.setBackgroundColor(Color.RED);
      newTextView.setSingleLine(true);
      newTextView.setTextSize(20);
  
      groupLL.addView(newTextView, mlp);
  }
  
  ll.addView(groupLL, gLLP);
  </code></pre>
  
  <p><strong>This is my layout:</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
          android:id="@+id/ScrollView02"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent" &gt;
  
      &lt;RelativeLayout
      android:id="@+id/RelativeLayout02"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent" &gt;
  
      &lt;LinearLayout android:id="@+id/LinearLayout2"
                xmlns:android="http://schemas.android.com/apk/res/android"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="vertical" &gt;
      &lt;/LinearLayout&gt;
  
      &lt;/RelativeLayout&gt;
  
  &lt;/ScrollView&gt;
  </code></pre>
  
  <p><strong>I have this:</strong></p>
  
  <pre><code>|one two three four five s|
  |                         |
  |                         |
  </code></pre>
  
  <p><strong>I want this:</strong></p>
  
  <pre><code>|one two three four five  |
  |six seven eight ten      |
  |                         |
  </code></pre>
  
  <hr>
  
  <p><strong>EDIT:</strong></p>
  
  <p>If I change
  newTextView.setSingleLine(true);
  to
  newTextView.setSingleLine(false);
  then I have this:</p>
  
  <pre><code>|one two three four five six |
  |                         sev|
  |                          en|
  </code></pre>