草庐IT

PlaceAutoComplete

全部标签

android - Google 的 android 位置自动完成功能一直给我 "Can' t 加载搜索结果”

我正在设计一个使用map并要求用户输入目的地的应用程序。我在xml中添加了PlaceAutoCompleteFragmentfragmentandroid:id="@+id/place_autocomplete_fragment"android:layout_width="200dp"android:layout_height="wrap_content"android:layout_gravity="top"android:name="com.google.android.gms.location.places.ui.PlaceAutocompleteFragment"/>Andth

android - 从 PlaceAutoComplete 搜索城市名称会给出加密的城市名称

我已将Googleplaces的gradle从8.4.0更新到10.0.1使用编译'com.google.android.gms:play-services-places:10.0.1'。它给了我这样的预测结果:E/PlaceAutocomplete:ChIJARFGZy6_wjsRQ-Oenb9DjYIE/PlaceAutocomplete:ChIJCZRqkjTBwjsRtSBs09cqv5IE/PlaceAutocomplete:ChIJSXAo8VjAwjsR8XBJRuCZo0cE/PlaceAutocomplete:ChIJfxihRRy35zsRHL6ljyiIYKQE/

android - PlaceAutocomplete 得到未知状态码 : 9000

我重用了Android团队的GooglePlaceAutocomplete示例项目中的代码。我为每个项目使用了不同的key(还在谷歌控制台中为Android启用了GooglePlaces)。当我构建并运行示例项目时,它运行没有问题。但是,当我从我的应用程序运行它时,有时它可以正常工作,有时我会收到未知的状态代码:9000(来自status.toString())。我在控制台上得到了这个:04-0801:15:39.33116148-10791/?W/Places﹕f.a:633:gLocReplyElementunsuccessfulstatus:104-0801:15:39.3321

android - 在 Android 中更改 PlaceAutocomplete.IntentBuilder 的提示文本

我正在创建一个Android应用程序。因为我正在使用PlaceAutocomplete.IntentBuilder从Google获取地址。我想更改PlaceAutocompleteView中搜索框的提示文本。我使用下面的代码打开PlaceAutocompleteView。Intentintent=newPlaceAutocomplete.IntentBuilder(PlaceAutocomplete.MODE_OVERLAY).build(this);startActivityForResult(intent,requestCode);屏幕截图: 最佳答案

android - 在不使用 Rest API 的情况下使用 PlaceAutocomplete 时出现延迟

我正在使用GooglePlacesAPI。但是如果不实现其余API,我找不到减少请求数量的方法。try{Intentintent=newPlaceAutocomplete.IntentBuilder(PlaceAutocomplete.MODE_FULLSCREEN).setFilter(newAutocompleteFilter.Builder().setTypeFilter(AutocompleteFilter.TYPE_FILTER_ADDRESS).build()).build(mActivity);startActivityForResult(intent,REQUEST_C