I am currently spending my winter break building an Android Application to create and save a grocery list. I have already setup Firebase for Authentication, and now I am on to the next part in which I want users to build their list.
My issue is, I don’t want users adding items like “Car” or “Tuition” to their grocery list. Instead, I want to have a pre curated list of words of things you can buy at a grocery store (Chicken breasts, Chicken thighs), so that users can only submit text that matches this list.
My first idea was to have a user type a word (Chicken), and then when they hit submit it searches a pre constructed dictionary I have made with all of the possible ingredients, and if .get() does not return null it allows them to add it. However it would seem weird having a user try and submit a word like 7 times with no avail.
Is it possible to have this dictionary check happen as they are typing it? Sort of like how search bars have autocomplete?