나는 매우 새로운 안드로이드 Google지도를 원합니다. 사용자가 내 프로그램에서 편집 텍스트를 클릭 할 때 Google지도 장소에서 자동 제안을 제공하고 싶습니다.안드로이드에 대한 자동 Sugessions 제공 Google지도 palces
MainActivity를 : 해당 사용자가 한 곳을 선택할 수 있도록 H 관련 장소 디스플레이를 대응하는이 코드 내 응용 프로그램에서 실행이
나는 매우 새로운 안드로이드 Google지도를 원합니다. 사용자가 내 프로그램에서 편집 텍스트를 클릭 할 때 Google지도 장소에서 자동 제안을 제공하고 싶습니다.안드로이드에 대한 자동 Sugessions 제공 Google지도 palces
MainActivity를 : 해당 사용자가 한 곳을 선택할 수 있도록 H 관련 장소 디스플레이를 대응하는이 코드 내 응용 프로그램에서 실행이
을 달성 할 수있는 방법 좀 도와주세요 -
mAtv_DestinationLocaiton = (AutoCompleteTextView) findViewById(R.id.et_govia_destination_location);
mAtv_DestinationLocaiton.addTextChangedListener(new TextWatcher() {
public void onTextChanged(CharSequence s, int start, int before,
int count) {
Log.i("Count", "" + count);
if (!mAtv_DestinationLocaiton.isPerformingCompletion()) {
autocompletePlaceList.clear();
DestiClick2 = false;
new loadDestinationDropList().execute(s.toString());
}
}
public void beforeTextChanged(CharSequence s, int start, int count,
int after) {
// TODO Auto-generated method stub
}
public void afterTextChanged(Editable s) {
// TODO Auto-generated method stub
}
});
}
private class loadDestinationDropList extends
AsyncTask<String, Void, ArrayList<String>> {
@Override
protected void onPreExecute() {
// Showing progress dialog before sending http request
destinationProgBar.setVisibility(View.VISIBLE);
}
protected ArrayList<String> doInBackground(String... unused) {
try {
Thread.sleep(3000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
autocompletePlaceList = httpHelper
.getAutocompletePlaces(mAtv_DestinationLocaiton.getText()
.toString());
return autocompletePlaceList;
}
HttpHelper 클래스 : -
내가 placematrix API를 사용하여 위치를 표시 할 http://android.foxykeep.com/dev/how-to-add-autocompletion-to-an-edittext여기에서 ur는 http의 연결을 위해 모든 jar 파일을 사용합니까? – user1787493
.jar 파일을 사용하지 않고 자세한 내용은 Google Direction API를 사용하십시오. – ckpatel
autocompletePlaceList이게 뭐죠? – user1787493
이 링크를 따라? –
:
– user1787493