-
-
Save parzibyte/5f807afd2a499023175578ad15ee8fb8 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
// Crear fragmento de tu clase | |
Fragment fragment = new GastosFragmentNuevo(); | |
// Obtener el administrador de fragmentos a través de la actividad | |
FragmentManager fragmentManager = getActivity().getSupportFragmentManager(); | |
// Definir una transacción | |
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction(); | |
// Remplazar el contenido principal por el fragmento | |
fragmentTransaction.replace(R.id.content_principal, fragment); | |
fragmentTransaction.addToBackStack(null); | |
// Cambiar | |
fragmentTransaction.commit(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment