【问题标题】:Google Places API Web Service vs Google Places API for AndroidGoogle Places API Web Service vs Google Places API for Android
【发布时间】:2015-11-04 23:15:42
【问题描述】:

AutoCompleteText 推荐哪个地方。

Google Places API Web ServiceGoogle Places API for Android

哪个给出了最佳结果?

【问题讨论】:

  • 您能详细说明您需要使用自动完成功能吗?您要实现的具体功能类型是什么?
  • 自动填充 Google 地方

标签: android autocomplete google-places-api


【解决方案1】:

您可以使用其中任何一个,它们都提供自动完成结果,但您需要将结果连接到 AutoCompleteTextView

如果您想使用提供 GooglePlaceAutoComplete 小部件 (demo) 的库,请查看 Sprockets(我是开发人员)。使用您的 API 密钥进行设置后,您可以在布局中添加一个可以工作的 Places API 自动完成功能,如下所示:

<net.sf.sprockets.widget.GooglePlaceAutoComplete
    android:id="@+id/place"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"/>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-05-13
    • 2015-11-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-04-02
    • 2014-03-18
    相关资源
    最近更新 更多