2016-05-30 10 views
3

私はAndroidアプリケーションを作成しています。私はPlaceAutocomplete.IntentBuilderを使ってGoogleからアドレスを取得しています。AndroidのPlaceAutocomplete.IntentBuilderのヒントテキストを変更してください。

PlaceAutocompleteビューの検索ボックスのヒントテキストを変更したいと思います。

私はPlaceAutocompleteビューを開くために以下のコードを使用しています。

Intent intent = new PlaceAutocomplete.IntentBuilder(PlaceAutocomplete.MODE_OVERLAY).build(this); 
startActivityForResult(intent, requestCode); 

スクリーンショット:

enter image description here

+0

[link](https://developers.google.com/android/reference/com/google/android/gms/location/places/ui/PlaceAutocompleteFragment#public-methods)をご確認ください。このリンクには、ヒントを変更するsetHint()があります。 –

+0

@SurenderKumar、間接的にPlaceAutocompleteクラスを呼び出します –

+0

解決方法を確認してください: [Google場所検索のヒントテキストを変更する方法](https://stackoverflow.com/questions/45366037/how-to-change-placeholder-オートインテリジェンスのアクティビティ:android-google-pla/47752403#47752403) – Maddy

答えて

-1

それは検索テキストの代わりに、最初の文字列が表示されますが、それは表示されませんコード

Intent intent = new PlaceAutocomplete.IntentBuilder(PlaceAutocomplete.MODE_FULLSCREEN) 
       .zzfd("Enter pickup location") //set the hint text here 
       .build(MapsActivity.this); 
     startActivityForResult(intent,PICKUP_REQ); 

の下にこれを使用してみてくださいヒントの一形態として。

関連する問題