I got an Android Problem
I have no idea how to add an ArrayAdapter or ListAdapter to display my 2 dim Array.
I got:
ArrayList<ArrayList<String>> laktoseList;
laktoseList = new ArrayList<ArrayList<String>>();
laktoseList.add(new ArrayList<String>());
laktoseList.get(0).add("Milch");
laktoseList.get(0).add("15");
laktoseList.add(new ArrayList<String>());
laktoseList.get(1).add("Jogurht");
laktoseList.get(1).add("11");
laktoseList.add(new ArrayList<String>());
laktoseList.get(2).add("Woot");
laktoseList.get(2).add("19.5");
ListView listViewName = (ListView) findViewById(R.id.listName);
ListView listViewGramm = (ListView) findViewById(R.id.listGramm);
MyCustomArrayAdapter nameAdapter = new MyCustomArrayAdapter(this, R.id.listName, laktoseList.get(0));
MyCustomArrayAdapter grammAdapter = new MyCustomArrayAdapter(this, R.id.listGramm, laktoseList.get(1));
is that right until now? I got my 2 dim array for the name of the Item and for the gramm.
I have 2 ListViews created in the ADT and this should go in.
but I dont know how to write an adapter for a ArrayList<ArrayList> . :(
to set the values to the List.
Thanks
EDIT
but I need 2 values. Here is a Picture pic-upload.de/view-23169548/app.jpg.html I need to say the First list the name and the second list the among of gramms
