地方自动完成功能无法在Android上正常运行 [英] Place Autocomplete not working properly Android

查看:55
本文介绍了地方自动完成功能无法在Android上正常运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将位置自动完成添加到我的应用中,但是当我触摸出现的搜索按钮,然后消失.我无法输入搜索内容,它消失了.消失意味着有搜索栏,但是如果我们触摸Google,搜索栏将会出来,我们可以在其中键入内容.但是它来了,然后突然消失了.

I have added the Place Autocomplete to my app but when I touch the search button it comes and then disappearing. I couldn't type in the search it disappearing. Disappearing means there's search bar but if we touch googles search bar will come out and we can type there. But It's coming and then it suddenly disappears.

这是XML中的代码.

<android.support.v7.widget.Toolbar
    android:id="@+id/toolbar"
    android:layout_width="match_parent"
    android:layout_height="?attr/actionBarSize"
    android:background="?attr/colorPrimary"
    app:popupTheme="@style/AppTheme.PopupOverlay">

    <fragment
         android:id="@+id/place_autocomplete_fragment"
         android:name="com.google.android.gms.location.places.ui.PlaceAutocompleteFragment"
         android:layout_width="match_parent"
         android:layout_height="match_parent" />
</android.support.v7.widget.Toolbar>

推荐答案

它正在运行,并且应该将Android API密钥添加到清单中!这样就可以了! https://developers.google.com/places/android-api/

it's working and Android API key should be added to the manifest! So it will work !https://developers.google.com/places/android-api/

这篇关于地方自动完成功能无法在Android上正常运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆