seatgeek/android-PlacesAutocompleteTextView

dynamically change the pacv_historyFile name

Closed this issue ยท 4 comments

Lets say there are many users and for each one I want to change the pacv_historyFile .
I see the xml property the, pacv_historyFile but how to change that programmatically?

If you just want to change the path used for each user (probably easiest strategy for this, you can use the default implementation with a different file name:

https://github.com/seatgeek/android-PlacesAutocompleteTextView/blob/master/placesautocomplete/src/main/java/com/seatgeek/placesautocomplete/history/DefaultAutocompleteHistoryManager.java

very good I looked at this but it was not clear at first:
mAutocomplete.setHistoryManager(DefaultAutocompleteHistoryManager.fromPath(getActivity(),"file_name"));

Can this be changed on the fly or do I have to instantiate a new PlacesAutocompleteTextView for the "file_name" to be used?

Should be able to change it on the fly! let me know if that's not working