problem with custom dialog listview
<p>i call the dialog in my parent activity.. where as the dialog is in another activity...i faced error while setting the adapter  "setListAdapter(new ListViewAdapter(this));"... can any one plz assist me</p>

<hr>

<p>CustomizeDialog.class </p>

<pre><code>package org.me.dailogfrmchildact;



/** Class Must extends with Dialog */
/** Implement onClickListener to dismiss dialog when OK Button is pressed */
public class CustomizeDialog extends Dialog implements OnClickListener {
    Button okButton;

    public CustomizeDialog(Context context) {
        super(context);
        /** 'Window.FEATURE_NO_TITLE' - Used to hide the title */
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        /** Design the dialog in main.xml file */
        setContentView(R.layout.main);

        okButton = (Button) findViewById(R.id.OkButton);
        okButton.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        /** When OK Button is clicked, dismiss the dialog */
        if (v == okButton){
            ListviewContent.add("sadas");
        ListviewCount.add("dasasd");
        setListAdapter(new ListViewAdapter(this));

        }

    }
private static ArrayList&lt;String&gt; ListviewContent = new ArrayList&lt;String&gt;();
    private static ArrayList&lt;String&gt; ListviewCount = new ArrayList&lt;String&gt;();

    private static class ListViewAdapter extends BaseAdapter {

        private LayoutInflater mInflater;

        public ListViewAdapter(Context context) {

            mInflater = LayoutInflater.from(context);

        }

        public int getCount() {
            return ListviewContent.size();
        }

        public Object getItem(int position) {
            return position;
        }

        public String getCount(int position) {
            return ListviewCount.get(position);
        }

        public String[] getSizeType(int position) {
            String[] str = new String[2];
            str[0] = ListviewContent.get(position);
            str[1] = ListviewCount.get(position);
            return str;
        }

        public long getItemId(int position) {
            return position;
        }

        public View getView(int position, View convertView, ViewGroup parent) {

            ListContent holder;

            if (convertView == null) {
                convertView = mInflater.inflate(R.layout.listviewinflate, null);
                holder = new ListContent();
                holder.text = (TextView) convertView.findViewById(R.id.TextView01);
                holder.text.setCompoundDrawables(null, null, null, null);
                holder.count = (TextView) convertView.findViewById(R.id.TextView02);
                holder.count.setCompoundDrawables(null, null, null, null);
                convertView.setTag(holder);
            } else {

                holder = (ListContent) convertView.getTag();
            }

            holder.text.setText(ListviewContent.get(position));
            holder.count.setText(ListviewCount.get(position));
            return convertView;
        }

        static class ListContent {

            TextView text;
            TextView count;
        }
    }

}
</code></pre>

<hr>

<p>mainactivity.class</p>

<pre><code>package org.me.dailogfrmchildact;


public class MainActivity extends Activity {

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);

        /** Display Custom Dialog */
        CustomizeDialog customizeDialog = new CustomizeDialog(this);
        customizeDialog.show();
// ToDo add your GUI initialization code here        
    }

}
</code></pre>
