List with multiple TextViews for each item?

It's not possible to have multiple TextView items when using the layout "simple_list_item_1" for your Adapter's layout ... that's why they call it "simple - item - 1 If you want a total of 2 TextViews per row you can use the "simple_list_item_2" but I actually recommend you go with using a SimpleAdapter and creating your own row entry layout file. It's much more flexible and you can include as many text items, images, check boxes, or anything else you can think of, versus just a couple of text items on a single row Food for thought Do a search for SimpleAdapter examples to see how to implement this. Not a big deal, and you'll find it's a "gift that keeps on giving.

It's not possible to have multiple TextView items when using the layout "simple_list_item_1" for your Adapter's layout ... that's why they call it "simple - item - 1". If you want a total of 2 TextViews per row you can use the "simple_list_item_2" but I actually recommend you go with using a SimpleAdapter and creating your own row entry layout file. It's much more flexible and you can include as many text items, images, check boxes, or anything else you can think of, versus just a couple of text items on a single row.

Food for thought ... Do a search for SimpleAdapter examples to see how to implement this. Not a big deal, and you'll find it's a "gift that keeps on giving.

1 +1 Learning to create your own list items isn't very difficult and will give you infinitely more flexibility, allowing you to really give your app a custom feel. – Glendon Trullinger Jun 26 at 5:27 I have tried this, but it doesn't seem to work. I would appreciate it if you could point me in the right direction as the tutorials aren't really helping out.... notes = new SimpleAdapter( this, painItems, R.layout.

Main, new String { "line1","line2" }, new int { R.id. TxtItem, R.id. EditText1 } ); setListAdapter( notes ); – Kgrover Jun 26 at 23:24 @Glendon, can you give me a brief overview/sample on how to create a simple adapter and use it?

In addition, the above code uses editText1 as another textField and I have changed the list(painItems) to be as follows: ArrayList> painItems = new ArrayList>(); – Kgrover Jun 26 at 23:30.

TxtItem = (EditText)findViewById(R.id. BtnAdd = (Button)findViewById(R.id. ListItems = (ListView)findViewById(R.id.

Aa = new ArrayAdapter(this, android.R.layout. If(v == this.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions