title: Reading text file to ListView in Android?
body: <p>I would like to know how to read the contents of a text file line by line and add it to a ListView in Android.</p>
  
  <p>Look at my scenario:
  I have three activities-add_new, show and show_all. In the "add_new" activity, there are two EditText fields and a button. When I enter text in both the EditText fields and press the button, it should be stored as two separate lines in a text file in the Android filesystem.</p>
  
  <p>The "show_all" activity contains a ListView, which populates the contents of the text file in such a way that, the one line is shown as the title (the content read from the first EditText field)  of each item, and the immediate next line (the data read from the second EditText field)  is the data associated with it in the listview.</p>
  
  <p>When I click any item in the ListView, a new activity, "show" displays the details ofthat particular item. When I press delete button in that activity, the original text file need to be updated in such a way that, the lines associated with that item need to be deleted.</p>
  
  <p>How do we do this?</p>