草庐IT

autocompleteFragment

全部标签

android - placeautocompletefragment 完整地址

有没有什么方法可以使用GooglePlacesAPI中的placeautocompletefragment获取在搜索View中显示的完整地址?它只显示整个地址的第一部分。我确信一切都已正确实现,并且完整地址已由place.getAddress()返回。知道为什么完整地址没有显示在搜索栏上吗?autocompleteFragment=(PlaceAutocompleteFragment)getFragmentManager().findFragmentById(R.id.place_autocomplete_fragment);((EditText)autocompleteFragmen

Android Google Places API - PlaceAutocompleteFragment 清除按钮监听器

我正在使用GooglePlacesAPIforAndroid-PlaceAutocompleteFragment我项目中用于搜索位置的API,当用户选择一个位置然后使用位置经纬度获取记录并将其显示到ListView。现在的问题是每当用户点击PlaceAutocompleteFragment的清除按钮(X)时我想要清晰的ListView项目,我需要听清楚按钮onClick?怎么做?任何帮助将不胜感激。autocompleteFragment.setOnPlaceSelectedListener(newPlaceSelectionListener(){@Overridepublicvoid

android - AutocompleteFragment 结果返回一个具有 null 属性的地方

我正在尝试制作一个带有抽屉导航和mapfragment的应用程序。我试图拥有一个自动完成fragment,但是当我搜索一个地方时,我只收到name和id属性。像这样:I/PLACE:Place{address=null,attributions=[],id=ChIJVXealLU_xkcRja_At0z9AGY,latLng=null,name=Amsterdam,openingHours=null,phoneNumber=null,photoMetadatas=null,plusCode=null,priceLevel=null,rating=null,types=null,user