I have gone through loads of these questions but still cant seem to figure it out. I have a text file split into rows. Each row consists of 5 pieces of data separated by a \
See Using BufferedReader.readLine() in a while loop properly for an example of reading a file line by line using a buffered reader, then combine this with Kon's answer and I think you have a solution.
AssetManager manger;
String line = null;
List xyzList = new ArrayList();
String[][] xyz;
InputStream is;
InputStreamReader isr;
BufferedReader br;
try {
manger = getAssets();
is = manager.open("data.txt");
isr = new InputStreamReader(is);
br = new BufferedReader(isr);
while ((line = br.readLine()) != null) {
xyzList.add(line.split(","));
}
xyz = (String[][])xyzList.toArray();
}catch (IOException e1) {
Toast.makeText(getBaseContext(), "Problem!", Toast.LENGTH_SHORT).show();
}finally{
br.close();
isr.close();
is.close();
}