I'm developing a android application that uses a ListActivity.
In the method onListItemClick, I instantiate an object x. I have an Activity a whose constructor receives and object of the same type of x. How do I do to instantiate a and start it?
Pretty much like this, but it does not work:
protected void onListItemClick(ListView l, View v, int position, long id) {
EventoSingle eventoSingle = new EventoSingle(this.eventos.get(position));
Intent i = new Intent(this, EventoSingle.class);
eventoSingle.startActivity(i);
startActivity(i);
super.onListItemClick(l, v, position, id);
}