I put a scrollview around a Relative Layout that I am adding to dynamically. If I set the height of the Relative Layout to a fixed amount that goes off of the page the scrollview will work.

Example:

```
 <ScrollView 
    android:id="@+id/scrollView1"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
     android:fillViewport="true" >

    <RelativeLayout
        android:id="@+id/llcustomrow"
        android:layout_width="match_parent"
        android:layout_height="800dp" >
    </RelativeLayout>
</ScrollView>

```

But I need the RelativeLayout to be able to hold however many items I add to it dynamically o I set The relativelayout height to wrap\_content. But once I add enough items to the relative layout so that they are going off the screen the Scrollview doesnt register

Below is how I am dynamically adding to the relative layout

```
LinearLayout mLinearLayout;
RelativeLayout rlcopy;
RelativeLayout[] rArray = new RelativeLayout[20];
int counter = 0;
RelativeLayout llcustomrow;
RelativeLayout.LayoutParams paramsleft; 

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
        Bundle savedInstanceState) {
    mLinearLayout = (LinearLayout) inflater.inflate(
            R.layout.customworkout, container, false);

     paramsleft = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, 
                                                RelativeLayout.LayoutParams.WRAP_CONTENT);

    llcustomrow = (RelativeLayout)mLinearLayout.findViewById(R.id.llcustomrow);

    for(int i = 0;i<=rArray.length-1;i++){
        rArray[i] = (RelativeLayout)View.inflate(getActivity(), R.layout.addworkoutlayout, null); 
            paramsleft.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
             paramsleft.setMargins(10, 0, 0, 0);
             rArray[i].setLayoutParams(paramsleft);

    }
    Button bAdd = (Button) mLinearLayout.findViewById(R.id.bAddExcercise);

    bAdd.setOnClickListener(new OnClickListener() {         
        @Override
        public void onClick(View v) {
                 rArray[counter].setY(rArray[counter-1].getY() + (rArray[counter-1].getHeight() +25));

             llcustomrow.addView(rArray[counter]);  
             counter++;

        }
    });

    return mLinearLayout;
}

```

Thanks