【问题标题】:google places api in listView in android with edittext in androidgoogle 将 api 放在 android 的 listView 中,并在 android 中使用 edittext
【发布时间】:2016-09-09 12:19:36
【问题描述】:

我正在研究 google places api,并在上面做了一个成功的演示,但问题是我已经用自动完成功能开发了它,需要在 listview 中做,所以有人可以帮我做吗?我需要的是在输入编辑文本时更改列表内容。

代码

 AutoCompleteTextView autoCompView = (AutoCompleteTextView)getActivity().findViewById(R.id.autoCompleteTextView);

        autoCompView.setAdapter(new GooglePlacesAutocompleteAdapter(getActivity(), R.layout.list_item_one));
        autoCompView.setOnItemClickListener(this);

【问题讨论】:

    标签: android listview autocomplete google-places-api


    【解决方案1】:

    在更新文本时使用 Textwatcher 从位置 api 获取数据并调用 notifydatasetchanged

    【讨论】:

    • 我是新手,你能帮帮我吗?拜托
    猜你喜欢
    • 2011-06-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-01-30
    • 2012-02-19
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多