FragmentManager
is deprecated. Is there an alternative or what can I do now?
PlaceAutocompleteFragment autocompleteFragment = (PlaceAutocompleteFragment) getFragmentManager().findFragmentById(R.id.place_autocomplete_fragment); autocompleteFragment.setOnPlaceSelectedListener(new PlaceSelectionListener() { @Override public void onPlaceSelected(Place place) { // TODO: Get info about the selected place. destination = place.getName().toString(); destinationLatLng = place.getLatLng(); } @Override public void onError(Status status) { // TODO: Handle the error. } });
Public methods. Print the Activity's state into the given stream. Return the FragmentManager for interacting with fragments associated with this activity. This method is deprecated.
Deprecated: Deprecated in Java.
getFragmentManager() Return the FragmentManager for interacting with fragments associated with this fragment's activity.
This method was deprecated in API level 28.
Use FragmentActivity.getSupportFragmentManager()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With