0

i am trying to create a list view with more than 2 items i know is not difficult but I have a while trying and nothing ... Example I want to show the code, name and price of a product. I used array adapter with 1 item and two item but I need 3... Can someone show me a sample code how I can do this? Show 3 or more items in a row of a listview... Thanks

i know how to do this enter image description here

i want to do this

enter image description here

Smithnoff
  • 33
  • 9
  • I don't understand what you want. Perhaps you could give an example using ASCII art? – user2768 Nov 24 '15 at 15:47
  • I have a list of products (inventory) I want to show a listview with the name of product, the price and barcode. But I only know how to show 2 items I the listview row. I use two_line_item and I want to know the way to use more than 2 line item... Do you understand? I have a bad English sorry. – Smithnoff Nov 24 '15 at 15:52
  • A picture is worth a thousand words: can you draw a picture of what you want? Just a simple ASCII drawing would suffice. E.g., something like the drawing here: http://tex.stackexchange.com/questions/279761/how-to-change-column-width-on-each-row. – user2768 Nov 24 '15 at 15:55

1 Answers1

0

Make a ArrayList of your desired model like you can make your model.class

and add items in it like

String item1,item2,item3

and pass this in arraylist and passing through adapter

Hardy
  • 2,576
  • 1
  • 23
  • 45