title: TextView inside TableLayout and TableRow doesn't wrap text
body: <p>I have a small problem with a fragment in my application that shows out details about a Google Place. The problem is in displaying the reviews of other users. </p>
  
  <p>As shown in this image the text in the comments textview is not fully displayed. Is there a way to make the textview go to a new line?</p>
  
  <p>Image of the problem:
  <a href="http://postimg.org/image/84frbxd23/" rel="nofollow">http://postimg.org/image/84frbxd23/</a></p>
  
  <p>I'm adding the TableRow and TextView dynamically from code. I've tried the following things:</p>
  
  <ol>
  <li>setting ellipsize to end</li>
  <li>setting scrollable to true</li>
  <li>setting maxLines to 10</li>
  </ol>
  
  <p>Here's my layout:</p>
  
  <pre><code>&lt;TableLayout
      android:id="@+id/reviews"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:layout_gravity="center_vertical"
      android:layout_below="@+id/openhours"
      android:layout_marginTop="20dp"
      android:layout_alignParentBottom="true"
      android:layout_alignParentStart="true"&gt;
  
  &lt;/TableLayout&gt;
  </code></pre>
  
  <p>And here is the code that adds the rows and textviews:</p>
  
  <pre><code>        //Dinamically create table
          TableLayout table = (TableLayout)rootView.findViewById(R.id.reviews);
          TableRow tr_head = new TableRow(rootView.getContext());
          tr_head.setBackgroundColor(Color.GRAY);
          tr_head.setLayoutParams(new TableLayout.LayoutParams(
                  TableLayout.LayoutParams.FILL_PARENT,
                  TableLayout.LayoutParams.WRAP_CONTENT));
  
  
          TextView label_author = new TextView(rootView.getContext());
          label_author.setText("Author");
          label_author.setTextColor(Color.WHITE);
          label_author.setPadding(5, 5, 5, 5);
          tr_head.addView(label_author);// add the column to the table row here
  
          TextView label_comment = new TextView(rootView.getContext());
          label_comment.setText("Comment"); // set the text for the header
          label_comment.setTextColor(Color.WHITE); // set the color
          label_comment.setPadding(5, 5, 5, 5); // set the padding (if required)
          tr_head.addView(label_comment); // add the column to the table row here
  
  
          table.addView(tr_head, new TableLayout.LayoutParams(
                  TableLayout.LayoutParams.FILL_PARENT,
                  TableLayout.LayoutParams.WRAP_CONTENT));
  
          //if it has reviews display them
          if(currentP.hasReviews()) {
              for (Review r : currentP.getReviews()) {
                  TableRow tr = new TableRow(rootView.getContext());
                  tr.setLayoutParams(new TableLayout.LayoutParams(
                          TableLayout.LayoutParams.FILL_PARENT,
                          TableLayout.LayoutParams.WRAP_CONTENT));
  
                  //Create two columns to add as table data
                  // Create a TextView to add date
                  TextView author = new TextView(rootView.getContext());
                  author.setText(r.getAuthor());
                  author.setPadding(2, 0, 5, 0);
                  author.setTextColor(Color.BLACK);
                  author.setHorizontalScrollBarEnabled(false);
                  tr.addView(author);
  
                  TextView comment = new TextView(rootView.getContext());
                  comment.setPadding(5, 0, 5, 0);
                  comment.setText(r.getReview());
                  comment.setTextColor(Color.BLACK);
                  comment.setEllipsize(TextUtils.TruncateAt.END);
                  comment.setMaxLines(10);
                  comment.setId(r.getId());
                  tr.addView(comment);
  
  
                  // finally add this to the table row
                  table.addView(tr, new TableLayout.LayoutParams(
                          TableLayout.LayoutParams.FILL_PARENT,
                          TableLayout.LayoutParams.WRAP_CONTENT));
  
              }
  </code></pre>