google将android放置在带有edittext的android中的listView中

时间:2016-05-13 10:31:07

标签: android listview autocomplete google-places-api

我正在研究google places api,并且已经在它上面做了一个成功的演示,但事实是我已经开发了自动完成并需要在listview中进行,所以有人可以帮我做吗?我需要的是在输入edittext时更改列表内容。

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

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

1 个答案:

答案 0 :(得分:0)

在更新文本中使用Textwatcher获取来自地方api的数据并调用notifydatasetchanged