title: My ScrollView won't scroll
body: <p>I've made two graphs using the <code>GraphView</code> API and put them each inside two <code>LinearLayout</code>. Both layouts are inside a <code>ScrollView</code> which is inside a <code>Relativelayout</code>. For some reason, the <code>ScrollView</code> won't scroll:</p>
  
  <p>XML:</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:paddingLeft="@dimen/activity_horizontal_margin"
      android:paddingRight="@dimen/activity_horizontal_margin"
      android:paddingTop="@dimen/activity_vertical_margin"
      android:paddingBottom="@dimen/activity_vertical_margin"
      tools:context="com.example.adrian.desktop.ViewProgress$PlaceholderFragment"&gt;
      &lt;ScrollView
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:id="@+id/scrollView"
          android:fillViewport="true"&gt;
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:layout_marginTop="280dp"
              android:orientation="vertical"&gt;
          &lt;LinearLayout
              android:id="@+id/Graph"
              android:orientation="vertical"
              android:layout_width="match_parent"
              android:layout_height="0dp"
              android:layout_weight="1"&gt;
          &lt;/LinearLayout&gt;
              &lt;LinearLayout
                  android:id="@+id/Graph2"
                  android:layout_below="@+id/Graph"
                  android:orientation="vertical"
                  android:layout_width="match_parent"
                  android:layout_height="0dp"
                  android:layout_weight="1"&gt;
              &lt;/LinearLayout&gt;
          &lt;/LinearLayout&gt;
      &lt;/ScrollView&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Java:</p>
  
  <pre><code>package com.example.adrian.desktop;
  
  import android.graphics.Color;
  import android.os.Bundle;
  import android.support.v4.app.Fragment;
  import android.support.v4.app.FragmentActivity;
  import android.view.LayoutInflater;
  import android.view.Menu;
  import android.view.MenuItem;
  import android.view.View;
  import android.view.ViewGroup;
  import android.widget.LinearLayout;    
  import com.jjoe64.graphview.GraphView;
  import com.jjoe64.graphview.GraphView.GraphViewData;
  import com.jjoe64.graphview.GraphViewSeries;
  import com.jjoe64.graphview.LineGraphView;
  
  public class ViewProgress extends FragmentActivity {    
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_view_progress);
          if (savedInstanceState == null) {
              getSupportFragmentManager().beginTransaction()
                  .add(R.id.container, new PlaceholderFragment())
                  .commit();
          }
          GraphView graphView = new LineGraphView(this, "example");
          // first init data
          // sin curve
          int num = 150;
          GraphViewData[] data = new GraphViewData[num];
          double v=0;
          for (int i=0; i&lt;num; i++) {
              v += 0.2;
              data[i] = new GraphViewData(i, Math.sin(v));
          }
          GraphViewSeries seriesSin = new GraphViewSeries("This Year", new GraphViewSeries.GraphViewSeriesStyle(Color.rgb(200, 50, 00), 3), data);
           // cos curve
          data = new GraphViewData[num];
          v = 0;
          for (int i=0; i&lt;num; i++) {
              v += 0.2;
              data[i] = new GraphViewData(i, Math.cos(v));
          }
          GraphViewSeries seriesCos = new GraphViewSeries("Last Year", new GraphViewSeries.GraphViewSeriesStyle(Color.rgb(90, 250, 00), 3), data);
          /*
          * create graph
          */
          graphView = new LineGraphView(this, "Grades");
          // add data
          graphView.addSeries(seriesCos);
          graphView.addSeries(seriesSin);
          // optional - set view port, start=2, size=10
          graphView.setViewPort(2, 10);
          graphView.setScalable(true);
          // optional - legend
          graphView.setShowLegend(true);
          graphView.setLegendAlign(GraphView.LegendAlign.BOTTOM);
          graphView.setHorizontalLabels(new String[] {"Last Year", "First Term", "Second Term", "Third Term"});
          graphView.setVerticalLabels(new String[] {"A*", "A", "B","C","D","E","F"});
          LinearLayout layout = (LinearLayout) findViewById(R.id.Graph);
          LinearLayout layout2 = (LinearLayout)findViewById(R.id.Graph2);
          layout.addView(graphView);
          // init example series data
          GraphViewSeries exampleSeries = new GraphViewSeries(new GraphViewData[] {
              new GraphViewData(1, 2.0d)
                  , new GraphViewData(2, 1.5d)
                  , new GraphViewData(3, 2.5d)
                  , new GraphViewData(4, 1.0d)
          });
          GraphView graphView2 = new LineGraphView(
             this // context
             , "Performance" // heading
          );
          graphView2.addSeries(exampleSeries); // data    
          layout2.addView(graphView2);
      }
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          // Inflate the menu; this adds items to the action bar if it is present.
          getMenuInflater().inflate(R.menu.view_progress, menu);
          return true;
      }
  
      @Override
      public boolean onOptionsItemSelected(MenuItem item) {
          // Handle action bar item clicks here. The action bar will
          // automatically handle clicks on the Home/Up button, so long
          // as you specify a parent activity in AndroidManifest.xml.
          int id = item.getItemId();
          if (id == R.id.action_settings) {
              return true;
          }
          return super.onOptionsItemSelected(item);
      }
  
      /**
       * A placeholder fragment containing a simple view.
       */
      public static class PlaceholderFragment extends Fragment {    
          public PlaceholderFragment() {
          }    
          @Override
          public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
              View rootView = inflater.inflate(R.layout.fragment_view_progress, container, false);
              return rootView;
          }
      }
  }
  </code></pre>