Created
May 7, 2015 21:34
-
-
Save kodamirmo/9c16e7256f276a0f18b5 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
//************************** Esto en el fragment **************************// | |
//...... codigo | |
public void setLabelText(String text){ | |
mMyTextView.setText(text); | |
} | |
//..... codigo | |
//************************** Esto en Main Activity **************************// | |
//...... codigo | |
Fragment fragmentToUpdate = new FragmentToUpdate(); | |
//Esto solo es para mostrarlo, pero eso depende de como lo hagas tú | |
FragmentManager fragmentManager = getSupportFragmentManager(); | |
fragmentManager.beginTransaction() | |
.replace(R.id.content_frame, fragmentToUpdate).commit(); | |
//Aqui es donde se actualiza el Label desde la actividad | |
fragmentToUpdate.setLabelText("Hola mundo"); | |
//..... codigo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment