Created
May 8, 2023 05:25
-
-
Save barikoi/1151c0e1cc8f5b7db7836f54347f84fe to your computer and use it in GitHub Desktop.
This file contains hidden or 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
searchAutocompleteFragment =(SearchAutocompleteFragment)getSupportFragmentManager().findFragmentById(R.id.place_autocomplete_fragment); | |
searchAutocompleteFragment.setBangla(true); | |
searchAutocompleteFragment.setPlaceSelectionListener(new SearchAutocompleteFragment.PlaceSelectionListener() { | |
@Override | |
public void onPlaceSelected(SearchAutoCompletePlace place) { | |
Toast.makeText(MainActivity.this, ""+place.getAddress()+ " \n lat: "+ place.getLatitude()+"\nlon: "+place.getLongitude() , Toast.LENGTH_SHORT).show(); | |
} | |
@Override | |
public void onFailure(String error) { | |
Toast.makeText(MainActivity.this, error, Toast.LENGTH_SHORT).show(); | |
} | |
}); | |
searchAutocompleteFragment.setTextHint("search for a place"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment