private void onPlacePickerDone(PlacePickerFragment fragment) { FragmentManager fm = getSupportFragmentManager(); fm.popBackStack(); String result = ""; GraphPlace selection = fragment.getSelection(); if (selection != null) { result = selection.getName(); } else { result = getString(R.string.no_place_selected); } place = selection; showAlert(getString(R.string.you_picked), result); }
private void onClickPickPlace() { final PlacePickerFragment fragment = new PlacePickerFragment(); fragment.setLocation(SEATTLE_LOCATION); fragment.setTitleText(getString(R.string.pick_seattle_place)); setPlacePickerListeners(fragment); showPickerFragment(fragment); }
public static void populateParameters(Intent intent, Location location, String searchText) { intent.putExtra(PlacePickerFragment.LOCATION_BUNDLE_KEY, location); intent.putExtra(PlacePickerFragment.SEARCH_TEXT_BUNDLE_KEY, searchText); }