【发布时间】:2019-02-24 07:40:25
【问题描述】:
我正在开发一个安卓应用程序。在那里有一个google map 和places 搜索。当我在搜索视图上搜索地点时,我得到了
Peringathur,Kerala, India
Peringavu, Thrissur, Kerala, India
Peringala,Kerala, India
Peringalkuthu Dam, Poringalkuthu, Pariyaram, Kerala, India
Peringandoor, Kerala, India
这里我需要从所有行中删除这个Kerala, India
Iterator<AutocompletePrediction> iterator = autocompletePredictions.iterator();
ArrayList resultList = new ArrayList<>(autocompletePredictions.getCount());
while (iterator.hasNext()) {
AutocompletePrediction prediction = iterator.next();
String data = (String) prediction.getFullText(null);
resultList.add(new PlaceAutocomplete(prediction.getPlaceId(),
(String) prediction.getPrimaryText(null)+"\n"+
(String) prediction.getSecondaryText(null)
));
【问题讨论】:
标签: android google-maps google-places-api