Ok so I am trying to populate a list view in android from a linked list of objects. I am reading lines from a text file, splitting out two values from each line of the text file separated by a "," storing each of these values into a linked list of objects. Then I'm pulling the name field of each object to populate a list view. I know it's sloppy I'm just starting with Android :E It won't run at all at this point but there are no errors in the code.

here's my activity.java file

```
package com.pkuCalc.pkuCalc;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import android.app.Activity;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.os.Bundle;

public class PkuCalcActivity extends Activity {
    private ListView lv;
List<Food> foodlist = new LinkedList<Food>();
int numFoodItems = 0;
/** Called when the activity is first created. */
@Override

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    lv = (ListView) findViewById(R.id.listView1);

    try{

        InputStream inputStream = getResources().openRawResource(R.raw.food);

        if (inputStream != null) {

            InputStreamReader inputreader = new InputStreamReader(inputStream);

            BufferedReader r = new BufferedReader(inputreader);

            String strLine;

            while (( strLine = r.readLine()) != null)   {
                int z = 0;
                int length = strLine.length();
                int ind = strLine.indexOf( ',' );
                String name = "";
                for (int i = 0; i < ind; i++) {
                    name = name + strLine.charAt(i);
                }
                String sphe = "";
                for (int i = ind + 2; i < length; i++) {
                    sphe = sphe + strLine.charAt(i);
                }
                int phe = Integer.parseInt(sphe);

                Food newFood = new Food(name, phe);
                foodlist.add(newFood);

                numFoodItems = z;
                z++;
            } 

        }

        inputStream.close();

    } catch (IOException e){    //Catch exception if any
        e.printStackTrace();
    }

    ArrayList<String> values = new ArrayList<String>();

    for (int i = 0; i <= numFoodItems; i++) {
        values.add((foodlist.get(i)).getName());
    }

    ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1, values);
    lv.setAdapter(arrayAdapter); 

    setContentView(R.layout.main);

}

}

```