I have a list of ItemCodes that are saved in a CSV file in my raw folder in my android application.
In order to eradicate human error, I would like it so that when the user starts typing the edittext will autocomplete based on the itemcodes in the CSV file.
Does anyone know if this is possible?
Here is what I have so far:
private void ReadItemCodes() {
InputStream IS = getResources().openRawResource(R.raw.itemcodes);
BufferedReader reader = new BufferedReader(new InputStreamReader(IS, Charset.forName("UTF-8")));
String line;
try {
while ((line = reader.readLine()) != null) {
//Split by commas
String[] tokens = line.split(",");
//Read the data
ItemCodes+=line;
}
} catch (IOException e) {
e.printStackTrace();
}
}