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
private void changeFragment(Fragment f, String tag) { | |
FragmentManager fragmentManager = getSupportFragmentManager(); | |
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction(); | |
if (fragmentManager.findFragmentByTag(tag) == null) { | |
fragmentTransaction.add(R.id.frameContainer, f, tag); | |
} else { | |
f = fragmentManager.findFragmentByTag(tag); | |
fragmentTransaction.replace(R.id.frameContainer, f, tag); | |
} | |
fragmentTransaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE).commit(); |
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
private void changeFragment(Fragment f, String tag) { | |
FragmentManager fragmentManager = getSupportFragmentManager(); | |
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction(); | |
if (fragmentManager.findFragmentByTag(tag) == null) { | |
fragmentTransaction.add(R.id.frameContainer, f, tag); | |
} else { | |
f = fragmentManager.findFragmentByTag(tag); | |
fragmentTransaction.replace(R.id.frameContainer, f, tag); | |
} | |
fragmentTransaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE).commit(); |
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
//Con latitude y longitude | |
Uri gmmIntentUri = Uri.parse("geo:0,0" + "?q=" + trayecto.getLatitude() + "," + trayecto.getLongitude()); | |
Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri); | |
mapIntent.setPackage("com.google.android.apps.maps"); | |
startActivity(mapIntent); | |
// Con dirección | |
Uri gmmIntentUri = Uri.parse("geo:0,0" + "?q=" + trayecto.getAddress()); |