Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created February 4, 2019 18:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/5da0e4c6bd1effadbf0d03e403ccc727 to your computer and use it in GitHub Desktop.
Save parzibyte/5da0e4c6bd1effadbf0d03e403ccc727 to your computer and use it in GitHub Desktop.
@Override // Un toque sencillo
public void onClick(View view, int position) {
// Pasar a la actividad EditarMascotaActivity.java
Mascota mascotaSeleccionada = listaDeMascotas.get(position);
Intent intent = new Intent(MainActivity.this, EditarMascotaActivity.class);
intent.putExtra("idMascota", mascotaSeleccionada.getId());
intent.putExtra("nombreMascota", mascotaSeleccionada.getNombre());
intent.putExtra("edadMascota", mascotaSeleccionada.getEdad());
startActivity(intent);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment