title: adding LinearLayout to scrollview in android
body: <p>Please help me friends. I am tried to draw pie chart in android. First i am adding this view to Linear Layout and then tried to add that Linear Layout to ScrollView. I need scroll view because my content is dynamically expandable. And then add that scroll layout to my parent relative layout. While adding Linear layout to parent program working fine. But while adding scrollview to parent it dispaly's nothing. My code is </p>
  
  <pre><code>RelativeLayout r1 = (RelativeLayout) findViewById(R.id.rl1);
  
  values = calculateData(values);
  MyGraphview graphview = new MyGraphview(this, values);
  ScrollView sv = new ScrollView(this);
  sv.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT,
                  LayoutParams.MATCH_PARENT));
  
  LinearLayout ll = new LinearLayout(this);
  ll.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,
                  LayoutParams.WRAP_CONTENT));
  
  ll.setOrientation(1);
  ll.addView(graphview);
  sv.addView(ll);     
  
  r1.addView(sv);
  </code></pre>
  
  <p>note this friends. </p>
  
  <pre><code>ll.addView(graphview);
  //sv.addView(ll);       
  
  r1.addView(ll);
  </code></pre>
  
  <p>This is working fine.</p>
  
  <p>Thanks in advance</p>