What I have: A RecyclerView with pictures of places like bars, cofee stores, etc.
What I want: That when you click on one of these images I show you the info of the sele
Inside foodAndGo
activity change,
AdapterDatos adapter = new AdapterDatos(listalugares);
to AdapterDatos adapter = new AdapterDatos(listalugares,foodAndGo.this);
and inside adapter class add this
private Context context;
public AdapterDatos(ArrayList<ClaseNueva> listaLugares,Context context) {
this.context=context;
listalugares = listaLugares;
}
Now, you can call startactivity in adapter's onBindViewHolder
like this
Intent myIntent = new Intent(context, MapsActivity.class);
context.startActivity(myIntent);