Skip to content
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

Implementing Suggestions #328

Closed
jabi1995 opened this issue Aug 5, 2019 · 1 comment
Closed

Implementing Suggestions #328

jabi1995 opened this issue Aug 5, 2019 · 1 comment

Comments

@jabi1995
Copy link

jabi1995 commented Aug 5, 2019

I have a list of Strings fetched from local database How can I use this list as suggestion in FSV?
In your example I watched you convert Json format to ColorWrapper but How about mine?

Regards

@mosesmwongela
Copy link

Do this.

  1. Create an entity class for your String. Something like: https://raw.githubusercontent.com/arimorty/floatingsearchview/master/sample/src/main/java/com/arlib/floatingsearchviewdemo/data/ColorSuggestion.java

  2. Create an ArrayList of type "your entity"

  3. Populate this arrayList

  4. Pass this list to the FSV this way: mSearchView.swapSuggestions(newSearchSuggestions);

I hope this helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants