-
-
Save parzibyte/c0cd11d32253491895ba71b86bd86002 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { | |
Bundle datosRecuperados = getArguments(); | |
if (datosRecuperados == null) { | |
// No hay datos, manejar excepción | |
return; | |
} | |
// Y ahora puedes recuperar usando get en lugar de put | |
long id = datosRecuperados.getLong("id"); | |
int edad = datosRecuperados.getInt("edad"); | |
String nombre = datosRecuperados.getString("nombre"); | |
// Imprimimos, pero en tu caso haz lo necesario | |
Log.d("GastosFragmentEditar", "El ID: " + id); | |
Log.d("GastosFragmentEditar", "La edad: " + edad); | |
Log.d("GastosFragmentEditar", "El nombre: " + nombre); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment