I am creating an app in which I have a TableLayout
, in which I add TableRow
dynamically with Spinners
and TextEdit
.
Is it possible to create a% common% for all EventHandler
?
I am creating an app in which I have a TableLayout
, in which I add TableRow
dynamically with Spinners
and TextEdit
.
Is it possible to create a% common% for all EventHandler
?
I do not know if this is what you want, but you can assign events from multiple objects to the same function:
FindViewById<Spinner>(Resource.Id.Spn1).Click += EventoClick_Click;
FindViewById<Spinner>(Resource.Id.Spn2).Click += EventoClick_Click;
private void EventoClick_Click(object sender, EventArgs e)
{
//Aqui você pode manipular o objeto que chamou o evento usando o sender
}