Created
July 14, 2015 14:16
-
-
Save guilhermecarvalhocarneiro/788815dd153d6f49e316 to your computer and use it in GitHub Desktop.
Chamada da MainActivity para atualizar os dados do fragment
This file contains hidden or 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
public void onNavDrawerItemSelected(NavigationDrawerFragment navigationDrawerFragment, int i) { | |
if(allCities.size() > 0 && !allCities.isEmpty()){ | |
City cityChosen = allCities.get(i); | |
Toast.makeText(this, cityChosen.getName(), Toast.LENGTH_LONG).show(); | |
setCityChoice(cityChosen); | |
// Criando uma instancia do TabEventFragment | |
TabEventFragment tabEvent = new TabEventFragment(); | |
// Chamando o método para atualizar os dados conforme a cidade escolhida. | |
tabEvent.getNewData(getContext(), cityChosen); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment