Can anyone help me out here I need to create a dynamic ImageButton but I can not get seem to even get this regular button to work, I'm getting an error on this line `ll.addView(button,param);` 

```
package org.iimed.www;    
import org.iimed.www.R.layout;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.RelativeLayout.LayoutParams;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.graphics.drawable.Drawable;

public class Penicillins extends Activity implements OnClickListener {

    ImageButton back,addmed;
    Context adaba;
    Drawable mmimed;

    public void onCreate(Bundle SavedInstanceState) {
        super.onCreate(SavedInstanceState);
        setContentView(R.layout.penicillin);
        back = (ImageButton) findViewById(R.id.back);
        addmed = (ImageButton) findViewById(R.id.addmed);
        back.setOnClickListener(this);
        addmed.setOnClickListener(this); 
    }

    public void onClick(View v) {
        switch (v.getId()) {
        case R.id.back:
            startActivity(new Intent(
                Penicillins.this, ImageTextListViewActivity.class));
            break;
        case R.id.addmed:
            RelativeLayout ll=(RelativeLayout)findViewById(R.id.sundayopen);
            setContentView(R.layout.sundayopen);

            Button button= new Button (this);
            LayoutParams param = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);

            ll.addView(button,param);
        }
    }

```

error:

```
01-07 18:49:59.299: E/AndroidRuntime(27389): at org.iimed.www.Penicillins.onClick(Penicillins.java:63)

```