Created
June 6, 2016 19:32
-
-
Save zurche/739c8ab93f58daf58af1bd035f728bb0 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 | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
Point buenosAiresObeliscoPoint = | |
new Point((float) -34.6037389, (float) -58.3815704); | |
Point nycStatueOfLibertyPoint = | |
new Point((float) 40.6892494, (float) -74.0445004); | |
float distanceBetweenPoints = LatLonDistanceCalculator.calculateDistance( | |
buenosAiresObeliscoPoint, | |
nycStatueOfLibertyPoint); | |
TextView kilometersLabel = (TextView) findViewById(R.id.kilometers_label); | |
kilometersLabel.setText("Between the Obelisco and the Statue of Liberty there are: \n" + distanceBetweenPoints + "KM"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment