i'm trying to build a ListView with more than one TextView in each Row.
my code for diplaying one TextView in the ListItem is this:
Using java Syntax Highlighting
- ArrayAdapter<String> stackAdapter =
- new ArrayAdapter<String>(this, R.layout.stack_list_item, model.stack.getList());
- ListView listView = (ListView) findViewById(R.id.stackList);
- listView.setAdapter(stackAdapter);
Parsed in 0.031 seconds, using GeSHi 1.0.8.4
this is working pretty fine, but only with one TextView, i need two of the one with the "orderNumber" and one with the text.
I took the code form the IconifiedList. I changed the sample, instead of an Icon i need a TextView.
so the Sample is working good.
But, when i use the code in my Appliaction the List will not be filled.
Using java Syntax Highlighting
- IStackListAdapter itla = new IStackListAdapter(this);
- // Add four items
- itla.addItem(new IStackItem(
- "Surf Web", "1:"));
- itla.addItem(new IStackItem(
- "Report Bug", "2:"));
- itla.addItem(new IStackItem(
- "Speak Spanish", "3:"));
- itla.addItem(new IStackItem(
- "Vidoop", "4:"));
- // Display it
- ListView listView = (ListView) findViewById(R.id.stackList);
- listView.setAdapter(itla);
Parsed in 0.033 seconds, using GeSHi 1.0.8.4
Instead of a ListActivity i have a Activity. The ListView is emmbeded in a AbsoluteLayout.
Any Idea why is not working?




