title: Adding textViews in a for loop
body: <pre><code>      scrollview = (ScrollView)findViewById(R.id.detailedScrollView);
  
  
    for (Quotation quotation : object.quotes){
  
            TextView quote = new TextView(this);
            quote.setText(quotation.getQuote());
            quote.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
            scrollview.addView(quote);
  
  
        }
  </code></pre>
  
  <p>Let's say there are three quotes, then I want to have three textViews. However, the code above crashes my app. Any obvious mistakes? Here's the error I'm getting:</p>
  
  <pre><code>11-06 17:35:53.214: E/AndroidRuntime(1430): java.lang.IllegalStateException: ScrollView can host only one direct child
  </code></pre>