1

I am new to android programming, I am trying to read a simple list , like a grocery list, from a text file (.txt) to put it into a list for an app I am making I was wondering how I would do this I or if anyone knows any tutorials for a simple tutorial. I am also working this through with fragments.

coynep1
  • 45
  • 1
  • 8
  • I've seen answer for almoast the same question: http://stackoverflow.com/questions/2902689/how-can-i-read-a-text-file-from-the-sd-card-in-android – Mateusz Sep 30 '11 at 13:16
  • possible duplicate of [Get and Parse CSV file in android](http://stackoverflow.com/questions/5360628/get-and-parse-csv-file-in-android) – Mark O'Connor Sep 01 '12 at 13:47

1 Answers1

1

Follow this link: OpenCSV

I used it to create a CSV file in code, but it also allows parsing a file.

But if you create the file manually anyway, why don't you use a string array and put it in your source-folder. Then add it to your listAdapter when you create the content for your list.

banzai86
  • 727
  • 1
  • 5
  • 13