protected void initAutoCompleteTextView()
{
_attv_dstAddr.setThreshold**/cannot resolve method in textview/**(1);//是终点地址输入一个字后能加载出相关的地址列表信息
_attv_dstAddr.addTextChangedListener(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
final String keyword = _attv_dstAddr.getText().toString();
if(keyword == null || keyword.length() == 0){
return;
}
InputtipsQuery query = new InputtipsQuery(keyword,_city);
Inputtips search = new Inputtips(getApplicationContext(),query);
search.setInputtipsListener(new Inputtips.InputtipsListener() {
@Override
public void onGetInputtips(List<Tip> list, int i) {
if(i != 1000) {
return;
}
}
ArrayList<String> poiList = new ArrayList<String>();
for (int index = 0;index < list**/*cannot resolve symbol 'list'*/**.size(); index++ )
{
poiList.add(list.get(index).getName());
}
ArrayAdapter<String> adapter = new ArrayAdapter<String>(getApplicationContext(),
android.R.layout.simple_list_item_1,poiList);
_attv_dstAddr.setAdapter**/*cannot resolve symbol 'setAdapter*/**(adapter);
adapter.notifyDataSetChange**/*cannot resolve symbol 'notifyDataSetChange*/**();
});
search.requestInputtipsAsyn();
}
@Override
public void afterTextChanged(Editable s) {
}
});
}