GithubHelp home page GithubHelp logo

Comments (5)

sddamico avatar sddamico commented on August 25, 2024

As documented in the README, to use a custom adapter you must extend AbstractPlacesAutocompleteAdapter and preserve its constructor.

https://github.com/seatgeek/android-PlacesAutocompleteTextView/blob/master/README.md#xml-properties

from android-placesautocompletetextview.

tuanth89 avatar tuanth89 commented on August 25, 2024

@sddamico , i use your custom adapter but still not working. i miss something ???
Here is adapter :

public class TestPlacesAutocompleteAdapter extends AbstractPlacesAutocompleteAdapter {
    protected TestPlacesAutocompleteAdapter(final Context context, final PlacesApi api, final AutocompleteResultType resultType, final AutocompleteHistoryManager history) {
        super(context, api, resultType, history);
    }
    @Override
    protected View newView(final ViewGroup parent) {
        return LayoutInflater.from(parent.getContext()).inflate(R.layout.places_autocomplete_item, parent, false);
    }
    @Override
    protected void bindView(final View view, final Place item) {
        ((TextView) view).setText(item.description);
    }
}

from android-placesautocompletetextview.

sddamico avatar sddamico commented on August 25, 2024

Hmm, that looks right.

If you change the 4th parameter to DefaultAutocompleteHistoryManager does that resolve it?

from android-placesautocompletetextview.

tuanth89 avatar tuanth89 commented on August 25, 2024

@sddamico sorry for my late reply. I tried but it not woked.
I think if you can, you should create a example full about this. Thank very much :)

from android-placesautocompletetextview.

sddamico avatar sddamico commented on August 25, 2024

@tuanth89 not sure if you managed to figure this out on your own, but the issue was that the constructor needed to be made public. This is fixed in #21, sorry about that.

from android-placesautocompletetextview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.