how to perform action(listener) from the function?
<p>I use the following code to return the Scroll View from the function.That Scroll View contain number of check boxes . I call this function and it return the Scroll View correctly.But how to get the value if any of the check box is checked i need to perform some action.How to do this ?</p>

<p>Scroll View return Function:</p>

<pre><code> public ScrollView MyViewGroup(String[] Fields,int width,int height)throws Exception{   

    ScrollView sc=new ScrollView(context);
    sc.setLayoutParams(new LayoutParams(width,
            height));

    TableLayout tbl=new TableLayout(context);       

    for(int i=0;i&lt;Fields.length;i++){       
        TableRow tr=new TableRow(context);          
        CheckBox ch=new CheckBox(context);
        ch.setId(i);
        ch.setText(Fields[i]);
        tr.addView(ch);
        tbl.addView(tr);            
    }

    sc.addView(tbl);
    return sc;      
}
</code></pre>

<p>and i use this function like the following way</p>

<pre><code>  LinearLay.addView(MyGui.MyViewGroup(strarr[],200,200);
</code></pre>

<p>Note :</p>

<p>MyGui class i create TextViews,EditTexts,Buttons and ScrollView .By using this MyGui Class i create the GUI 's only.I have one activity myform .In that myform class when i click the submit button i need get the checked value's and get some other Edittext Values from the user and take action for the submit Button only.Is there any possibility to do this ???? </p>
