-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adapter View #11
Comments
@abaxxx It's going to be hard to have answers for you without a little bit of debugging help, by default the view will only show historical results until you cross the 3 character threshold. Also remember that the popup window with the results is a scroll view and there could be content below the fold. Otherwise, please try to proxy the network traffic to the google maps API (traffic through |
Thanks a lot brother. I'll try with your suggestions and get back to you
with more details.
|
Hi @abaxxx , Can show your custom adapter code for me ? I want create custom adapter but don't know how. |
@tuanth89 brother, Im not using a custom adapter, Im using default one. |
@tuanth89 the demo app does use the custom adapter, one of "features" of the PATV is that you're able to set the adapter from xml: https://github.com/seatgeek/android-PlacesAutocompleteTextView/blob/master/demo-app/src/main/res/layout/activity_places_autocomplete.xml#L19 |
@sddamico , Thanks Here is my xml com.seatgeek.placesautocomplete.PlacesAutocompleteTextView android:id="@+id/places_autocomplete" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@null" android:hint="Address" android:paddingBottom="5dp" android:paddingTop="5dp" android:singleLine="true" android:textColor="@color/text_gray_4" android:textColorHint="@color/text_gray_3" android:textSize="15sp" app:pacv_googleMapsApiKey="@string/API_server_key" app:pacv_adapterClass="adapter.TestPlacesAutocompleteAdapter" Here is log. Caused by: android.view.InflateException: Unable to find valid constructor with params Context, PlacesApi, AutocompleteResultType, and DefaultAutocompleteHistoryManager for specified adapterClass: com.teusoft.sirved.adapter.TestPlacesAutocompleteAdapter at com.seatgeek.placesautocomplete.PlacesAutocompleteTextView.adapterForClass(PlacesAutocompleteTextView.java:225) at com.seatgeek.placesautocomplete.PlacesAutocompleteTextView.init(PlacesAutocompleteTextView.java:127) at com.seatgeek.placesautocomplete.PlacesAutocompleteTextView.(PlacesAutocompleteTextView.java:78) at java.lang.reflect.Constructor.newInstance(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:288) at android.view.LayoutInflater.createView(LayoutInflater.java:607) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743) at android.view.LayoutInflater.rInflate(LayoutInflater.java:806) at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) at android.view.LayoutInflater.inflate(LayoutInflater.java:504) at android.view.LayoutInflater.inflate(LayoutInflater.java:414) at android.view.LayoutInflater.inflate(LayoutInflater.java:365) at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:378) at android.app.Activity.setContentView(Activity.java:2145) at com.teusoft.sirved.ProfileActivity.onCreate(ProfileActivity.java:151) at android.app.Activity.performCreate(Activity.java:5990) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387) at android.app.ActivityThread.access$800(ActivityThread.java:151) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5254) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) Caused by: java.lang.NoSuchMethodException: [class android.content.Context, class com.seatgeek.placesautocomplete.PlacesApi, class com.seatgeek.placesautocomplete.model.AutocompleteResultType, class com.seatgeek.placesautocomplete.history.DefaultAutocompleteHistoryManager] at java.lang.Class.getConstructor(Class.java:531) at java.lang.Class.getConstructor(Class.java:495) at com.seatgeek.placesautocomplete.PlacesAutocompleteTextView.adapterForClass(PlacesAutocompleteTextView.java:216) at com.seatgeek.placesautocomplete.PlacesAutocompleteTextView.init(PlacesAutocompleteTextView.java:127) at com.seatgeek.placesautocomplete.PlacesAutocompleteTextView.(PlacesAutocompleteTextView.java:78) at java.lang.reflect.Constructor.newInstance(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:288) at android.view.LayoutInflater.createView(LayoutInflater.java:607) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743) at android.view.LayoutInflater.rInflate(LayoutInflater.java:806) at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) at android.view.LayoutInflater.rInflate(LayoutInflater.java:809) at android.view.LayoutInflater.inflate(LayoutInflater.java:504) at android.view.LayoutInflater.inflate(LayoutInflater.java:414) at android.view.LayoutInflater.inflate(LayoutInflater.java:365) at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:378) at android.app.Activity.setContentView(Activity.java:2145) at com.teusoft.sirved.ProfileActivity.onCreate(ProfileActivity.java:151) at android.app.Activity.performCreate(Activity.java:5990) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387) at android.app.ActivityThread.access$800(ActivityThread.java:151) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5254) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) |
@tuanth89 can you please create a separate issue for this? The problem you are experiencing is not related to this thread. |
@sddamico Thank, i created a issue |
Brother, the app is not crashing, but im getting this exception. If i setHistoryfile(null). E/MapsPlacesAutoComplete: Unable to load history from history file Is this correct behaviour, just asking.. |
Hmm, that doesn't seem right. Though, it does mean that it is respecting you request to turn history off... I've created #14 |
@abaxxx I can't reproduce this, sorry. |
Dude, I love your work man. I was using the AutoCompleteTextView, created custom adapter ext,. and working all these days.
I started using yours and love it, the only problem is my earlier AutoCompleteTextView was showing many suggestions (like 8-10) as soon as i begin typing a place name. But yours shows only 2 ... Kindly help.
The text was updated successfully, but these errors were encountered: