That's exactly what I needed. Sorry for the inconvenience. Thanks a lot.
On Jul 5, 11:24 am, Jaswant <[email protected]> wrote: > y u r creating new onClickListener every tym??? > just implement OnClickListener explicitaly once and do whatever u want in > onClick() method. > like: > > public class MyActivity extends Activity implements OnClickListener { > > void onCreate(.....) > { > findViewById(R.id.MyButton1).setOnClickListener(this); > findViewById(R.id.MyButton2).setOnClickListener(this); > findViewById(R.id.MyButton3).setOnClickListener(this); > findViewById(R.id.MyButton4).setOnClickListener(this); > findViewById(R.id.MyButton5).setOnClickListener(this);............... > > } > > public void onClick() > { > MyCustButton btn=(MyCustButton )v; > updateLabel(btn.getText().toString()); > > > > > > > > } > } -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

