click events for dynamic array of buttons
<p>with the below code i can generate an array of button.but i cant specify the click events for these button.how can i do these</p>

<pre><code>Button addAsFriend[] = new Button[c.getCount()];
 for( i=0;i&lt;c.getCount();i++)
 {
    addAsFriend[i] = new Button(this);
 }
</code></pre>
