Java 类com.facebook.model.GraphLocation 实例源码

项目:facebook-android-sdk    文件:PlacePickerSampleActivity.java   
private void displaySelectedPlace(int resultCode) {
    String results = "";
    PlacePickerApplication application = (PlacePickerApplication) getApplication();

    GraphPlace selection = application.getSelectedPlace();
    if (selection != null) {
        GraphLocation location = selection.getLocation();

        results = String.format("Name: %s\nCategory: %s\nLocation: (%f,%f)\nStreet: %s, %s, %s, %s, %s",
                selection.getName(), selection.getCategory(),
                location.getLatitude(), location.getLongitude(),
                location.getStreet(), location.getCity(), location.getState(), location.getZip(),
                location.getCountry());
    } else {
        results = "<No place selected>";
    }

    resultsTextView.setText(results);
}
项目:FacebookNewsfeedSample-Android    文件:PlacePickerSampleActivity.java   
private void displaySelectedPlace(int resultCode) {
    String results = "";
    PlacePickerApplication application = (PlacePickerApplication) getApplication();

    GraphPlace selection = application.getSelectedPlace();
    if (selection != null) {
        GraphLocation location = selection.getLocation();

        results = String.format("Name: %s\nCategory: %s\nLocation: (%f,%f)\nStreet: %s, %s, %s, %s, %s",
                selection.getName(), selection.getCategory(),
                location.getLatitude(), location.getLongitude(),
                location.getStreet(), location.getCity(), location.getState(), location.getZip(),
                location.getCountry());
    } else {
        results = "<No place selected>";
    }

    resultsTextView.setText(results);
}