title: How add multiple textview at linearlayout in loop
body: <p>I want to add some textview to linear layout with a loop but I think I'm just adding one because the text of my text view is not displayed vertically.</p>
  
  <pre><code>LinearLayout llPrincipal = (LinearLayout)findViewById(R.id.mainLayout);
  
  int contador = 0;
  while ((inputString = inputReader.readLine()) != null) {
      contador++;
      stringBuffer.append(inputString + "\n");
      TextView tvRutina = new TextView(this);
      tvRutina.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));
      tvRutina.setPadding(0, 3, 0, 3);
      tvRutina.setId(contador);
      tvRutina.setText(inputString);
  
      llPrincipal.addView(tvRutina);
  }
  </code></pre>
  
  <p>Xml:</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:id="@+id/mainLayout"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:orientation="vertical"
  tools:context=".MainActivity" &gt;
  </code></pre>